ALSA: snd-atmel-ac97c: cleanup registers when removing driver
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Thu, 2 Apr 2009 06:21:16 +0000 (08:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 Apr 2009 01:55:50 +0000 (03:55 +0200)
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>
sound/atmel/ac97c.c

index 90527c1..4df9ca4 100644 (file)
@@ -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);