Skip to content

Commit

Permalink
ALSA: snd-atmel-ac97c: cleanup registers when removing driver
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Hans-Christian Egtvedt authored and tiwai committed Apr 6, 2009
1 parent 81baf3a commit bd74a18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bd74a18

Please sign in to comment.