From patchwork Wed Dec 2 22:35:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 64371 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB2MaX6c025232 for ; Wed, 2 Dec 2009 22:36:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755918AbZLBWgZ (ORCPT ); Wed, 2 Dec 2009 17:36:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755914AbZLBWgZ (ORCPT ); Wed, 2 Dec 2009 17:36:25 -0500 Received: from smtp.nokia.com ([192.100.105.134]:60622 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755916AbZLBWgY (ORCPT ); Wed, 2 Dec 2009 17:36:24 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nB2Ma53a023106; Wed, 2 Dec 2009 16:36:30 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Dec 2009 00:36:14 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Dec 2009 00:36:14 +0200 Received: from localhost.localdomain (esdhcp04340.research.nokia.com [172.21.43.40]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nB2Ma5Fd032365; Thu, 3 Dec 2009 00:36:12 +0200 From: Felipe Balbi To: linux-omap@vger.kernel.org Cc: Tony Lindgren , Felipe Balbi Subject: [RFT/RFC/PATCH 05/10] cbus: tahvo-usb: make it build again Date: Thu, 3 Dec 2009 00:35:47 +0200 Message-Id: <1259793352-29864-6-git-send-email-felipe.balbi@nokia.com> X-Mailer: git-send-email 1.6.6.rc0 In-Reply-To: <1259793352-29864-1-git-send-email-felipe.balbi@nokia.com> References: <1259793352-29864-1-git-send-email-felipe.balbi@nokia.com> X-OriginalArrivalTime: 02 Dec 2009 22:36:14.0597 (UTC) FILETIME=[DB139B50:01CA739F] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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. */