diff mbox

[RFT/RFC/PATCH,05/10] cbus: tahvo-usb: make it build again

Message ID 1259793352-29864-6-git-send-email-felipe.balbi@nokia.com (mailing list archive)
State Accepted
Commit ea51ab278e51ec3ef596862aae4ec2b63e3e82ad
Delegated to: Tony Lindgren
Headers show

Commit Message

Felipe Balbi Dec. 2, 2009, 10:35 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c
index c08f08d..9f8bbcc 100644
--- a/drivers/cbus/tahvo-usb.c
+++ b/drivers/cbus/tahvo-usb.c
@@ -114,8 +114,8 @@  static struct platform_device *tahvo_otg_dev;
 
 static irqreturn_t omap_otg_irq(int irq, void *arg)
 {
-	struct platform_device *otg_dev = (struct platform_device *) arg;
-	struct tahvo_usb *tu = (struct tahvo_usb *) otg_dev->dev.driver_data;
+	struct platform_device *otg_dev = arg;
+	struct tahvo_usb *tu = platform_get_drvdata(otg_dev);
 	u16 otg_irq;
 
 	otg_irq = omap_readw(OTG_IRQ_SRC);
@@ -227,7 +227,7 @@  struct device_driver omap_otg_driver = {
 static ssize_t vbus_state_show(struct device *device,
 			       struct device_attribute *attr, char *buf)
 {
-	struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data;
+	struct tahvo_usb *tu = dev_get_drvdata(device);
 	return sprintf(buf, "%d\n", tu->vbus_state);
 }
 static DEVICE_ATTR(vbus_state, 0444, vbus_state_show, NULL);
@@ -590,7 +590,7 @@  static void tahvo_usb_vbus_interrupt(unsigned long arg)
 static ssize_t otg_mode_show(struct device *device,
 			     struct device_attribute *attr, char *buf)
 {
-	struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data;
+	struct tahvo_usb *tu = dev_get_drvdata(device);
 	switch (tu->tahvo_mode) {
 	case TAHVO_MODE_HOST:
 		return sprintf(buf, "host\n");
@@ -604,7 +604,7 @@  static ssize_t otg_mode_store(struct device *device,
 			      struct device_attribute *attr,
 			      const char *buf, size_t count)
 {
-	struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data;
+	struct tahvo_usb *tu = dev_get_drvdata(device);
 	int r;
 
 	r = strlen(buf);
@@ -706,7 +706,7 @@  static int tahvo_usb_probe(struct device *dev)
 		return ret;
 	}
 
-	dev->driver_data = tu;
+	dev_set_drvdata(dev, tu);
 
 	/* Act upon current vbus state once at startup. A vbus state irq may or
 	 * may not be generated in addition to this. */