From patchwork Mon Aug 19 10:37:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 2846444 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBD54BF546 for ; Mon, 19 Aug 2013 10:49:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0880202E6 for ; Mon, 19 Aug 2013 10:49:25 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1DDA201B2 for ; Mon, 19 Aug 2013 10:49:20 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VBMt2-0001ne-Vt; Mon, 19 Aug 2013 10:40:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VBMsK-0001wq-Ie; Mon, 19 Aug 2013 10:39:52 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VBMrG-0001po-Tf for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2013 10:38:49 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7JAbs17015334; Mon, 19 Aug 2013 05:37:54 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7JAbsXN025811; Mon, 19 Aug 2013 05:37:54 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 19 Aug 2013 05:37:54 -0500 Received: from localhost.localdomain (h112-198.vpn.ti.com [172.24.112.198]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r7JAbmin020230; Mon, 19 Aug 2013 05:37:52 -0500 From: Roger Quadros To: , Subject: [PATCH v4 1/8] usb: phy: omap-control: Get rid of platform data Date: Mon, 19 Aug 2013 13:37:40 +0300 Message-ID: <1376908667-14974-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1376908667-14974-1-git-send-email-rogerq@ti.com> References: <1376908667-14974-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130819_063847_114330_2DD0DCB3 X-CRM114-Status: GOOD ( 10.69 ) X-Spam-Score: -9.7 (---------) Cc: devicetree@vger.kernel.org, george.cherian@ti.com, tony@atomide.com, bigeasy@linutronix.de, linux-usb@vger.kernel.org, kishon@ti.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP omap-control device is present from OMAP4 onwards which support device tree boots only. So get rid of platform data. Signed-off-by: Roger Quadros --- drivers/usb/phy/phy-omap-control.c | 18 +++++++----------- include/linux/usb/omap_control_usb.h | 4 ---- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c index a4dda8e..7f446c4 100644 --- a/drivers/usb/phy/phy-omap-control.c +++ b/drivers/usb/phy/phy-omap-control.c @@ -197,8 +197,13 @@ static int omap_control_usb_probe(struct platform_device *pdev) { struct resource *res; struct device_node *np = pdev->dev.of_node; - struct omap_control_usb_platform_data *pdata = - dev_get_platdata(&pdev->dev); + + if (np) { + of_property_read_u32(np, "ti,type", &control_usb->type); + } else { + /* We only support DT boot */ + return -EINVAL; + } control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb), GFP_KERNEL); @@ -207,15 +212,6 @@ static int omap_control_usb_probe(struct platform_device *pdev) return -ENOMEM; } - if (np) { - of_property_read_u32(np, "ti,type", &control_usb->type); - } else if (pdata) { - control_usb->type = pdata->type; - } else { - dev_err(&pdev->dev, "no pdata present\n"); - return -EINVAL; - } - control_usb->dev = &pdev->dev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h index 27b5b8c..e2416b4 100644 --- a/include/linux/usb/omap_control_usb.h +++ b/include/linux/usb/omap_control_usb.h @@ -31,10 +31,6 @@ struct omap_control_usb { u32 type; }; -struct omap_control_usb_platform_data { - u8 type; -}; - enum omap_control_usb_mode { USB_MODE_UNDEFINED = 0, USB_MODE_HOST,