From: Hans-Christian Egtvedt Date: Thu, 2 Apr 2009 06:21:16 +0000 (+0200) Subject: ALSA: snd-atmel-ac97c: cleanup registers when removing driver X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bd74a1843e06eef47bdb17452ed363255eb1d6e3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 90527c14901..4df9ca40054 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);