summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2009-03-23 18:23:48 -0700
committerTony Lindgren <tony@atomide.com>2009-03-23 18:51:23 -0700
commite51151a53fc85fb1730ec4d6c1474275dcdb9ec3 (patch)
treee19dfa9008e5e4088c2cc8e438d8cab19c1fcc82 /arch/arm/mach-omap2
parent8d75e98b5880f8f02be68ddc3cc4e3d433630d7b (diff)
downloadlinux-e51151a53fc85fb1730ec4d6c1474275dcdb9ec3.tar.bz2
ARM: OMAP3: mmc-twl4030 allow arbitrary slot names, v3
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/mmc-twl4030.c7
-rw-r--r--arch/arm/mach-omap2/mmc-twl4030.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index e2b2aeb713d8..dc40b3e72206 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -402,8 +402,11 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
return;
}
- snprintf(twl->name, ARRAY_SIZE(twl->name), "mmc%islot%i",
- c->mmc, 1);
+ if (c->name)
+ strncpy(twl->name, c->name, HSMMC_NAME_LEN);
+ else
+ snprintf(twl->name, ARRAY_SIZE(twl->name),
+ "mmc%islot%i", c->mmc, 1);
mmc->slots[0].name = twl->name;
mmc->nr_slots = 1;
mmc->slots[0].wires = c->wires;
diff --git a/arch/arm/mach-omap2/mmc-twl4030.h b/arch/arm/mach-omap2/mmc-twl4030.h
index 0aa168690ed0..ea59e8624290 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.h
+++ b/arch/arm/mach-omap2/mmc-twl4030.h
@@ -14,6 +14,7 @@ struct twl4030_hsmmc_info {
bool cover_only; /* No card detect - just cover switch */
int gpio_cd; /* or -EINVAL */
int gpio_wp; /* or -EINVAL */
+ char *name; /* or NULL for default */
struct device *dev; /* returned: pointer to mmc adapter */
};