aboutsummaryrefslogtreecommitdiffstats
path: root/sound/atmel
diff options
context:
space:
mode:
authorAlexander Stein <alexanders83@web.de>2014-12-05 14:10:06 -0500
committerTakashi Iwai <tiwai@suse.de>2014-12-05 14:36:01 -0500
commit1132015b16580d3f53385354ffec0f58443a1ffd (patch)
treec5fbd8702ab6b0e8bd09812d1e37c7167d74192e /sound/atmel
parentca460cc250aa9d5255b3e2469ca0abad5d136233 (diff)
ALSA: sound/atmel/ac97c.c: Add missing clock prepare
Clocks must be prepared before enabling them. Do this in one step. Replace clk_enable with clk_prepare_enable and clk_disable with clk_disable_unprepare. This fixes the following warning: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:895 __clk_enable+0x24/0x9c() Modules linked in: CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.18.0-rc7+ #245 [<c000dce8>] (unwind_backtrace) from [<c000bcf0>] (show_stack+0x10/0x14) [<c000bcf0>] (show_stack) from [<c001664c>] (warn_slowpath_common+0x60/0x80) [<c001664c>] (warn_slowpath_common) from [<c00166fc>] (warn_slowpath_null+0x18/0x20) [<c00166fc>] (warn_slowpath_null) from [<c02fd7ac>] (__clk_enable+0x24/0x9c) [<c02fd7ac>] (__clk_enable) from [<c02fdbb4>] (clk_enable+0x18/0x2c) [<c02fdbb4>] (clk_enable) from [<c0322688>] (atmel_ac97c_probe+0x154/0x694) [<c0322688>] (atmel_ac97c_probe) from [<c0235e08>] (platform_drv_probe+0x48/0x94) [<c0235e08>] (platform_drv_probe) from [<c02345f8>] (driver_probe_device+0x138/0x350) [<c02345f8>] (driver_probe_device) from [<c02348bc>] (__driver_attach+0x68/0x8c) [<c02348bc>] (__driver_attach) from [<c0232bd0>] (bus_for_each_dev+0x70/0x84) [<c0232bd0>] (bus_for_each_dev) from [<c0233cd8>] (bus_add_driver+0xfc/0x1f8) [<c0233cd8>] (bus_add_driver) from [<c0234f0c>] (driver_register+0x9c/0xe0) [<c0234f0c>] (driver_register) from [<c0008ac4>] (do_one_initcall+0x110/0x1c8) [<c0008ac4>] (do_one_initcall) from [<c053cd58>] (kernel_init_freeable+0xf8/0x1b8) [<c053cd58>] (kernel_init_freeable) from [<c03c0414>] (kernel_init+0x8/0xe4) [<c03c0414>] (kernel_init) from [<c00096d0>] (ret_from_fork+0x14/0x24) ---[ end trace cb88537fdc8fa201 ]--- atmel_ac97c fffa0000.sound: AC'97 0 does not respond - RESET atmel_ac97c fffa0000.sound: AC'97 0 access is not valid [0xffffffff], removing mixer. ------------[ cut here ]------------ Signed-off-by: Alexander Stein <alexanders83@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel')
-rw-r--r--sound/atmel/ac97c.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index f1d119538397..cb44c74c9702 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -944,7 +944,7 @@ static int atmel_ac97c_probe(struct platform_device *pdev)
944 dev_dbg(&pdev->dev, "no peripheral clock\n"); 944 dev_dbg(&pdev->dev, "no peripheral clock\n");
945 return PTR_ERR(pclk); 945 return PTR_ERR(pclk);
946 } 946 }
947 clk_enable(pclk); 947 clk_prepare_enable(pclk);
948 948
949 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, 949 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
950 SNDRV_DEFAULT_STR1, THIS_MODULE, 950 SNDRV_DEFAULT_STR1, THIS_MODULE,
@@ -1122,7 +1122,7 @@ err_ioremap:
1122err_request_irq: 1122err_request_irq:
1123 snd_card_free(card); 1123 snd_card_free(card);
1124err_snd_card_new: 1124err_snd_card_new:
1125 clk_disable(pclk); 1125 clk_disable_unprepare(pclk);
1126 clk_put(pclk); 1126 clk_put(pclk);
1127 return retval; 1127 return retval;
1128} 1128}
@@ -1139,7 +1139,7 @@ static int atmel_ac97c_suspend(struct device *pdev)
1139 if (test_bit(DMA_TX_READY, &chip->flags)) 1139 if (test_bit(DMA_TX_READY, &chip->flags))
1140 dw_dma_cyclic_stop(chip->dma.tx_chan); 1140 dw_dma_cyclic_stop(chip->dma.tx_chan);
1141 } 1141 }
1142 clk_disable(chip->pclk); 1142 clk_disable_unprepare(chip->pclk);
1143 1143
1144 return 0; 1144 return 0;
1145} 1145}
@@ -1149,7 +1149,7 @@ static int atmel_ac97c_resume(struct device *pdev)
1149 struct snd_card *card = dev_get_drvdata(pdev); 1149 struct snd_card *card = dev_get_drvdata(pdev);
1150 struct atmel_ac97c *chip = card->private_data; 1150 struct atmel_ac97c *chip = card->private_data;
1151 1151
1152 clk_enable(chip->pclk); 1152 clk_prepare_enable(chip->pclk);
1153 if (cpu_is_at32ap7000()) { 1153 if (cpu_is_at32ap7000()) {
1154 if (test_bit(DMA_RX_READY, &chip->flags)) 1154 if (test_bit(DMA_RX_READY, &chip->flags))
1155 dw_dma_cyclic_start(chip->dma.rx_chan); 1155 dw_dma_cyclic_start(chip->dma.rx_chan);
@@ -1177,7 +1177,7 @@ static int atmel_ac97c_remove(struct platform_device *pdev)
1177 ac97c_writel(chip, COMR, 0); 1177 ac97c_writel(chip, COMR, 0);
1178 ac97c_writel(chip, MR, 0); 1178 ac97c_writel(chip, MR, 0);
1179 1179
1180 clk_disable(chip->pclk); 1180 clk_disable_unprepare(chip->pclk);
1181 clk_put(chip->pclk); 1181 clk_put(chip->pclk);
1182 iounmap(chip->regs); 1182 iounmap(chip->regs);
1183 free_irq(chip->irq, chip); 1183 free_irq(chip->irq, chip);