diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-12-21 05:02:06 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:02:44 -0500 |
commit | 1321b160fa1cf63fa841d954fe31220366b6647a (patch) | |
tree | c0dad805816b4146cbe77ca77ffae94f772b552c /sound/soc | |
parent | 831466f4ad2b5fe23dff77edbe6a7c244435e973 (diff) |
[ALSA] soc - Fix delayed_work related changes on 2.6.20 kernel
Fix the changes realted to delayed_work in soc/codecs/wm8750.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8750.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 069b66cb18e0..e7f04b89c8a0 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -51,8 +51,6 @@ | |||
51 | #define warn(format, arg...) \ | 51 | #define warn(format, arg...) \ |
52 | printk(KERN_WARNING AUDIO_NAME ": " format "\n" , ## arg) | 52 | printk(KERN_WARNING AUDIO_NAME ": " format "\n" , ## arg) |
53 | 53 | ||
54 | static struct work_struct wm8750_dapm_work; | ||
55 | |||
56 | /* | 54 | /* |
57 | * wm8750 register cache | 55 | * wm8750 register cache |
58 | * We can't read the WM8750 register space when we | 56 | * We can't read the WM8750 register space when we |
@@ -1000,9 +998,10 @@ struct snd_soc_codec_dai wm8750_dai = { | |||
1000 | }; | 998 | }; |
1001 | EXPORT_SYMBOL_GPL(wm8750_dai); | 999 | EXPORT_SYMBOL_GPL(wm8750_dai); |
1002 | 1000 | ||
1003 | static void wm8750_work(void *data) | 1001 | static void wm8750_work(struct work_struct *work) |
1004 | { | 1002 | { |
1005 | struct snd_soc_codec *codec = (struct snd_soc_codec *)data; | 1003 | struct snd_soc_codec *codec = |
1004 | container_of(work, struct snd_soc_codec, delayed_work.work); | ||
1006 | wm8750_dapm_event(codec, codec->dapm_state); | 1005 | wm8750_dapm_event(codec, codec->dapm_state); |
1007 | } | 1006 | } |
1008 | 1007 | ||
@@ -1038,7 +1037,7 @@ static int wm8750_resume(struct platform_device *pdev) | |||
1038 | if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) { | 1037 | if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) { |
1039 | wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2); | 1038 | wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2); |
1040 | codec->dapm_state = SNDRV_CTL_POWER_D0; | 1039 | codec->dapm_state = SNDRV_CTL_POWER_D0; |
1041 | schedule_delayed_work(&wm8750_dapm_work, | 1040 | schedule_delayed_work(&codec->delayed_work, |
1042 | msecs_to_jiffies(1000)); | 1041 | msecs_to_jiffies(1000)); |
1043 | } | 1042 | } |
1044 | 1043 | ||
@@ -1083,7 +1082,7 @@ static int wm8750_init(struct snd_soc_device *socdev) | |||
1083 | /* charge output caps */ | 1082 | /* charge output caps */ |
1084 | wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2); | 1083 | wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2); |
1085 | codec->dapm_state = SNDRV_CTL_POWER_D3hot; | 1084 | codec->dapm_state = SNDRV_CTL_POWER_D3hot; |
1086 | schedule_delayed_work(&wm8750_dapm_work, msecs_to_jiffies(1000)); | 1085 | schedule_delayed_work(&codec->delayed_work, msecs_to_jiffies(1000)); |
1087 | 1086 | ||
1088 | /* set the update bits */ | 1087 | /* set the update bits */ |
1089 | reg = wm8750_read_reg_cache(codec, WM8750_LDAC); | 1088 | reg = wm8750_read_reg_cache(codec, WM8750_LDAC); |
@@ -1225,7 +1224,7 @@ static int wm8750_probe(struct platform_device *pdev) | |||
1225 | INIT_LIST_HEAD(&codec->dapm_widgets); | 1224 | INIT_LIST_HEAD(&codec->dapm_widgets); |
1226 | INIT_LIST_HEAD(&codec->dapm_paths); | 1225 | INIT_LIST_HEAD(&codec->dapm_paths); |
1227 | wm8750_socdev = socdev; | 1226 | wm8750_socdev = socdev; |
1228 | INIT_WORK(&wm8750_dapm_work, wm8750_work, codec); | 1227 | INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work); |
1229 | #if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) | 1228 | #if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) |
1230 | if (setup->i2c_address) { | 1229 | if (setup->i2c_address) { |
1231 | normal_i2c[0] = setup->i2c_address; | 1230 | normal_i2c[0] = setup->i2c_address; |