diff options
author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-04-02 08:21:16 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-06 03:55:50 +0200 |
commit | bd74a1843e06eef47bdb17452ed363255eb1d6e3 (patch) | |
tree | 38a7971e7a0aec7fff96e406f5096a46ceb2714e /sound/atmel/ac97c.c | |
parent | 81baf3a7f686c5d22359cb06fc11d20907ba12f8 (diff) | |
download | linux-bd74a1843e06eef47bdb17452ed363255eb1d6e3.tar.gz linux-bd74a1843e06eef47bdb17452ed363255eb1d6e3.tar.bz2 linux-bd74a1843e06eef47bdb17452ed363255eb1d6e3.zip |
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/ac97c.c')
-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) 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); |