]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
usb: dwc2: eliminate irq parameter from dwc2_gadget_init
authorVardan Mikayelyan <mvardan@synopsys.com>
Mon, 25 Dec 2017 11:17:45 +0000 (15:17 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 8 Mar 2018 13:12:01 +0000 (15:12 +0200)
The irq is available in hsotg already, so there's no need to pass it as
separate function parameter.

Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/platform.c

index cd77af3b1565c0d803dcff888d672b304aa8bb9f..8f77034f2ecf5623f8561a3b0cd4b6e49ec199c5 100644 (file)
@@ -1180,7 +1180,7 @@ void dwc2_dump_global_registers(struct dwc2_hsotg *hsotg);
 int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg);
 int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2);
 int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2);
-int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq);
+int dwc2_gadget_init(struct dwc2_hsotg *hsotg);
 void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2,
                                       bool reset);
 void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg);
@@ -1199,7 +1199,7 @@ static inline int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2)
 { return 0; }
 static inline int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2)
 { return 0; }
-static inline int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
+static inline int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
 { return 0; }
 static inline void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2,
                                                     bool reset) {}
index 5bcad1d869b5070c628bf3b074ed078a5a9ed0c1..c661597714c9fedc8e3bb09365f488325bc0c5d0 100644 (file)
@@ -4606,9 +4606,8 @@ static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg)
 /**
  * dwc2_gadget_init - init function for gadget
  * @dwc2: The data structure for the DWC2 driver.
- * @irq: The IRQ number for the controller.
  */
-int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
+int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
 {
        struct device *dev = hsotg->dev;
        int epnum;
@@ -4649,8 +4648,8 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
                        return ret;
        }
 
-       ret = devm_request_irq(hsotg->dev, irq, dwc2_hsotg_irq, IRQF_SHARED,
-                              dev_name(hsotg->dev), hsotg);
+       ret = devm_request_irq(hsotg->dev, hsotg->irq, dwc2_hsotg_irq,
+                              IRQF_SHARED, dev_name(hsotg->dev), hsotg);
        if (ret < 0) {
                dev_err(dev, "cannot claim IRQ for gadget\n");
                return ret;
index 4703478f702ffda06632fd0e14a0ff243f84e850..9f39b15e7605897002b416f84a25a6a994b0e821 100644 (file)
@@ -439,7 +439,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
                goto error;
 
        if (hsotg->dr_mode != USB_DR_MODE_HOST) {
-               retval = dwc2_gadget_init(hsotg, hsotg->irq);
+               retval = dwc2_gadget_init(hsotg);
                if (retval)
                        goto error;
                hsotg->gadget_enabled = 1;