diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-08-25 12:38:47 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-08-25 12:38:47 +0100 |
commit | d555dd5065ab6dd4437c609950c5d9c6377b4896 (patch) | |
tree | a2335e9d68a74cb833964ba9617d7279b98a6cdd /arch/arm/mach-omap1/board-h3.c | |
parent | 9d84588bdb72b6ec9d891fbdaa4305023e16ee3a (diff) | |
parent | 671c7235ccd537f828986ef5a4071bf477541dc0 (diff) | |
download | kernel-crypto-d555dd5065ab6dd4437c609950c5d9c6377b4896.tar.gz kernel-crypto-d555dd5065ab6dd4437c609950c5d9c6377b4896.tar.xz kernel-crypto-d555dd5065ab6dd4437c609950c5d9c6377b4896.zip |
Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
Diffstat (limited to 'arch/arm/mach-omap1/board-h3.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 7b260b7c537..79d4ef4c54d 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -294,9 +294,11 @@ static int h3_select_irda(struct device *dev, int state) 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; @@ -306,7 +308,7 @@ static void set_trans_mode(void *data) expa &= ~0x03; - if (*mode & IR_SIRMODE) { + if (mode & IR_SIRMODE) { expa |= 0x01; } else { /* MIR/FIR */ expa |= 0x03; @@ -321,9 +323,9 @@ static int h3_transceiver_mode(struct device *dev, int mode) { 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; |