diff options
author | Dirk Behme <dirk.behme_at_gmail.com> | 2007-01-25 19:29:17 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2007-03-02 04:47:12 -0500 |
commit | 060ebf97b4d0000e63f7db1c1d12cb3dca5cd446 (patch) | |
tree | 784a83067860609691c6a4aff99e59f154a67f3a /arch/arm/mach-omap2 | |
parent | 53037f4c1009c9cf5e6c95a616d1952a240f6540 (diff) |
ARM: OMAP: Workqueue changes for board-h4.c
Workqueue changes for board-h4.c
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 3b1ad1d981a3..924dea54e16d 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -179,9 +179,11 @@ static int h4_select_irda(struct device *dev, int state) | |||
179 | return err; | 179 | return err; |
180 | } | 180 | } |
181 | 181 | ||
182 | static void set_trans_mode(void *data) | 182 | static void set_trans_mode(struct work_struct *work) |
183 | { | 183 | { |
184 | int *mode = data; | 184 | struct omap_irda_config *irda_config = |
185 | container_of(work, struct omap_irda_config, gpio_expa.work); | ||
186 | int mode = irda_config->mode; | ||
185 | unsigned char expa; | 187 | unsigned char expa; |
186 | int err = 0; | 188 | int err = 0; |
187 | 189 | ||
@@ -191,7 +193,7 @@ static void set_trans_mode(void *data) | |||
191 | 193 | ||
192 | expa &= ~0x01; | 194 | expa &= ~0x01; |
193 | 195 | ||
194 | if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */ | 196 | if (!(mode & IR_SIRMODE)) { /* MIR/FIR */ |
195 | expa |= 0x01; | 197 | expa |= 0x01; |
196 | } | 198 | } |
197 | 199 | ||
@@ -204,9 +206,9 @@ static int h4_transceiver_mode(struct device *dev, int mode) | |||
204 | { | 206 | { |
205 | struct omap_irda_config *irda_config = dev->platform_data; | 207 | struct omap_irda_config *irda_config = dev->platform_data; |
206 | 208 | ||
209 | irda_config->mode = mode; | ||
207 | cancel_delayed_work(&irda_config->gpio_expa); | 210 | cancel_delayed_work(&irda_config->gpio_expa); |
208 | PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); | 211 | PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode); |
209 | #error this is not permitted - mode is an argument variable | ||
210 | schedule_delayed_work(&irda_config->gpio_expa, 0); | 212 | schedule_delayed_work(&irda_config->gpio_expa, 0); |
211 | 213 | ||
212 | return 0; | 214 | return 0; |