* [PATCH] ARM: OMAP: Workqueue changes for board-h4.c
@ 2007-01-04 15:54 Dirk Behme
2007-01-09 23:19 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Dirk Behme @ 2007-01-04 15:54 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 99 bytes --]
ARM: OMAP: Workqueue changes for board-h4.c
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
[-- Attachment #2: board_h4_workqueue_fix.txt --]
[-- Type: text/plain, Size: 1238 bytes --]
Index: linux-osk/arch/arm/mach-omap2/board-h4.c
===================================================================
--- linux-osk.orig/arch/arm/mach-omap2/board-h4.c
+++ linux-osk/arch/arm/mach-omap2/board-h4.c
@@ -164,9 +164,11 @@ static int h4_select_irda(struct device
return err;
}
-static void set_trans_mode(void *data)
+static void set_trans_mode(struct work_struct *work)
{
- int *mode = data;
+ struct omap_irda_config *irda_config =
+ container_of(work, struct omap_irda_config, gpio_expa.work);
+ int mode = irda_config->mode;
unsigned char expa;
int err = 0;
@@ -176,7 +178,7 @@ static void set_trans_mode(void *data)
expa &= ~0x01;
- if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */
+ if (!(mode & IR_SIRMODE)) { /* MIR/FIR */
expa |= 0x01;
}
@@ -189,9 +191,9 @@ static int h4_transceiver_mode(struct de
{
struct omap_irda_config *irda_config = dev->platform_data;
+ irda_config->mode = mode;
cancel_delayed_work(&irda_config->gpio_expa);
- PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
-#error this is not permitted - mode is an argument variable
+ PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
schedule_delayed_work(&irda_config->gpio_expa, 0);
return 0;
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: OMAP: Workqueue changes for board-h4.c
2007-01-04 15:54 [PATCH] ARM: OMAP: Workqueue changes for board-h4.c Dirk Behme
@ 2007-01-09 23:19 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2007-01-09 23:19 UTC (permalink / raw)
To: Dirk Behme; +Cc: linux-omap-open-source
* Dirk Behme <dirk.behme@googlemail.com> [070104 07:55]:
>
> ARM: OMAP: Workqueue changes for board-h4.c
>
> Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
>
> Index: linux-osk/arch/arm/mach-omap2/board-h4.c
> ===================================================================
> --- linux-osk.orig/arch/arm/mach-omap2/board-h4.c
> +++ linux-osk/arch/arm/mach-omap2/board-h4.c
> @@ -164,9 +164,11 @@ static int h4_select_irda(struct device
> return err;
> }
>
> -static void set_trans_mode(void *data)
> +static void set_trans_mode(struct work_struct *work)
> {
> - int *mode = data;
> + struct omap_irda_config *irda_config =
> + container_of(work, struct omap_irda_config, gpio_expa.work);
> + int mode = irda_config->mode;
> unsigned char expa;
> int err = 0;
>
> @@ -176,7 +178,7 @@ static void set_trans_mode(void *data)
>
> expa &= ~0x01;
>
> - if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */
> + if (!(mode & IR_SIRMODE)) { /* MIR/FIR */
> expa |= 0x01;
> }
>
> @@ -189,9 +191,9 @@ static int h4_transceiver_mode(struct de
> {
> struct omap_irda_config *irda_config = dev->platform_data;
>
> + irda_config->mode = mode;
> cancel_delayed_work(&irda_config->gpio_expa);
> - PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
> -#error this is not permitted - mode is an argument variable
> + PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
> schedule_delayed_work(&irda_config->gpio_expa, 0);
>
> return 0;
>
Pushing today.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-09 23:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04 15:54 [PATCH] ARM: OMAP: Workqueue changes for board-h4.c Dirk Behme
2007-01-09 23:19 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox