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