aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-h4.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-03-02 11:59:16 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-03-02 12:04:16 +0000
commit6139dbbb7769c7251e04813f577454c6c9293e15 (patch)
tree588b44b4b8929caf812d440ec371331658fd7da3 /arch/arm/mach-omap2/board-h4.c
parent[ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system (diff)
parentARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2 (diff)
downloadlinux-dev-6139dbbb7769c7251e04813f577454c6c9293e15.tar.xz
linux-dev-6139dbbb7769c7251e04813f577454c6c9293e15.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-omap2/board-h4.c')
-rw-r--r--arch/arm/mach-omap2/board-h4.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 3b1ad1d981a3..1e7ed6d22ca9 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -39,7 +39,6 @@
#include "prcm-regs.h"
#include <asm/io.h>
-#include <asm/delay.h>
static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
@@ -179,9 +178,11 @@ static int h4_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;
@@ -191,7 +192,7 @@ static void set_trans_mode(void *data)
expa &= ~0x01;
- if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */
+ if (!(mode & IR_SIRMODE)) { /* MIR/FIR */
expa |= 0x01;
}
@@ -204,9 +205,9 @@ static int h4_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;