summaryrefslogtreecommitdiffstats
path: root/disk
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-03-04 01:09:56 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:19:22 -0400
commitd96a98045aa5aadba473d89872a987ac50a023ea (patch)
tree7db2dd1b04ded93afd7dc3046ac20959a0c2a766 /disk
parent19503c3117ace4bfab86d317ee459812387e983b (diff)
downloadu-boot-d96a98045aa5aadba473d89872a987ac50a023ea.tar.gz
u-boot-d96a98045aa5aadba473d89872a987ac50a023ea.tar.xz
u-boot-d96a98045aa5aadba473d89872a987ac50a023ea.zip
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>
Diffstat (limited to 'disk')
-rw-r--r--disk/part.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/disk/part.c b/disk/part.c
index 2a46050392..67d98fe844 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -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