Skip to contentSkip to conversation

musb_hdrc workqueue build fix

PATCH In review David Brownell 2 participants 2 messages Jan 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 musb_hdrc workqueue build fix

Yet another workqueue-api-changed build fix.

drivers/usb/musb/plat_uds.c +3 -3
@@ -1561,9 +1561,9 @@ static DEVICE_ATTR(cable, S_IRUGO, musb_
 #endif
 
 /* Only used to provide cable state change events */
-static void musb_irq_work(void *data)
+static void musb_irq_work(struct work_struct *data)
 {
-	struct musb *musb = (struct musb *)data;
+	struct musb *musb = container_of(data, struct musb, irq_work);
 
 	sysfs_notify(&musb->controller->kobj, NULL, "cable");
 }
@@ -1835,7 +1835,7 @@ fail:
 		return status;
 	}
 
-	INIT_WORK(&pThis->irq_work, musb_irq_work, pThis);
+	INIT_WORK(&pThis->irq_work, musb_irq_work);
 
 #ifdef CONFIG_SYSFS
 	status = device_create_file(dev, &dev_attr_mode);
#1 lore raw
Quoted 19 lines · David Brownell

Yet another workqueue-api-changed build fix.

drivers/usb/musb/plat_uds.c +2 -2
@@ -1561,9 +1561,9 @@ static DEVICE_ATTR(cable, S_IRUGO, musb_
 #endif
 
 /* Only used to provide cable state change events */
-static void musb_irq_work(void *data)
+static void musb_irq_work(struct work_struct *data)
 {
-	struct musb *musb = (struct musb *)data;
+	struct musb *musb = container_of(data, struct musb, irq_work);
 
 	sysfs_notify(&musb->controller->kobj, NULL, "cable");
 }

drivers/usb/musb/plat_uds.c fail: · line 1841

Quoted 8 lines
drivers/usb/musb/plat_uds.c +1 -1
@@ -1835,7 +1835,7 @@ fail:
 		return status;
 	}
 
-	INIT_WORK(&pThis->irq_work, musb_irq_work, pThis);
+	INIT_WORK(&pThis->irq_work, musb_irq_work);
 
 #ifdef CONFIG_SYSFS
 	status = device_create_file(dev, &dev_attr_mode);

Pushed.

Tony