diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/blk-uclass.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index b19375cbc8..b46a1ac8d2 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -644,11 +644,12 @@ int blk_unbind_all(int if_type) static int blk_post_probe(struct udevice *dev) { -#if defined(CONFIG_PARTITIONS) && defined(CONFIG_HAVE_BLOCK_DEVICE) - struct blk_desc *desc = dev_get_uclass_platdata(dev); + if (IS_ENABLED(CONFIG_PARTITIONS) && + IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) { + struct blk_desc *desc = dev_get_uclass_platdata(dev); - part_init(desc); -#endif + part_init(desc); + } return 0; } |