blk: Rework guard around part_init call
PATCH 1/1 blk: Rework guard around part_init call
The function part_init() will only be built when we have both CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE set. Protect the call to this function with both of these tests now.
Cc Simon Glass <[email protected]>
Signed-off-by Tom Rini <[email protected]>
--- drivers/block/blk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/blk-uclass.c +1 -1
@@ -639,7 +639,7 @@ int blk_unbind_all(int if_type)static int blk_post_probe (struct udevice *dev) { -#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBDISK_SUPPORT ) +#if defined(CONFIG_PARTITIONS ) && defined(CONFIG_HAVE_BLOCK_DEVICE )struct blk_desc *desc =dev_get_uclass_platdata (dev);part_init (desc);
Signature · 1 line
2.7.4
PATCH 1/1 blk: Rework guard around part_init call
Quoted 10 lines · Tom Rini
The function
part_init()will only be built when we have bothCONFIG_PARTITIONSandCONFIG_HAVE_BLOCK_DEVICEset. Protect the call to this function with both of these tests now.Cc Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>--- drivers/block/blk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Yes I think we need this for now.
Reviewed-by Simon Glass <[email protected]>