diff options
author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-04-02 02:21:16 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-05 21:55:50 -0400 |
commit | bd74a1843e06eef47bdb17452ed363255eb1d6e3 (patch) | |
tree | 38a7971e7a0aec7fff96e406f5096a46ceb2714e | |
parent | 81baf3a7f686c5d22359cb06fc11d20907ba12f8 (diff) |
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>
-rw-r--r-- | 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 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) | |||
969 | if (gpio_is_valid(chip->reset_pin)) | 969 | if (gpio_is_valid(chip->reset_pin)) |
970 | gpio_free(chip->reset_pin); | 970 | gpio_free(chip->reset_pin); |
971 | 971 | ||
972 | ac97c_writel(chip, CAMR, 0); | ||
973 | ac97c_writel(chip, COMR, 0); | ||
974 | ac97c_writel(chip, MR, 0); | ||
975 | |||
972 | clk_disable(chip->pclk); | 976 | clk_disable(chip->pclk); |
973 | clk_put(chip->pclk); | 977 | clk_put(chip->pclk); |
974 | iounmap(chip->regs); | 978 | iounmap(chip->regs); |