]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP: mmc-twl4030 allow arbitrary slot names
authorAdrian Hunter <adrian.hunter@nokia.com>
Fri, 30 Jan 2009 09:10:19 +0000 (11:10 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 10 Mar 2009 19:22:23 +0000 (12:22 -0700)
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>
arch/arm/mach-omap2/mmc-twl4030.c
arch/arm/mach-omap2/mmc-twl4030.h

index 5957d1ca9ca751193c11fc7e2f177a056ccf8503..f33f38534a1e8f6ae9a4fcef5535681791e1859d 100644 (file)
@@ -401,7 +401,10 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
                        return;
                }
 
-               sprintf(twl->name, "mmc%islot%i", c->mmc, 1);
+               if (c->name)
+                       strncpy(twl->name, c->name, HSMMC_NAME_LEN);
+               else
+                       sprintf(twl->name, "mmc%islot%i", c->mmc, 1);
                mmc->slots[0].name = twl->name;
                mmc->nr_slots = 1;
                mmc->slots[0].wires = c->wires;
index 0aa168690ed0f7110d019de4900513124fefd8c2..ea59e8624290a1d8c1fb5b2f002a69beebd0cd2b 100644 (file)
@@ -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 */
 };