Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbcK0O6G (ORCPT ); Sun, 27 Nov 2016 09:58:06 -0500 Received: from netrider.rowland.org ([192.131.102.5]:55837 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751437AbcK0O57 (ORCPT ); Sun, 27 Nov 2016 09:57:59 -0500 Date: Sun, 27 Nov 2016 09:57:57 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: csmanjuvijay@gmail.com cc: Arnd Bergmann , Greg KH , Wan ZongShun , , Subject: Re: [PATCH] USB: EHCI: ehci-w90x900: remove unuseful functions In-Reply-To: <1480023764-4443-1-git-send-email-csmanjuvijay@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3246 Lines: 97 On Thu, 24 Nov 2016 csmanjuvijay@gmail.com wrote: > From: Manjunath Goudar > > The ehci_w90x900_probe function is not doing anything other than > calling usb_w90x900_probe function so ehci_w90x900_probe function > is unuseful that is why removed ehci_w90x900_probe functions and > renamed usb_w90x900_probe function to ehci_w90x900_probe for proper > naming. > > The ehci_w90x900_remove function is also not doing anything other > than calling usb_w90x900_remove that is why removed ehci_w90x900_remove > function and renamed usb_w90x900_remove to ehci_w90x900_remove for proper > naming. > > This also removes warning of checkpatch.pl script. > > Signed-off-by: Manjunath Goudar > Cc: Arnd Bergmann > Cc: Greg KH > Cc: Alan Stern > Cc: Wan ZongShun > Cc: linux-usb@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- Acked-by: Alan Stern > drivers/usb/host/ehci-w90x900.c | 30 ++++++++---------------------- > 1 file changed, 8 insertions(+), 22 deletions(-) > > diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c > index e42a29e..63b9d0c 100644 > --- a/drivers/usb/host/ehci-w90x900.c > +++ b/drivers/usb/host/ehci-w90x900.c > @@ -33,8 +33,7 @@ static const char hcd_name[] = "ehci-w90x900 "; > > static struct hc_driver __read_mostly ehci_w90x900_hc_driver; > > -static int usb_w90x900_probe(const struct hc_driver *driver, > - struct platform_device *pdev) > +static int ehci_w90x900_probe(struct platform_device *pdev) > { > struct usb_hcd *hcd; > struct ehci_hcd *ehci; > @@ -42,7 +41,8 @@ static int usb_w90x900_probe(const struct hc_driver *driver, > int retval = 0, irq; > unsigned long val; > > - hcd = usb_create_hcd(driver, &pdev->dev, "w90x900 EHCI"); > + hcd = usb_create_hcd(&ehci_w90x900_hc_driver, > + &pdev->dev, "w90x900 EHCI"); > if (!hcd) { > retval = -ENOMEM; > goto err1; > @@ -63,9 +63,9 @@ static int usb_w90x900_probe(const struct hc_driver *driver, > HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); > > /* enable PHY 0,1,the regs only apply to w90p910 > - * 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of > - * w90p910 IC relative to ehci->regs. > - */ > + * 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of > + * w90p910 IC relative to ehci->regs. > + */ > val = __raw_readl(ehci->regs+PHY0_CTR); > val |= ENPHY; > __raw_writel(val, ehci->regs+PHY0_CTR); > @@ -92,26 +92,12 @@ static int usb_w90x900_probe(const struct hc_driver *driver, > return retval; > } > > -static void usb_w90x900_remove(struct usb_hcd *hcd, > - struct platform_device *pdev) > -{ > - usb_remove_hcd(hcd); > - usb_put_hcd(hcd); > -} > - > -static int ehci_w90x900_probe(struct platform_device *pdev) > -{ > - if (usb_disabled()) > - return -ENODEV; > - > - return usb_w90x900_probe(&ehci_w90x900_hc_driver, pdev); > -} > - > static int ehci_w90x900_remove(struct platform_device *pdev) > { > struct usb_hcd *hcd = platform_get_drvdata(pdev); > > - usb_w90x900_remove(hcd, pdev); > + usb_remove_hcd(hcd); > + usb_put_hcd(hcd); > > return 0; > }