diff mbox series

[V2,09/13] USB: host: ehci-pmcmsp: Cleanup usb_hcd_msp_remove()

Message ID 20201019101110.530302737@linutronix.de
State New
Headers show
Series USB: Cleanup in_interupt/in_irq/in_atomic() usage | expand

Commit Message

Thomas Gleixner Oct. 19, 2020, 10:06 a.m. UTC
usb_hcd_msp_remove() has a pdev argument which isn't used and the function
is used only within this file.

Remove pdev and make usb_hcd_msp_remove() static.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
V2: Split out from comments patch
---
 drivers/usb/host/ehci-pmcmsp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alan Stern Oct. 19, 2020, 4:28 p.m. UTC | #1
On Mon, Oct 19, 2020 at 12:06:38PM +0200, Thomas Gleixner wrote:
> usb_hcd_msp_remove() has a pdev argument which isn't used and the function
> is used only within this file.
> 
> Remove pdev and make usb_hcd_msp_remove() static.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> V2: Split out from comments patch
> ---
>  drivers/usb/host/ehci-pmcmsp.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/usb/host/ehci-pmcmsp.c
> +++ b/drivers/usb/host/ehci-pmcmsp.c
> @@ -236,7 +236,7 @@ int usb_hcd_msp_probe(const struct hc_dr
>   * may be called without controller electrically present
>   * may be called with controller, bus, and devices active
>   */
> -void usb_hcd_msp_remove(struct usb_hcd *hcd, struct platform_device *dev)
> +static void usb_hcd_msp_remove(struct usb_hcd *hcd)
>  {
>  	usb_remove_hcd(hcd);
>  	iounmap(hcd->regs);
> @@ -309,7 +309,7 @@ static int ehci_hcd_msp_drv_remove(struc
>  {
>  	struct usb_hcd *hcd = platform_get_drvdata(pdev);
>  
> -	usb_hcd_msp_remove(hcd, pdev);
> +	usb_hcd_msp_remove(hcd);
>  
>  	/* free TWI GPIO USB_HOST_DEV pin */
>  	gpio_free(MSP_PIN_USB0_HOST_DEV);

Acked-by: Alan Stern <stern@rowland.harvard.edu>
diff mbox series

Patch

--- a/drivers/usb/host/ehci-pmcmsp.c
+++ b/drivers/usb/host/ehci-pmcmsp.c
@@ -236,7 +236,7 @@  int usb_hcd_msp_probe(const struct hc_dr
  * may be called without controller electrically present
  * may be called with controller, bus, and devices active
  */
-void usb_hcd_msp_remove(struct usb_hcd *hcd, struct platform_device *dev)
+static void usb_hcd_msp_remove(struct usb_hcd *hcd)
 {
 	usb_remove_hcd(hcd);
 	iounmap(hcd->regs);
@@ -309,7 +309,7 @@  static int ehci_hcd_msp_drv_remove(struc
 {
 	struct usb_hcd *hcd = platform_get_drvdata(pdev);
 
-	usb_hcd_msp_remove(hcd, pdev);
+	usb_hcd_msp_remove(hcd);
 
 	/* free TWI GPIO USB_HOST_DEV pin */
 	gpio_free(MSP_PIN_USB0_HOST_DEV);