Also convert the only user of mci_get_device_by_name to this new wrapper. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- commands/mmc_extcsd.c | 6 +++--- include/mci.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c index 889a6c614a47..55decd618553 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -2366,7 +2366,7 @@ static int do_mmc_extcsd(int argc, char *argv[]) u8 *dst; int retval = 0; int opt; - char *devname; + char *devpath; int index = 0; int value = 0; int write_operation = 0; @@ -2404,9 +2404,9 @@ static int do_mmc_extcsd(int argc, char *argv[]) if (optind == argc) return COMMAND_ERROR_USAGE; - devname = argv[optind]; + devpath = argv[optind]; - mci = mci_get_device_by_name(devpath_to_name(devname)); + mci = mci_get_device_by_devpath(devpath); if (mci == NULL) { retval = -ENOENT; goto error; diff --git a/include/mci.h b/include/mci.h index 072008ef9da7..5d0c2f8f9638 100644 --- a/include/mci.h +++ b/include/mci.h @@ -28,6 +28,7 @@ #include <linux/list.h> #include <block.h> +#include <fs.h> #include <regulator.h> /* These codes should be sorted numerically in order of newness. If the last @@ -490,4 +491,9 @@ static inline int mmc_host_is_spi(struct mci_host *host) struct mci *mci_get_device_by_name(const char *name); +static inline struct mci *mci_get_device_by_devpath(const char *devpath) +{ + return mci_get_device_by_name(devpath_to_name(devpath)); +} + #endif /* _MCI_H_ */ -- 2.19.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox