summaryrefslogtreecommitdiffstats
path: root/include/mci.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-09-09 22:34:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 10:30:12 +0200
commit4159407136abb44ca26fac22ab5397236fccc410 (patch)
treecafdea5d7e1102555181f039587294bdd5d24b33 /include/mci.h
parent8b76032fdf83521c3df55cae50fba286e23746ae (diff)
downloadbarebox-4159407136abb44ca26fac22ab5397236fccc410.tar.gz
barebox-4159407136abb44ca26fac22ab5397236fccc410.tar.xz
mci: provide wrapper for mci_get_device_by_name ∘ devpath_to_name
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/mci.h')
-rw-r--r--include/mci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mci.h b/include/mci.h
index 77625ea8e9..a46239d8ff 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
@@ -491,4 +492,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_ */