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

2009-12-02 Thread Felipe Balbi
plenty of legacy code sitting there. Make it build
again. Later patches will come to clean that up.

Signed-off-by: Felipe Balbi 
---
 drivers/cbus/tahvo-usb.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

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. */
-- 
1.6.6.rc0

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2009-12-02 Thread Felipe Balbi
plenty of legacy code sitting there. Make it build
again. Later patches will come to clean that up.

Signed-off-by: Felipe Balbi 
---
 drivers/cbus/tahvo-usb.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

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. */
-- 
1.6.6.rc0

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2009-12-08 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: cbus

Initial commit ID (Likely to change): ea51ab278e51ec3ef596862aae4ec2b63e3e82ad

PatchWorks
http://patchwork.kernel.org/patch/64371/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=ea51ab278e51ec3ef596862aae4ec2b63e3e82ad


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html