[alsa-devel] [PATCH 7/7] snd-atmel-ac97c: cleanup registers when removing driver
Hans-Christian Egtvedt
hans-christian.egtvedt at atmel.com
Tue Mar 24 13:47:50 CET 2009
This patch will set the channel A and control channel mode register to
zero before disabling the AC97C peripheral.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt at atmel.com>
---
sound/atmel/ac97c.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 75100b0..c917306 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -969,6 +969,10 @@ static int __devexit atmel_ac97c_remove(struct platform_device *pdev)
if (gpio_is_valid(chip->reset_pin))
gpio_free(chip->reset_pin);
+ ac97c_writel(chip, CAMR, 0);
+ ac97c_writel(chip, COMR, 0);
+ ac97c_writel(chip, MR, 0);
+
clk_disable(chip->pclk);
clk_put(chip->pclk);
iounmap(chip->regs);
--
1.5.6.3
More information about the Alsa-devel
mailing list