diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
commit | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch) | |
tree | 1c4c89652c62a75da09f9b9442012007e4ac6250 /sound | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/aoa/aoa-gpio.h | 2 | ||||
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-feature.c | 16 | ||||
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-pmf.c | 16 | ||||
-rw-r--r-- | sound/i2c/other/ak4114.c | 8 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 1 | ||||
-rw-r--r-- | sound/ppc/tumbler.c | 8 |
8 files changed, 35 insertions, 33 deletions
diff --git a/sound/aoa/aoa-gpio.h b/sound/aoa/aoa-gpio.h index 3a61f3115573..ee64f5de8966 100644 --- a/sound/aoa/aoa-gpio.h +++ b/sound/aoa/aoa-gpio.h | |||
@@ -59,10 +59,10 @@ struct gpio_methods { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct gpio_notification { | 61 | struct gpio_notification { |
62 | struct delayed_work work; | ||
62 | notify_func_t notify; | 63 | notify_func_t notify; |
63 | void *data; | 64 | void *data; |
64 | void *gpio_private; | 65 | void *gpio_private; |
65 | struct work_struct work; | ||
66 | struct mutex mutex; | 66 | struct mutex mutex; |
67 | }; | 67 | }; |
68 | 68 | ||
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c index 40eb47eccf9a..2b03bc798bcb 100644 --- a/sound/aoa/core/snd-aoa-gpio-feature.c +++ b/sound/aoa/core/snd-aoa-gpio-feature.c | |||
@@ -195,9 +195,10 @@ static void ftr_gpio_all_amps_restore(struct gpio_runtime *rt) | |||
195 | ftr_gpio_set_lineout(rt, (s>>2)&1); | 195 | ftr_gpio_set_lineout(rt, (s>>2)&1); |
196 | } | 196 | } |
197 | 197 | ||
198 | static void ftr_handle_notify(void *data) | 198 | static void ftr_handle_notify(struct work_struct *work) |
199 | { | 199 | { |
200 | struct gpio_notification *notif = data; | 200 | struct gpio_notification *notif = |
201 | container_of(work, struct gpio_notification, work.work); | ||
201 | 202 | ||
202 | mutex_lock(¬if->mutex); | 203 | mutex_lock(¬if->mutex); |
203 | if (notif->notify) | 204 | if (notif->notify) |
@@ -253,12 +254,9 @@ static void ftr_gpio_init(struct gpio_runtime *rt) | |||
253 | 254 | ||
254 | ftr_gpio_all_amps_off(rt); | 255 | ftr_gpio_all_amps_off(rt); |
255 | rt->implementation_private = 0; | 256 | rt->implementation_private = 0; |
256 | INIT_WORK(&rt->headphone_notify.work, ftr_handle_notify, | 257 | INIT_DELAYED_WORK(&rt->headphone_notify.work, ftr_handle_notify); |
257 | &rt->headphone_notify); | 258 | INIT_DELAYED_WORK(&rt->line_in_notify.work, ftr_handle_notify); |
258 | INIT_WORK(&rt->line_in_notify.work, ftr_handle_notify, | 259 | INIT_DELAYED_WORK(&rt->line_out_notify.work, ftr_handle_notify); |
259 | &rt->line_in_notify); | ||
260 | INIT_WORK(&rt->line_out_notify.work, ftr_handle_notify, | ||
261 | &rt->line_out_notify); | ||
262 | mutex_init(&rt->headphone_notify.mutex); | 260 | mutex_init(&rt->headphone_notify.mutex); |
263 | mutex_init(&rt->line_in_notify.mutex); | 261 | mutex_init(&rt->line_in_notify.mutex); |
264 | mutex_init(&rt->line_out_notify.mutex); | 262 | mutex_init(&rt->line_out_notify.mutex); |
@@ -287,7 +285,7 @@ static irqreturn_t ftr_handle_notify_irq(int xx, void *data) | |||
287 | { | 285 | { |
288 | struct gpio_notification *notif = data; | 286 | struct gpio_notification *notif = data; |
289 | 287 | ||
290 | schedule_work(¬if->work); | 288 | schedule_delayed_work(¬if->work, 0); |
291 | 289 | ||
292 | return IRQ_HANDLED; | 290 | return IRQ_HANDLED; |
293 | } | 291 | } |
diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c index 2836c3218391..5ca2220eac7d 100644 --- a/sound/aoa/core/snd-aoa-gpio-pmf.c +++ b/sound/aoa/core/snd-aoa-gpio-pmf.c | |||
@@ -69,9 +69,10 @@ static void pmf_gpio_all_amps_restore(struct gpio_runtime *rt) | |||
69 | pmf_gpio_set_lineout(rt, (s>>2)&1); | 69 | pmf_gpio_set_lineout(rt, (s>>2)&1); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void pmf_handle_notify(void *data) | 72 | static void pmf_handle_notify(struct work_struct *work) |
73 | { | 73 | { |
74 | struct gpio_notification *notif = data; | 74 | struct gpio_notification *notif = |
75 | container_of(work, struct gpio_notification, work.work); | ||
75 | 76 | ||
76 | mutex_lock(¬if->mutex); | 77 | mutex_lock(¬if->mutex); |
77 | if (notif->notify) | 78 | if (notif->notify) |
@@ -83,12 +84,9 @@ static void pmf_gpio_init(struct gpio_runtime *rt) | |||
83 | { | 84 | { |
84 | pmf_gpio_all_amps_off(rt); | 85 | pmf_gpio_all_amps_off(rt); |
85 | rt->implementation_private = 0; | 86 | rt->implementation_private = 0; |
86 | INIT_WORK(&rt->headphone_notify.work, pmf_handle_notify, | 87 | INIT_DELAYED_WORK(&rt->headphone_notify.work, pmf_handle_notify); |
87 | &rt->headphone_notify); | 88 | INIT_DELAYED_WORK(&rt->line_in_notify.work, pmf_handle_notify); |
88 | INIT_WORK(&rt->line_in_notify.work, pmf_handle_notify, | 89 | INIT_DELAYED_WORK(&rt->line_out_notify.work, pmf_handle_notify); |
89 | &rt->line_in_notify); | ||
90 | INIT_WORK(&rt->line_out_notify.work, pmf_handle_notify, | ||
91 | &rt->line_out_notify); | ||
92 | mutex_init(&rt->headphone_notify.mutex); | 90 | mutex_init(&rt->headphone_notify.mutex); |
93 | mutex_init(&rt->line_in_notify.mutex); | 91 | mutex_init(&rt->line_in_notify.mutex); |
94 | mutex_init(&rt->line_out_notify.mutex); | 92 | mutex_init(&rt->line_out_notify.mutex); |
@@ -129,7 +127,7 @@ static void pmf_handle_notify_irq(void *data) | |||
129 | { | 127 | { |
130 | struct gpio_notification *notif = data; | 128 | struct gpio_notification *notif = data; |
131 | 129 | ||
132 | schedule_work(¬if->work); | 130 | schedule_delayed_work(¬if->work, 0); |
133 | } | 131 | } |
134 | 132 | ||
135 | static int pmf_set_notify(struct gpio_runtime *rt, | 133 | static int pmf_set_notify(struct gpio_runtime *rt, |
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 12ffffc9e814..d2f2c5078e65 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
@@ -35,7 +35,7 @@ MODULE_LICENSE("GPL"); | |||
35 | 35 | ||
36 | #define AK4114_ADDR 0x00 /* fixed address */ | 36 | #define AK4114_ADDR 0x00 /* fixed address */ |
37 | 37 | ||
38 | static void ak4114_stats(void *); | 38 | static void ak4114_stats(struct work_struct *work); |
39 | 39 | ||
40 | static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val) | 40 | static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val) |
41 | { | 41 | { |
@@ -158,7 +158,7 @@ void snd_ak4114_reinit(struct ak4114 *chip) | |||
158 | reg_write(chip, AK4114_REG_PWRDN, old | AK4114_RST | AK4114_PWN); | 158 | reg_write(chip, AK4114_REG_PWRDN, old | AK4114_RST | AK4114_PWN); |
159 | /* bring up statistics / event queing */ | 159 | /* bring up statistics / event queing */ |
160 | chip->init = 0; | 160 | chip->init = 0; |
161 | INIT_WORK(&chip->work, ak4114_stats, chip); | 161 | INIT_DELAYED_WORK(&chip->work, ak4114_stats); |
162 | queue_delayed_work(chip->workqueue, &chip->work, HZ / 10); | 162 | queue_delayed_work(chip->workqueue, &chip->work, HZ / 10); |
163 | } | 163 | } |
164 | 164 | ||
@@ -561,9 +561,9 @@ int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags) | |||
561 | return res; | 561 | return res; |
562 | } | 562 | } |
563 | 563 | ||
564 | static void ak4114_stats(void *data) | 564 | static void ak4114_stats(struct work_struct *work) |
565 | { | 565 | { |
566 | struct ak4114 *chip = (struct ak4114 *)data; | 566 | struct ak4114 *chip = container_of(work, struct ak4114, work.work); |
567 | 567 | ||
568 | if (chip->init) | 568 | if (chip->init) |
569 | return; | 569 | return; |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 6577b2325357..7abcb10b2754 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1927,9 +1927,10 @@ static int snd_ac97_dev_disconnect(struct snd_device *device) | |||
1927 | static struct snd_ac97_build_ops null_build_ops; | 1927 | static struct snd_ac97_build_ops null_build_ops; |
1928 | 1928 | ||
1929 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 1929 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
1930 | static void do_update_power(void *data) | 1930 | static void do_update_power(struct work_struct *work) |
1931 | { | 1931 | { |
1932 | update_power_regs(data); | 1932 | update_power_regs( |
1933 | container_of(work, struct snd_ac97, power_work.work)); | ||
1933 | } | 1934 | } |
1934 | #endif | 1935 | #endif |
1935 | 1936 | ||
@@ -1989,7 +1990,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, | |||
1989 | mutex_init(&ac97->page_mutex); | 1990 | mutex_init(&ac97->page_mutex); |
1990 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 1991 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
1991 | ac97->power_workq = create_workqueue("ac97"); | 1992 | ac97->power_workq = create_workqueue("ac97"); |
1992 | INIT_WORK(&ac97->power_work, do_update_power, ac97); | 1993 | INIT_DELAYED_WORK(&ac97->power_work, do_update_power); |
1993 | #endif | 1994 | #endif |
1994 | 1995 | ||
1995 | #ifdef CONFIG_PCI | 1996 | #ifdef CONFIG_PCI |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 9c3d7ac08068..71482c15a852 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -272,10 +272,11 @@ EXPORT_SYMBOL(snd_hda_queue_unsol_event); | |||
272 | /* | 272 | /* |
273 | * process queueud unsolicited events | 273 | * process queueud unsolicited events |
274 | */ | 274 | */ |
275 | static void process_unsol_events(void *data) | 275 | static void process_unsol_events(struct work_struct *work) |
276 | { | 276 | { |
277 | struct hda_bus *bus = data; | 277 | struct hda_bus_unsolicited *unsol = |
278 | struct hda_bus_unsolicited *unsol = bus->unsol; | 278 | container_of(work, struct hda_bus_unsolicited, work); |
279 | struct hda_bus *bus = unsol->bus; | ||
279 | struct hda_codec *codec; | 280 | struct hda_codec *codec; |
280 | unsigned int rp, caddr, res; | 281 | unsigned int rp, caddr, res; |
281 | 282 | ||
@@ -314,7 +315,8 @@ static int init_unsol_queue(struct hda_bus *bus) | |||
314 | kfree(unsol); | 315 | kfree(unsol); |
315 | return -ENOMEM; | 316 | return -ENOMEM; |
316 | } | 317 | } |
317 | INIT_WORK(&unsol->work, process_unsol_events, bus); | 318 | INIT_WORK(&unsol->work, process_unsol_events); |
319 | unsol->bus = bus; | ||
318 | bus->unsol = unsol; | 320 | bus->unsol = unsol; |
319 | return 0; | 321 | return 0; |
320 | } | 322 | } |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index f9416c36396e..9ca1baf860bd 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -206,6 +206,7 @@ struct hda_bus_unsolicited { | |||
206 | /* workqueue */ | 206 | /* workqueue */ |
207 | struct workqueue_struct *workq; | 207 | struct workqueue_struct *workq; |
208 | struct work_struct work; | 208 | struct work_struct work; |
209 | struct hda_bus *bus; | ||
209 | }; | 210 | }; |
210 | 211 | ||
211 | /* | 212 | /* |
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 2fbe1d183fce..8f074c7936e6 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c | |||
@@ -942,10 +942,11 @@ static void check_mute(struct snd_pmac *chip, struct pmac_gpio *gp, int val, int | |||
942 | } | 942 | } |
943 | 943 | ||
944 | static struct work_struct device_change; | 944 | static struct work_struct device_change; |
945 | static struct snd_pmac *device_change_chip; | ||
945 | 946 | ||
946 | static void device_change_handler(void *self) | 947 | static void device_change_handler(struct work_struct *work) |
947 | { | 948 | { |
948 | struct snd_pmac *chip = self; | 949 | struct snd_pmac *chip = device_change_chip; |
949 | struct pmac_tumbler *mix; | 950 | struct pmac_tumbler *mix; |
950 | int headphone, lineout; | 951 | int headphone, lineout; |
951 | 952 | ||
@@ -1417,7 +1418,8 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip) | |||
1417 | chip->resume = tumbler_resume; | 1418 | chip->resume = tumbler_resume; |
1418 | #endif | 1419 | #endif |
1419 | 1420 | ||
1420 | INIT_WORK(&device_change, device_change_handler, (void *)chip); | 1421 | INIT_WORK(&device_change, device_change_handler); |
1422 | device_change_chip = chip; | ||
1421 | 1423 | ||
1422 | #ifdef PMAC_SUPPORT_AUTOMUTE | 1424 | #ifdef PMAC_SUPPORT_AUTOMUTE |
1423 | if ((mix->headphone_irq >=0 || mix->lineout_irq >= 0) | 1425 | if ((mix->headphone_irq >=0 || mix->lineout_irq >= 0) |