aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c1
-rw-r--r--sound/soc/fsl/eukrea-tlv320.c37
5 files changed, 23 insertions, 18 deletions
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index fd3177f9e79a..98aef571b9f8 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -348,4 +348,5 @@ void __init eukrea_mbimx27_baseboard_init(void)
348 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); 348 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
349 349
350 gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); 350 gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
351 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
351} 352}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index dfd2da87c2df..0b84666792f0 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -306,4 +306,5 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); 307 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
309 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
309} 310}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 6e9dd12a6961..c6532a007d46 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -315,4 +315,5 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
315 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 315 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
316 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); 316 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
317 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 317 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
318 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
318} 319}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
index 96a24b73dc23..8b0de30d7a3f 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
@@ -228,4 +228,5 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
228 228
229 gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info); 229 gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info);
230 imx_add_gpio_keys(&eukrea_mbimxsd51_button_data); 230 imx_add_gpio_keys(&eukrea_mbimxsd51_button_data);
231 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
231} 232}
diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c
index efb9ede01208..267d5b4b63ce 100644
--- a/sound/soc/fsl/eukrea-tlv320.c
+++ b/sound/soc/fsl/eukrea-tlv320.c
@@ -93,9 +93,7 @@ static struct snd_soc_card eukrea_tlv320 = {
93 .num_links = 1, 93 .num_links = 1,
94}; 94};
95 95
96static struct platform_device *eukrea_tlv320_snd_device; 96static int __devinit eukrea_tlv320_probe(struct platform_device *pdev)
97
98static int __init eukrea_tlv320_init(void)
99{ 97{
100 int ret; 98 int ret;
101 int int_port = 0, ext_port; 99 int int_port = 0, ext_port;
@@ -136,29 +134,32 @@ static int __init eukrea_tlv320_init(void)
136 return 0; 134 return 0;
137 } 135 }
138 136
139 eukrea_tlv320_snd_device = platform_device_alloc("soc-audio", -1); 137 eukrea_tlv320.dev = &pdev->dev;
140 if (!eukrea_tlv320_snd_device) 138 ret = snd_soc_register_card(&eukrea_tlv320);
141 return -ENOMEM; 139 if (ret)
142 140 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
143 platform_set_drvdata(eukrea_tlv320_snd_device, &eukrea_tlv320);
144 ret = platform_device_add(eukrea_tlv320_snd_device);
145
146 if (ret) {
147 printk(KERN_ERR "ASoC: Platform device allocation failed\n");
148 platform_device_put(eukrea_tlv320_snd_device);
149 }
150 141
151 return ret; 142 return ret;
152} 143}
153 144
154static void __exit eukrea_tlv320_exit(void) 145static int __devexit eukrea_tlv320_remove(struct platform_device *pdev)
155{ 146{
156 platform_device_unregister(eukrea_tlv320_snd_device); 147 snd_soc_unregister_card(&eukrea_tlv320);
148
149 return 0;
157} 150}
158 151
159module_init(eukrea_tlv320_init); 152static struct platform_driver eukrea_tlv320_driver = {
160module_exit(eukrea_tlv320_exit); 153 .driver = {
154 .name = "eukrea_tlv320",
155 .owner = THIS_MODULE,
156 },
157 .probe = eukrea_tlv320_probe,
158 .remove = __devexit_p(eukrea_tlv320_remove),};
159
160module_platform_driver(eukrea_tlv320_driver);
161 161
162MODULE_AUTHOR("Eric Bénard <eric@eukrea.com>"); 162MODULE_AUTHOR("Eric Bénard <eric@eukrea.com>");
163MODULE_DESCRIPTION("CPUIMX ALSA SoC driver"); 163MODULE_DESCRIPTION("CPUIMX ALSA SoC driver");
164MODULE_LICENSE("GPL"); 164MODULE_LICENSE("GPL");
165MODULE_ALIAS("platform:eukrea_tlv320");