summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/twl-common.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-01-30 13:21:35 -0800
committerTony Lindgren <tony@atomide.com>2013-01-30 13:21:35 -0800
commit27e0bf7701a63f7e125f437bb549f236e2118577 (patch)
tree6491441823ad9d89cbdbdd355f599e18ebe7283a /arch/arm/mach-omap2/twl-common.c
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
parente4f4e8bfa47431b91fbb21dd9b86d9bc2c15cbd7 (diff)
Merge branch 'peter/for-tony' of git://gitorious.org/omap-audio/linux-audio into omap-for-v3.9/twl
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.c')
-rw-r--r--arch/arm/mach-omap2/twl-common.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index e49b40b4c90a..931495a25872 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -528,24 +528,29 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE)
#include <linux/platform_data/omap-twl4030.h>
+/* Commonly used configuration */
static struct omap_tw4030_pdata omap_twl4030_audio_data;
static struct platform_device audio_device = {
.name = "omap-twl4030",
.id = -1,
- .dev = {
- .platform_data = &omap_twl4030_audio_data,
- },
};
-void __init omap_twl4030_audio_init(char *card_name)
+void __init omap_twl4030_audio_init(char *card_name,
+ struct omap_tw4030_pdata *pdata)
{
- omap_twl4030_audio_data.card_name = card_name;
+ if (!pdata)
+ pdata = &omap_twl4030_audio_data;
+
+ pdata->card_name = card_name;
+
+ audio_device.dev.platform_data = pdata;
platform_device_register(&audio_device);
}
#else /* SOC_OMAP_TWL4030 */
-void __init omap_twl4030_audio_init(char *card_name)
+void __init omap_twl4030_audio_init(char *card_name,
+ struct omap_tw4030_pdata *pdata)
{
return;
}