USB: EHCI: ehci-w90x900: remove unuseful functions
A message that is not in the archive (sent off-list or not yet received): [email protected]
Alan Stern
Acked-byQuoted 15 lines · On Thu, 24 Nov 2016 [email protected] wrote:
From: Manjunath Goudar <[email protected]>
The
ehci_w90x900_probefunction is not doing anything other than callingusb_w90x900_probefunction soehci_w90x900_probefunction is unuseful that is why removedehci_w90x900_probefunctions and renamedusb_w90x900_probefunction toehci_w90x900_probefor proper naming.The
ehci_w90x900_removefunction is also not doing anything other than callingusb_w90x900_removethat is why removedehci_w90x900_removefunction and renamedusb_w90x900_removetoehci_w90x900_removefor proper naming.This also removes warning of checkpatch.pl script.
Quoted 8 lines
Signed-off-by Manjunath Goudar <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc Wan ZongShun <[email protected]>---
Acked-by Alan Stern <[email protected]>
Quoted 69 lines
drivers/usb/host/ehci-w90x900.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-)drivers/usb/host/ehci-w90x900.c +8
-22@@ -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 ; }