aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManjunath Goudar <csmanjuvijay@gmail.com>2016-12-02 22:34:53 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-05 10:32:51 -0500
commit1b43a8529c3056c33a36cc486c5f30d7eb115b80 (patch)
tree2470edde75b5a2e6e0586456628fa1159b17cfef
parentf83fb631110a647ddac41fe806c32d99a16eade4 (diff)
USB: OHCI: ohci-omap: remove useless functions
The ohci_hcd_omap_drv_probe and ohci_hcd_omap_drv_remove functions are removed as these are useless functions except calling usb_hcd_omap_probe and usb_hcd_omap_remove functions. The usb_hcd_omap_probe function renamed to ohci_hcd_omap_probe and usb_hcd_omap_remove function renamed to ohci_hcd_omap_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-omap@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-omap.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 495c1454b9e8..1e809d7c9ff8 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -296,15 +296,14 @@ static int ohci_omap_reset(struct usb_hcd *hcd)
296/*-------------------------------------------------------------------------*/ 296/*-------------------------------------------------------------------------*/
297 297
298/** 298/**
299 * usb_hcd_omap_probe - initialize OMAP-based HCDs 299 * ohci_hcd_omap_probe - initialize OMAP-based HCDs
300 * Context: !in_interrupt() 300 * Context: !in_interrupt()
301 * 301 *
302 * Allocates basic resources for this USB host controller, and 302 * Allocates basic resources for this USB host controller, and
303 * then invokes the start() method for the HCD associated with it 303 * then invokes the start() method for the HCD associated with it
304 * through the hotplug entry's driver_data. 304 * through the hotplug entry's driver_data.
305 */ 305 */
306static int usb_hcd_omap_probe (const struct hc_driver *driver, 306static int ohci_hcd_omap_probe(struct platform_device *pdev)
307 struct platform_device *pdev)
308{ 307{
309 int retval, irq; 308 int retval, irq;
310 struct usb_hcd *hcd = 0; 309 struct usb_hcd *hcd = 0;
@@ -336,7 +335,8 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
336 } 335 }
337 336
338 337
339 hcd = usb_create_hcd (driver, &pdev->dev, dev_name(&pdev->dev)); 338 hcd = usb_create_hcd(&ohci_omap_hc_driver, &pdev->dev,
339 dev_name(&pdev->dev));
340 if (!hcd) { 340 if (!hcd) {
341 retval = -ENOMEM; 341 retval = -ENOMEM;
342 goto err0; 342 goto err0;
@@ -384,17 +384,18 @@ err0:
384/* may be called with controller, bus, and devices active */ 384/* may be called with controller, bus, and devices active */
385 385
386/** 386/**
387 * usb_hcd_omap_remove - shutdown processing for OMAP-based HCDs 387 * ohci_hcd_omap_remove - shutdown processing for OMAP-based HCDs
388 * @dev: USB Host Controller being removed 388 * @dev: USB Host Controller being removed
389 * Context: !in_interrupt() 389 * Context: !in_interrupt()
390 * 390 *
391 * Reverses the effect of usb_hcd_omap_probe(), first invoking 391 * Reverses the effect of ohci_hcd_omap_probe(), first invoking
392 * the HCD's stop() method. It is always called from a thread 392 * the HCD's stop() method. It is always called from a thread
393 * context, normally "rmmod", "apmd", or something similar. 393 * context, normally "rmmod", "apmd", or something similar.
394 */ 394 */
395static inline void 395static int ohci_hcd_omap_remove(struct platform_device *pdev)
396usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
397{ 396{
397 struct usb_hcd *hcd = platform_get_drvdata(pdev);
398
398 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); 399 dev_dbg(hcd->self.controller, "stopping USB Controller\n");
399 usb_remove_hcd(hcd); 400 usb_remove_hcd(hcd);
400 omap_ohci_clock_power(0); 401 omap_ohci_clock_power(0);
@@ -409,21 +410,6 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
409 usb_put_hcd(hcd); 410 usb_put_hcd(hcd);
410 clk_put(usb_dc_ck); 411 clk_put(usb_dc_ck);
411 clk_put(usb_host_ck); 412 clk_put(usb_host_ck);
412}
413
414/*-------------------------------------------------------------------------*/
415
416static int ohci_hcd_omap_drv_probe(struct platform_device *dev)
417{
418 return usb_hcd_omap_probe(&ohci_omap_hc_driver, dev);
419}
420
421static int ohci_hcd_omap_drv_remove(struct platform_device *dev)
422{
423 struct usb_hcd *hcd = platform_get_drvdata(dev);
424
425 usb_hcd_omap_remove(hcd, dev);
426
427 return 0; 413 return 0;
428} 414}
429 415
@@ -472,8 +458,8 @@ static int ohci_omap_resume(struct platform_device *dev)
472 * Driver definition to register with the OMAP bus 458 * Driver definition to register with the OMAP bus
473 */ 459 */
474static struct platform_driver ohci_hcd_omap_driver = { 460static struct platform_driver ohci_hcd_omap_driver = {
475 .probe = ohci_hcd_omap_drv_probe, 461 .probe = ohci_hcd_omap_probe,
476 .remove = ohci_hcd_omap_drv_remove, 462 .remove = ohci_hcd_omap_remove,
477 .shutdown = usb_hcd_platform_shutdown, 463 .shutdown = usb_hcd_platform_shutdown,
478#ifdef CONFIG_PM 464#ifdef CONFIG_PM
479 .suspend = ohci_omap_suspend, 465 .suspend = ohci_omap_suspend,