Skip to contentSkip to conversation

ARM: OMAP: Workqueue changes for tahvo-usb

PATCH In review Dirk Behme 2 participants 2 messages Jan 4, 2007 – Jan 9, 2007

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Workqueue changes for tahvo-usb

ARM: OMAP: Workqueue changes for tahvo-usb.c

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
drivers/cbus/tahvo-usb.c +3 -3
Index: linux-osk/drivers/cbus/tahvo-usb.c
===================================================================
@@ -535,9 +535,9 @@ static int tahvo_usb_set_peripheral(stru
 	return 0;
 }
 
-static void tahvo_usb_irq_work(void *data)
+static void tahvo_usb_irq_work(struct work_struct *work)
 {
-	struct tahvo_usb *tu = (struct tahvo_usb *)data;
+	struct tahvo_usb *tu = container_of(work, struct tahvo_usb, irq_work);
 
 	mutex_lock(&tu->serialize);
 	check_vbus_state(tu);
@@ -631,7 +631,7 @@ static int tahvo_usb_probe(struct device
 #endif
 #endif
 
-	INIT_WORK(&tu->irq_work, tahvo_usb_irq_work, tu);
+	INIT_WORK(&tu->irq_work, tahvo_usb_irq_work);
 	mutex_init(&tu->serialize);
 
 	/* Set initial state, so that we generate kevents only on
#1 lore raw
Quoted 24 lines · Dirk Behme

ARM: OMAP: Workqueue changes for tahvo-usb.c

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>

Index: linux-osk/drivers/cbus/tahvo-usb.c
===================================================================

drivers/cbus/tahvo-usb.c +2 -2
@@ -535,9 +535,9 @@ static int tahvo_usb_set_peripheral(stru
 	return 0;
 }
 
-static void tahvo_usb_irq_work(void *data)
+static void tahvo_usb_irq_work(struct work_struct *work)
 {
-	struct tahvo_usb *tu = (struct tahvo_usb *)data;
+	struct tahvo_usb *tu = container_of(work, struct tahvo_usb, irq_work);
 
 	mutex_lock(&tu->serialize);
 	check_vbus_state(tu);

drivers/cbus/tahvo-usb.c static int tahvo_usb_probe(struct device · line 637

Quoted 8 lines
drivers/cbus/tahvo-usb.c +1 -1
@@ -631,7 +631,7 @@ static int tahvo_usb_probe(struct device
 #endif
 #endif
 
-	INIT_WORK(&tu->irq_work, tahvo_usb_irq_work, tu);
+	INIT_WORK(&tu->irq_work, tahvo_usb_irq_work);
 	mutex_init(&tu->serialize);
 
 	/* Set initial state, so that we generate kevents only on

Pushing today.

Tony