diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2020-07-24 14:12:21 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-06 14:26:50 -0400 |
commit | 3a4b52a9e5a817e2c19434290c4e1fe1d792cba2 (patch) | |
tree | 6979041519e7ebbf4d26012845051ca568816959 /drivers/block/blk-uclass.c | |
parent | 1532885c457c594c554b6124ce6dafbe731759c6 (diff) |
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 <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
[trini: Fix thinko and use CONFIG_HAVE_BLOCK_DEVICE in IS_ENABLED()]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/block/blk-uclass.c')
-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; } |