mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
14
disk/part.c
14
disk/part.c
@ -26,7 +26,7 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef HAVE_BLOCK_DEVICE
|
||||
#ifdef CONFIG_HAVE_BLOCK_DEVICE
|
||||
static struct part_driver *part_driver_lookup_type(int part_type)
|
||||
{
|
||||
struct part_driver *drv =
|
||||
@ -80,7 +80,7 @@ struct blk_desc *blk_get_dev(const char *ifname, int dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BLOCK_DEVICE
|
||||
#ifdef CONFIG_HAVE_BLOCK_DEVICE
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/*
|
||||
@ -212,7 +212,7 @@ void dev_print (struct blk_desc *dev_desc)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BLOCK_DEVICE
|
||||
#ifdef CONFIG_HAVE_BLOCK_DEVICE
|
||||
|
||||
void part_init(struct blk_desc *dev_desc)
|
||||
{
|
||||
@ -298,12 +298,12 @@ void part_print(struct blk_desc *dev_desc)
|
||||
drv->print(dev_desc);
|
||||
}
|
||||
|
||||
#endif /* HAVE_BLOCK_DEVICE */
|
||||
#endif /* CONFIG_HAVE_BLOCK_DEVICE */
|
||||
|
||||
int part_get_info(struct blk_desc *dev_desc, int part,
|
||||
disk_partition_t *info)
|
||||
{
|
||||
#ifdef HAVE_BLOCK_DEVICE
|
||||
#ifdef CONFIG_HAVE_BLOCK_DEVICE
|
||||
struct part_driver *drv;
|
||||
|
||||
#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
|
||||
@ -329,7 +329,7 @@ int part_get_info(struct blk_desc *dev_desc, int part,
|
||||
PRINTF("## Valid %s partition found ##\n", drv->name);
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_BLOCK_DEVICE */
|
||||
#endif /* CONFIG_HAVE_BLOCK_DEVICE */
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -396,7 +396,7 @@ int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#ifdef HAVE_BLOCK_DEVICE
|
||||
#ifdef CONFIG_HAVE_BLOCK_DEVICE
|
||||
/*
|
||||
* Updates the partition table for the specified hw partition.
|
||||
* Does not need to be done for hwpart 0 since it is default and
|
||||
|
Reference in New Issue
Block a user