aboutsummaryrefslogtreecommitdiffstats
path: root/sound/aoa
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /sound/aoa
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'sound/aoa')
-rw-r--r--sound/aoa/aoa-gpio.h2
-rw-r--r--sound/aoa/core/snd-aoa-gpio-feature.c16
-rw-r--r--sound/aoa/core/snd-aoa-gpio-pmf.c16
3 files changed, 15 insertions, 19 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
61struct gpio_notification { 61struct 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
198static void ftr_handle_notify(void *data) 198static 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(&notif->mutex); 203 mutex_lock(&notif->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(&notif->work); 288 schedule_delayed_work(&notif->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
72static void pmf_handle_notify(void *data) 72static 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(&notif->mutex); 77 mutex_lock(&notif->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(&notif->work); 130 schedule_delayed_work(&notif->work, 0);
133} 131}
134 132
135static int pmf_set_notify(struct gpio_runtime *rt, 133static int pmf_set_notify(struct gpio_runtime *rt,