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>
This commit is contained in:
Ovidiu Panait 2020-07-24 14:12:21 +03:00 committed by Tom Rini
parent 1532885c45
commit 3a4b52a9e5
1 changed files with 5 additions and 4 deletions

View File

@ -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;
}