Commit bd74a184 authored by Hans-Christian Egtvedt's avatar Hans-Christian Egtvedt Committed by Takashi Iwai

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: default avatarHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 81baf3a7
...@@ -969,6 +969,10 @@ static int __devexit atmel_ac97c_remove(struct platform_device *pdev) ...@@ -969,6 +969,10 @@ static int __devexit atmel_ac97c_remove(struct platform_device *pdev)
if (gpio_is_valid(chip->reset_pin)) if (gpio_is_valid(chip->reset_pin))
gpio_free(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_disable(chip->pclk);
clk_put(chip->pclk); clk_put(chip->pclk);
iounmap(chip->regs); iounmap(chip->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment