blk: Switch over to using uclass IDs
We currently have an if_type (interface type) and a uclass id. These are closely related and we don't need to have both. Drop the if_type values and use the uclass ones instead. Maintain the existing, subtle, one-way conversion between UCLASS_USB and UCLASS_MASS_STORAGE for now, and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -640,7 +640,7 @@ static int efi_disk_probe(void *ctx, struct event *event)
|
||||
* has already created an efi_disk at this moment.
|
||||
*/
|
||||
desc = dev_get_uclass_plat(dev);
|
||||
if (desc->if_type != IF_TYPE_EFI_LOADER) {
|
||||
if (desc->if_type != UCLASS_EFI_LOADER) {
|
||||
ret = efi_disk_create_raw(dev);
|
||||
if (ret)
|
||||
return -1;
|
||||
@@ -675,7 +675,7 @@ static int efi_disk_delete_raw(struct udevice *dev)
|
||||
return -1;
|
||||
|
||||
desc = dev_get_uclass_plat(dev);
|
||||
if (desc->if_type != IF_TYPE_EFI_LOADER) {
|
||||
if (desc->if_type != UCLASS_EFI_LOADER) {
|
||||
diskobj = container_of(handle, struct efi_disk_obj, header);
|
||||
efi_free_pool(diskobj->dp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user