USB: EHCI: ehci-w90x900: remove unuseful functions

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 <csmanjuvijay@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Manjunath Goudar 2016-11-24 21:42:44 +00:00 committed by Greg Kroah-Hartman
parent 96cad6ffa6
commit fd3ed14ed0
1 changed files with 8 additions and 22 deletions

View File

@ -33,8 +33,7 @@ static const char hcd_name[] = "ehci-w90x900 ";
static struct hc_driver __read_mostly ehci_w90x900_hc_driver; static struct hc_driver __read_mostly ehci_w90x900_hc_driver;
static int usb_w90x900_probe(const struct hc_driver *driver, static int ehci_w90x900_probe(struct platform_device *pdev)
struct platform_device *pdev)
{ {
struct usb_hcd *hcd; struct usb_hcd *hcd;
struct ehci_hcd *ehci; struct ehci_hcd *ehci;
@ -42,7 +41,8 @@ static int usb_w90x900_probe(const struct hc_driver *driver,
int retval = 0, irq; int retval = 0, irq;
unsigned long val; 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) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto err1; 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)); HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));
/* enable PHY 0,1,the regs only apply to w90p910 /* enable PHY 0,1,the regs only apply to w90p910
* 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of * 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of
* w90p910 IC relative to ehci->regs. * w90p910 IC relative to ehci->regs.
*/ */
val = __raw_readl(ehci->regs+PHY0_CTR); val = __raw_readl(ehci->regs+PHY0_CTR);
val |= ENPHY; val |= ENPHY;
__raw_writel(val, ehci->regs+PHY0_CTR); __raw_writel(val, ehci->regs+PHY0_CTR);
@ -92,26 +92,12 @@ err1:
return retval; 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) static int ehci_w90x900_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev); struct usb_hcd *hcd = platform_get_drvdata(pdev);
usb_w90x900_remove(hcd, pdev); usb_remove_hcd(hcd);
usb_put_hcd(hcd);
return 0; return 0;
} }