From: Ovidiu Panait Date: Fri, 24 Jul 2020 11:12:21 +0000 (+0300) Subject: dm: blk: Use IS_ENABLED() instead of #ifdefs in blk_post_probe X-Git-Tag: v2020.10~74^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a4b52a9e5a817e2c19434290c4e1fe1d792cba2;p=platform%2Fkernel%2Fu-boot.git dm: blk: Use IS_ENABLED() instead of #ifdefs in blk_post_probe Use IS_ENABLED() instead of #ifdef in blk_post_probe function. No functional change intended. Reviewed-by: Simon Glass Signed-off-by: Ovidiu Panait [trini: Fix thinko and use CONFIG_HAVE_BLOCK_DEVICE in IS_ENABLED()] Signed-off-by: Tom Rini --- diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index b19375c..b46a1ac 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; }