diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-01-31 14:34:38 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 09:03:28 +0100 |
commit | 3b6baa5a0b0a2877c18a76fa1f508cacdbc08edf (patch) | |
tree | 93d41b6ec1dfba7c2ffcb65185d6768a5497acc6 /sound/i2c/other | |
parent | 965ac42ce919db225ee64678f0be02f2fdf5b5e4 (diff) | |
download | op-kernel-dev-3b6baa5a0b0a2877c18a76fa1f508cacdbc08edf.zip op-kernel-dev-3b6baa5a0b0a2877c18a76fa1f508cacdbc08edf.tar.gz |
[ALSA] Remove delayed work properly at free and suspend
Remove delayed work properly at free and suspend in ac97 codec and
ak4114 drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/i2c/other')
-rw-r--r-- | sound/i2c/other/ak4114.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 34bbafc..d2b17c8 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c @@ -66,6 +66,7 @@ static void snd_ak4114_free(struct ak4114 *chip) { chip->init = 1; /* don't schedule new work */ mb(); + cancel_delayed_work(&chip->work); flush_scheduled_work(); kfree(chip); } @@ -97,6 +98,7 @@ int snd_ak4114_create(struct snd_card *card, chip->read = read; chip->write = write; chip->private_data = private_data; + INIT_DELAYED_WORK(&chip->work, ak4114_stats); for (reg = 0; reg < 7; reg++) chip->regmap[reg] = pgm[reg]; @@ -149,7 +151,6 @@ void snd_ak4114_reinit(struct ak4114 *chip) reg_write(chip, AK4114_REG_PWRDN, old | AK4114_RST | AK4114_PWN); /* bring up statistics / event queing */ chip->init = 0; - INIT_DELAYED_WORK(&chip->work, ak4114_stats); schedule_delayed_work(&chip->work, HZ / 10); } |