aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-07 04:29:38 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-05-11 05:14:19 -0400
commit09486cbb26f26cedbfe18b12cedd25607de550df (patch)
tree0cb1fba8b814c9e3695d200c63af4b8da091ed82 /arch/arm/mach-ux500
parenta09806607fd20bed2f8c41fe22793386790a14aa (diff)
ARM: ux500: alter MSP registration to return a device pointer
Alter the db8500_add_msp_i2s() calls to return a struct platform_device * pointer, not an integer. We nee the pointer to obtain a pinctrl handle. Cc: Ola Lilja <ola.o.lilja@stericsson.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500-msp.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c
index c8f6300cb7d2..aacaf80c66a1 100644
--- a/arch/arm/mach-ux500/board-mop500-msp.c
+++ b/arch/arm/mach-ux500/board-mop500-msp.c
@@ -170,7 +170,8 @@ static struct stedma40_chan_cfg msp2_dma_tx = {
170 /* data_width is set during configuration */ 170 /* data_width is set during configuration */
171}; 171};
172 172
173static int db8500_add_msp_i2s(struct device *parent, int id, 173static struct platform_device *db8500_add_msp_i2s(struct device *parent,
174 int id,
174 resource_size_t base, int irq, 175 resource_size_t base, int irq,
175 struct msp_i2s_platform_data *pdata) 176 struct msp_i2s_platform_data *pdata)
176{ 177{
@@ -188,10 +189,10 @@ static int db8500_add_msp_i2s(struct device *parent, int id,
188 if (!pdev) { 189 if (!pdev) {
189 pr_err("Failed to register platform-device 'ux500-msp-i2s.%d'!\n", 190 pr_err("Failed to register platform-device 'ux500-msp-i2s.%d'!\n",
190 id); 191 id);
191 return -EIO; 192 return NULL;
192 } 193 }
193 194
194 return 0; 195 return pdev;
195} 196}
196 197
197/* Platform device for ASoC U8500 machine */ 198/* Platform device for ASoC U8500 machine */
@@ -228,23 +229,21 @@ static struct msp_i2s_platform_data msp3_platform_data = {
228 229
229int mop500_msp_init(struct device *parent) 230int mop500_msp_init(struct device *parent)
230{ 231{
231 int ret;
232
233 pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__); 232 pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__);
234 platform_device_register(&snd_soc_u8500); 233 platform_device_register(&snd_soc_u8500);
235 234
236 pr_info("Initialize MSP I2S-devices.\n"); 235 pr_info("Initialize MSP I2S-devices.\n");
237 ret = db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, 236 db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
238 &msp0_platform_data); 237 &msp0_platform_data);
239 ret |= db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, 238 db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
240 &msp1_platform_data); 239 &msp1_platform_data);
241 ret |= db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, 240 db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
242 &msp2_platform_data); 241 &msp2_platform_data);
243 ret |= db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, 242 db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
244 &msp3_platform_data); 243 &msp3_platform_data);
245 244
246 pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__); 245 pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__);
247 platform_device_register(&ux500_pcm); 246 platform_device_register(&ux500_pcm);
248 247
249 return ret; 248 return 0;
250} 249}