Commit c9e82b07 authored by Manjunath Goudar's avatar Manjunath Goudar Committed by Greg Kroah-Hartman

USB: OHCI: ohci-pxa27x: remove useless functions

The ohci_hcd_pxa27x_drv_probe function is not doing anything other
than calling usb_hcd_pxa27x_probe function so ohci_hcd_pxa27x_drv_probe
function is useless that is why removed ohci_hcd_pxa27x_drv_probe
function and renamed usb_hcd_pxa27x_probe function to
ohci_hcd_pxa27x_drv_probe for proper naming.

The ohci_hcd_pxa27x_remove function is also not doing anything other than
calling usb_hcd_pxa27x_remove that is why removed ohci_hcd_pxa27x_remove
function and renamed usb_hcd_pxa27x_remove to ohci_hcd_pxa27x_remove for
proper naming.
Signed-off-by: default avatarManjunath Goudar <csmanjuvijay@gmail.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 680811df
...@@ -404,7 +404,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev) ...@@ -404,7 +404,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev)
/** /**
* usb_hcd_pxa27x_probe - initialize pxa27x-based HCDs * ohci_hcd_pxa27x_probe - initialize pxa27x-based HCDs
* Context: !in_interrupt() * Context: !in_interrupt()
* *
* Allocates basic resources for this USB host controller, and * Allocates basic resources for this USB host controller, and
...@@ -412,7 +412,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev) ...@@ -412,7 +412,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev)
* through the hotplug entry's driver_data. * through the hotplug entry's driver_data.
* *
*/ */
int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device *pdev) static int ohci_hcd_pxa27x_probe(struct platform_device *pdev)
{ {
int retval, irq; int retval, irq;
struct usb_hcd *hcd; struct usb_hcd *hcd;
...@@ -442,7 +442,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device ...@@ -442,7 +442,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
if (IS_ERR(usb_clk)) if (IS_ERR(usb_clk))
return PTR_ERR(usb_clk); return PTR_ERR(usb_clk);
hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x"); hcd = usb_create_hcd(&ohci_pxa27x_hc_driver, &pdev->dev, "pxa27x");
if (!hcd) if (!hcd)
return -ENOMEM; return -ENOMEM;
...@@ -503,17 +503,18 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device ...@@ -503,17 +503,18 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
/* may be called with controller, bus, and devices active */ /* may be called with controller, bus, and devices active */
/** /**
* usb_hcd_pxa27x_remove - shutdown processing for pxa27x-based HCDs * ohci_hcd_pxa27x_remove - shutdown processing for pxa27x-based HCDs
* @dev: USB Host Controller being removed * @dev: USB Host Controller being removed
* Context: !in_interrupt() * Context: !in_interrupt()
* *
* Reverses the effect of usb_hcd_pxa27x_probe(), first invoking * Reverses the effect of ohci_hcd_pxa27x_probe(), first invoking
* the HCD's stop() method. It is always called from a thread * the HCD's stop() method. It is always called from a thread
* context, normally "rmmod", "apmd", or something similar. * context, normally "rmmod", "apmd", or something similar.
* *
*/ */
void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) static int ohci_hcd_pxa27x_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd);
unsigned int i; unsigned int i;
...@@ -524,28 +525,11 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) ...@@ -524,28 +525,11 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev)
pxa27x_ohci_set_vbus_power(pxa_ohci, i, false); pxa27x_ohci_set_vbus_power(pxa_ohci, i, false);
usb_put_hcd(hcd); usb_put_hcd(hcd);
return 0;
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int ohci_hcd_pxa27x_drv_probe(struct platform_device *pdev)
{
pr_debug ("In ohci_hcd_pxa27x_drv_probe");
if (usb_disabled())
return -ENODEV;
return usb_hcd_pxa27x_probe(&ohci_pxa27x_hc_driver, pdev);
}
static int ohci_hcd_pxa27x_drv_remove(struct platform_device *pdev)
{
struct usb_hcd *hcd = platform_get_drvdata(pdev);
usb_hcd_pxa27x_remove(hcd, pdev);
return 0;
}
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) static int ohci_hcd_pxa27x_drv_suspend(struct device *dev)
{ {
...@@ -598,8 +582,8 @@ static const struct dev_pm_ops ohci_hcd_pxa27x_pm_ops = { ...@@ -598,8 +582,8 @@ static const struct dev_pm_ops ohci_hcd_pxa27x_pm_ops = {
#endif #endif
static struct platform_driver ohci_hcd_pxa27x_driver = { static struct platform_driver ohci_hcd_pxa27x_driver = {
.probe = ohci_hcd_pxa27x_drv_probe, .probe = ohci_hcd_pxa27x_probe,
.remove = ohci_hcd_pxa27x_drv_remove, .remove = ohci_hcd_pxa27x_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
.driver = { .driver = {
.name = "pxa27x-ohci", .name = "pxa27x-ohci",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment