diff options
author | Manjunath Goudar <csmanjuvijay@gmail.com> | 2016-12-01 16:23:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-12-05 10:32:51 -0500 |
commit | c9e82b076f17f6e88fcacc4ccc3daa603e0b4658 (patch) | |
tree | f027c63dc92977ba9fa10db6ba9c1acee7dbd629 | |
parent | 680811dfec5d84e5720ef2adebe8eb64a4e094da (diff) |
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: Manjunath Goudar <csmanjuvijay@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index a667cf2d5788..79efde8f21e0 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -404,7 +404,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev) | |||
404 | 404 | ||
405 | 405 | ||
406 | /** | 406 | /** |
407 | * usb_hcd_pxa27x_probe - initialize pxa27x-based HCDs | 407 | * ohci_hcd_pxa27x_probe - initialize pxa27x-based HCDs |
408 | * Context: !in_interrupt() | 408 | * Context: !in_interrupt() |
409 | * | 409 | * |
410 | * Allocates basic resources for this USB host controller, and | 410 | * Allocates basic resources for this USB host controller, and |
@@ -412,7 +412,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev) | |||
412 | * through the hotplug entry's driver_data. | 412 | * through the hotplug entry's driver_data. |
413 | * | 413 | * |
414 | */ | 414 | */ |
415 | int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device *pdev) | 415 | static int ohci_hcd_pxa27x_probe(struct platform_device *pdev) |
416 | { | 416 | { |
417 | int retval, irq; | 417 | int retval, irq; |
418 | struct usb_hcd *hcd; | 418 | struct usb_hcd *hcd; |
@@ -442,7 +442,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
442 | if (IS_ERR(usb_clk)) | 442 | if (IS_ERR(usb_clk)) |
443 | return PTR_ERR(usb_clk); | 443 | return PTR_ERR(usb_clk); |
444 | 444 | ||
445 | hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x"); | 445 | hcd = usb_create_hcd(&ohci_pxa27x_hc_driver, &pdev->dev, "pxa27x"); |
446 | if (!hcd) | 446 | if (!hcd) |
447 | return -ENOMEM; | 447 | return -ENOMEM; |
448 | 448 | ||
@@ -503,17 +503,18 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
503 | /* may be called with controller, bus, and devices active */ | 503 | /* may be called with controller, bus, and devices active */ |
504 | 504 | ||
505 | /** | 505 | /** |
506 | * usb_hcd_pxa27x_remove - shutdown processing for pxa27x-based HCDs | 506 | * ohci_hcd_pxa27x_remove - shutdown processing for pxa27x-based HCDs |
507 | * @dev: USB Host Controller being removed | 507 | * @dev: USB Host Controller being removed |
508 | * Context: !in_interrupt() | 508 | * Context: !in_interrupt() |
509 | * | 509 | * |
510 | * Reverses the effect of usb_hcd_pxa27x_probe(), first invoking | 510 | * Reverses the effect of ohci_hcd_pxa27x_probe(), first invoking |
511 | * the HCD's stop() method. It is always called from a thread | 511 | * the HCD's stop() method. It is always called from a thread |
512 | * context, normally "rmmod", "apmd", or something similar. | 512 | * context, normally "rmmod", "apmd", or something similar. |
513 | * | 513 | * |
514 | */ | 514 | */ |
515 | void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) | 515 | static int ohci_hcd_pxa27x_remove(struct platform_device *pdev) |
516 | { | 516 | { |
517 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | ||
517 | struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); | 518 | struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); |
518 | unsigned int i; | 519 | unsigned int i; |
519 | 520 | ||
@@ -524,28 +525,11 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
524 | pxa27x_ohci_set_vbus_power(pxa_ohci, i, false); | 525 | pxa27x_ohci_set_vbus_power(pxa_ohci, i, false); |
525 | 526 | ||
526 | usb_put_hcd(hcd); | 527 | usb_put_hcd(hcd); |
528 | return 0; | ||
527 | } | 529 | } |
528 | 530 | ||
529 | /*-------------------------------------------------------------------------*/ | 531 | /*-------------------------------------------------------------------------*/ |
530 | 532 | ||
531 | static int ohci_hcd_pxa27x_drv_probe(struct platform_device *pdev) | ||
532 | { | ||
533 | pr_debug ("In ohci_hcd_pxa27x_drv_probe"); | ||
534 | |||
535 | if (usb_disabled()) | ||
536 | return -ENODEV; | ||
537 | |||
538 | return usb_hcd_pxa27x_probe(&ohci_pxa27x_hc_driver, pdev); | ||
539 | } | ||
540 | |||
541 | static int ohci_hcd_pxa27x_drv_remove(struct platform_device *pdev) | ||
542 | { | ||
543 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | ||
544 | |||
545 | usb_hcd_pxa27x_remove(hcd, pdev); | ||
546 | return 0; | ||
547 | } | ||
548 | |||
549 | #ifdef CONFIG_PM | 533 | #ifdef CONFIG_PM |
550 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) | 534 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) |
551 | { | 535 | { |
@@ -598,8 +582,8 @@ static const struct dev_pm_ops ohci_hcd_pxa27x_pm_ops = { | |||
598 | #endif | 582 | #endif |
599 | 583 | ||
600 | static struct platform_driver ohci_hcd_pxa27x_driver = { | 584 | static struct platform_driver ohci_hcd_pxa27x_driver = { |
601 | .probe = ohci_hcd_pxa27x_drv_probe, | 585 | .probe = ohci_hcd_pxa27x_probe, |
602 | .remove = ohci_hcd_pxa27x_drv_remove, | 586 | .remove = ohci_hcd_pxa27x_remove, |
603 | .shutdown = usb_hcd_platform_shutdown, | 587 | .shutdown = usb_hcd_platform_shutdown, |
604 | .driver = { | 588 | .driver = { |
605 | .name = "pxa27x-ohci", | 589 | .name = "pxa27x-ohci", |