summaryrefslogtreecommitdiff
path: root/sound/atmel
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2009-04-02 10:21:16 +0400
committerTakashi Iwai <tiwai@suse.de>2009-04-06 05:55:50 +0400
commitbd74a1843e06eef47bdb17452ed363255eb1d6e3 (patch)
tree38a7971e7a0aec7fff96e406f5096a46ceb2714e /sound/atmel
parent81baf3a7f686c5d22359cb06fc11d20907ba12f8 (diff)
downloadlinux-bd74a1843e06eef47bdb17452ed363255eb1d6e3.tar.xz
ALSA: snd-atmel-ac97c: cleanup registers when removing driver
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@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel')
-rw-r--r--sound/atmel/ac97c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 90527c14901e..4df9ca400545 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);