]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Fix workqueue changes for menelaus.c
authorKomal Shah <komal.shah802003@gmail.com>
Tue, 2 Jan 2007 19:51:29 +0000 (11:51 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 2 Jan 2007 19:51:29 +0000 (11:51 -0800)
Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/menelaus.c

index aeb789cf8aba0808e6be1fce6166aca93bdfc1df..79e9625ad9d9a8e6b4a0e88ef69f8a1d12147241 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/interrupt.h>
 #include <linux/sched.h>
 #include <linux/mutex.h>
+#include <linux/workqueue.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/irq.h>
 #define MENELAUS_RESERVED14_IRQ                14      /* Reserved */
 #define MENELAUS_RESERVED15_IRQ                15      /* Reserved */
 
-static void menelaus_work(void * _menelaus);
+static void menelaus_work(struct work_struct *_menelaus);
 
 /* Initialized by menelaus_init */
 static unsigned short normal_i2c[] = { MENELAUS_I2C_ADDRESS, I2C_CLIENT_END };
@@ -643,9 +644,10 @@ EXPORT_SYMBOL(menelaus_get_slot_pin_states);
 /*-----------------------------------------------------------------------*/
 
 /* Handles Menelaus interrupts. Does not run in interrupt context */
-static void menelaus_work(void * _menelaus)
+static void menelaus_work(struct work_struct *_menelaus)
 {
-       struct menelaus_chip *menelaus = _menelaus;
+       struct menelaus_chip *menelaus =
+                       container_of(_menelaus, struct menelaus_chip, work);
        int (*handler)(struct menelaus_chip *menelaus);
 
        while (1) {
@@ -739,7 +741,7 @@ static int menelaus_probe(struct i2c_adapter *adapter, int address, int kind)
        }
 
        mutex_init(&menelaus.lock);
-       INIT_WORK(&menelaus.work, menelaus_work, &menelaus);
+       INIT_WORK(&menelaus.work, menelaus_work);
 
        if (kind < 0)
                pr_info("Menelaus rev %d.%d\n", rev >> 4, rev & 0x0f);