Message ID | 20200710101907.11214-10-ovidiu.panait@windriver.com |
---|---|
State | Accepted |
Commit | 3a4b52a9e5a817e2c19434290c4e1fe1d792cba2 |
Headers | show |
Series | [v2,01/14] Kconfig: Introduce CONFIG_SYS_HAS_SRAM | expand |
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index b19375cbc8..b2738f5717 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_DEV)) { + struct blk_desc *desc = dev_get_uclass_platdata(dev); - part_init(desc); -#endif + part_init(desc); + } return 0; }