diff options
author | Simon Glass | 2022-08-11 19:34:59 -0600 |
---|---|---|
committer | Tom Rini | 2022-09-16 11:05:16 -0400 |
commit | e33a5c6be55e7c012b2851f9bdf90e7f607e72bf (patch) | |
tree | 19041e9f1b54a5d2811c96e88132ba44fe31243b /drivers/xen/pvblock.c | |
parent | adbfe8edc3389ba635229195a95217d8b0dfa182 (diff) |
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>
Diffstat (limited to 'drivers/xen/pvblock.c')
-rw-r--r-- | drivers/xen/pvblock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index c25c3ea4fff..1090e528d02 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -665,14 +665,14 @@ static int pvblock_blk_bind(struct udevice *udev) struct blk_desc *desc = dev_get_uclass_plat(udev); int devnum; - desc->if_type = IF_TYPE_PVBLOCK; + desc->if_type = UCLASS_PVBLOCK; /* * Initialize the devnum to -ENODEV. This is to make sure that * blk_next_free_devnum() works as expected, since the default * value 0 is a valid devnum. */ desc->devnum = -ENODEV; - devnum = blk_next_free_devnum(IF_TYPE_PVBLOCK); + devnum = blk_next_free_devnum(UCLASS_PVBLOCK); if (devnum < 0) return devnum; desc->devnum = devnum; @@ -804,7 +804,7 @@ static void print_pvblock_devices(void) const char *class_name; class_name = uclass_get_name(UCLASS_PVBLOCK); - for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev; + for (blk_first_device(UCLASS_PVBLOCK, &udev); udev; blk_next_device(&udev), first = false) { struct blk_desc *desc = dev_get_uclass_plat(udev); |