From b890864df5723d4da216fb28456ebe3c0b547824 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 12 Dec 2006 23:02:43 -0800 Subject: [PATCH] ARM: OMAP: Update omap2 for INIT_WORK, add missing header Update omap2 for INIT_WORK, add missing header Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/clock.c | 1 + arch/arm/plat-omap/gpio-switch.c | 6 +++--- arch/arm/plat-omap/mailbox.c | 7 ++++--- include/asm-arm/arch-omap/gpmc.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index c48c0ac..0306507 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -27,6 +27,7 @@ #include #include +#include #include "prcm-regs.h" #include "memory.h" diff --git a/arch/arm/plat-omap/gpio-switch.c b/arch/arm/plat-omap/gpio-switch.c index 7cf47cc..498e121 100644 --- a/arch/arm/plat-omap/gpio-switch.c +++ b/arch/arm/plat-omap/gpio-switch.c @@ -218,9 +218,9 @@ static void gpio_sw_timer(unsigned long arg) schedule_work(&sw->work); } -static void gpio_sw_handler(void *data) +static void gpio_sw_handler(struct work_struct *work) { - struct gpio_switch *sw = data; + struct gpio_switch *sw = container_of(work, struct gpio_switch, work); int state; state = gpio_sw_get_state(sw); @@ -319,7 +319,7 @@ static int __init new_switch(struct gpio_switch *sw) return r; } - INIT_WORK(&sw->work, gpio_sw_handler, sw); + INIT_WORK(&sw->work, gpio_sw_handler); init_timer(&sw->timer); sw->timer.function = gpio_sw_timer; diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 723c92f..a159411 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -109,9 +109,10 @@ EXPORT_SYMBOL(omap_mbox_msg_send); /* * Message receiver(workqueue) */ -static void mbox_msg_receiver(void *p) +static void mbox_msg_receiver(struct work_struct *work) { - struct omap_mbox *mbox = (struct omap_mbox *)p; + struct omap_mbox *mbox = + container_of(work, struct omap_mbox, msg_receive); struct omap_mbq *mbq = mbox->mbq; mbox_msg_t msg; int was_full; @@ -239,7 +240,7 @@ static int omap_mbox_init(struct omap_mbox *mbox) } spin_lock_init(&mbox->lock); - INIT_WORK(&mbox->msg_receive, mbox_msg_receiver, mbox); + INIT_WORK(&mbox->msg_receive, mbox_msg_receiver); init_waitqueue_head(&mbox->tx_waitq); ret = mbq_init(&mbox->mbq); diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h index c49b262..434672d 100644 --- a/include/asm-arm/arch-omap/gpmc.h +++ b/include/asm-arm/arch-omap/gpmc.h @@ -88,7 +88,7 @@ extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk); extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base); extern void gpmc_cs_free(int cs); -extern void gpmc_cs_set_reserved(int cs, int reserved); +extern int gpmc_cs_set_reserved(int cs, int reserved); extern int gpmc_cs_reserved(int cs); #endif -- 1.4.4.2