mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
disk/part.c: Expose list of available block drivers
We have a pretty nice and generic interface to ask for a specific block device. However, that one is still based around the magic notion that we know the driver name. In order to be able to write fully generic disk access code, expose the currently internal list to other source files so that they can scan through all available block drivers. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@ -21,13 +21,7 @@
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
struct block_drvr {
|
||||
char *name;
|
||||
struct blk_desc* (*get_dev)(int dev);
|
||||
int (*select_hwpart)(int dev_num, int hwpart);
|
||||
};
|
||||
|
||||
static const struct block_drvr block_drvr[] = {
|
||||
const struct block_drvr block_drvr[] = {
|
||||
#if defined(CONFIG_CMD_IDE)
|
||||
{ .name = "ide", .get_dev = ide_get_dev, },
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user