[PATCH 4/4] ARM: i.MX: use device_detect_by_name where applicable
Sascha Hauer
s.hauer at pengutronix.de
Wed Jun 26 03:33:16 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/boards/dmo-mx6-realq7/board.c | 6 +-----
arch/arm/boards/freescale-mx53-loco/board.c | 4 +---
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boards/dmo-mx6-realq7/board.c b/arch/arm/boards/dmo-mx6-realq7/board.c
index b2a27a4..7983b88 100644
--- a/arch/arm/boards/dmo-mx6-realq7/board.c
+++ b/arch/arm/boards/dmo-mx6-realq7/board.c
@@ -117,11 +117,7 @@ static int realq7_env_init(void)
{
switch (bootsource_get()) {
case BOOTSOURCE_MMC:
- if (!IS_ENABLED(CONFIG_MCI_STARTUP)) {
- struct device_d *dev = get_device_by_name("mmc3");
- if (dev)
- device_detect(dev);
- }
+ device_detect_by_name("mmc3");
devfs_add_partition("mmc3", 0, SZ_1M, DEVFS_PARTITION_FIXED, "mmc3.barebox");
devfs_add_partition("mmc3", SZ_1M, SZ_1M, DEVFS_PARTITION_FIXED, "mmc3.bareboxenv");
default_environment_path = "/dev/mmc3.bareboxenv";
diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index 2f51128..aaf5db4 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -81,12 +81,10 @@ static void loco_fec_reset(void)
static int loco_late_init(void)
{
- struct device_d *dev = get_device_by_name("mmc0");
struct mc34708 *mc34708;
int rev;
- if (dev)
- device_detect(dev);
+ device_detect_by_name("mmc0");
devfs_add_partition("mmc0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
--
1.8.3.1
More information about the barebox
mailing list