diff options
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r-- | sound/soc/sh/fsi.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 0c9997e2d8c0..584315895393 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); |