Message ID | 20200709080457.26850-6-ovidiu.panait@windriver.com |
---|---|
State | Superseded |
Headers | show |
Series | [01/10] board_f: Introduce arch_setup_bdinfo initcall | expand |
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait <ovidiu.panait at windriver.com> wrote: > > Use IS_ENABLED() instead of #ifdef in blk_post_probe function. > > No functional change intended. > > Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com> > --- > > drivers/block/blk-uclass.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Simon Glass <sjg at chromium.org>
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; }
Use IS_ENABLED() instead of #ifdef in blk_post_probe function. No functional change intended. Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com> --- drivers/block/blk-uclass.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)