diff options
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r-- | sound/soc/sh/fsi.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 0c9997e2d8c0..23c0e83d4c19 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1200,10 +1200,11 @@ static int fsi_probe(struct platform_device *pdev) | |||
1200 | master->fsib.master = master; | 1200 | master->fsib.master = master; |
1201 | 1201 | ||
1202 | pm_runtime_enable(&pdev->dev); | 1202 | pm_runtime_enable(&pdev->dev); |
1203 | pm_runtime_resume(&pdev->dev); | ||
1204 | dev_set_drvdata(&pdev->dev, master); | 1203 | dev_set_drvdata(&pdev->dev, master); |
1205 | 1204 | ||
1205 | pm_runtime_get_sync(&pdev->dev); | ||
1206 | fsi_soft_all_reset(master); | 1206 | fsi_soft_all_reset(master); |
1207 | pm_runtime_put_sync(&pdev->dev); | ||
1207 | 1208 | ||
1208 | ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED, | 1209 | ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED, |
1209 | id_entry->name, master); | 1210 | id_entry->name, master); |
@@ -1218,8 +1219,17 @@ static int fsi_probe(struct platform_device *pdev) | |||
1218 | goto exit_free_irq; | 1219 | goto exit_free_irq; |
1219 | } | 1220 | } |
1220 | 1221 | ||
1221 | return snd_soc_register_dais(&pdev->dev, fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai)); | 1222 | ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai, |
1223 | ARRAY_SIZE(fsi_soc_dai)); | ||
1224 | if (ret < 0) { | ||
1225 | dev_err(&pdev->dev, "cannot snd dai register\n"); | ||
1226 | goto exit_snd_soc; | ||
1227 | } | ||
1228 | |||
1229 | return ret; | ||
1222 | 1230 | ||
1231 | exit_snd_soc: | ||
1232 | snd_soc_unregister_platform(&pdev->dev); | ||
1223 | exit_free_irq: | 1233 | exit_free_irq: |
1224 | free_irq(irq, master); | 1234 | free_irq(irq, master); |
1225 | exit_iounmap: | 1235 | exit_iounmap: |
@@ -1238,12 +1248,11 @@ static int fsi_remove(struct platform_device *pdev) | |||
1238 | 1248 | ||
1239 | master = dev_get_drvdata(&pdev->dev); | 1249 | master = dev_get_drvdata(&pdev->dev); |
1240 | 1250 | ||
1241 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai)); | 1251 | free_irq(master->irq, master); |
1242 | snd_soc_unregister_platform(&pdev->dev); | ||
1243 | |||
1244 | pm_runtime_disable(&pdev->dev); | 1252 | pm_runtime_disable(&pdev->dev); |
1245 | 1253 | ||
1246 | free_irq(master->irq, master); | 1254 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai)); |
1255 | snd_soc_unregister_platform(&pdev->dev); | ||
1247 | 1256 | ||
1248 | iounmap(master->base); | 1257 | iounmap(master->base); |
1249 | kfree(master); | 1258 | kfree(master); |
@@ -1321,3 +1330,4 @@ module_exit(fsi_mobile_exit); | |||
1321 | MODULE_LICENSE("GPL"); | 1330 | MODULE_LICENSE("GPL"); |
1322 | MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); | 1331 | MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); |
1323 | MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); | 1332 | MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); |
1333 | MODULE_ALIAS("platform:fsi-pcm-audio"); | ||