USB: hcd-pci: Drop the unused id parameter from usb_hcd_pci_probe()
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 31 Aug 2022 12:50:52 +0000 (15:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2022 14:08:35 +0000 (16:08 +0200)
Since the HC driver is now passed to the function with its
own parameter (it used to be picked from id->driver_data),
the id parameter serves no purpose.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20220831125052.71584-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd-pci.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ohci-pci.c
drivers/usb/host/uhci-pci.c
drivers/usb/host/xhci-pci.c
include/linux/usb/hcd.h

index 482dae72ef1cbb7b14b083daca3a068967a5c648..9b77f49b3560c1f61927f9b53134c99649949d1a 100644 (file)
@@ -157,7 +157,6 @@ static void ehci_wait_for_companions(struct pci_dev *pdev, struct usb_hcd *hcd,
 /**
  * usb_hcd_pci_probe - initialize PCI-based HCDs
  * @dev: USB Host Controller being probed
- * @id: pci hotplug id connecting controller to HCD framework
  * @driver: USB HC driver handle
  *
  * Context: task context, might sleep
@@ -170,8 +169,7 @@ static void ehci_wait_for_companions(struct pci_dev *pdev, struct usb_hcd *hcd,
  *
  * Return: 0 if successful.
  */
-int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id,
-                     const struct hc_driver *driver)
+int usb_hcd_pci_probe(struct pci_dev *dev, const struct hc_driver *driver)
 {
        struct usb_hcd          *hcd;
        int                     retval;
@@ -180,9 +178,6 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id,
        if (usb_disabled())
                return -ENODEV;
 
-       if (!id)
-               return -EINVAL;
-
        if (!driver)
                return -EINVAL;
 
index 9581952d999a633956732dc5a8650dac89a3e34f..17f8b6ea0c356da98441e76f35bb0c7270ee4d0e 100644 (file)
@@ -382,7 +382,7 @@ static int ehci_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        if (is_bypassed_id(pdev))
                return -ENODEV;
-       return usb_hcd_pci_probe(pdev, id, &ehci_pci_hc_driver);
+       return usb_hcd_pci_probe(pdev, &ehci_pci_hc_driver);
 }
 
 static void ehci_pci_remove(struct pci_dev *pdev)
index a146b2d3ef0bc2a43ee8872454c44d5efe7891c7..d7b4f40f9ff4eb82178020573011b2b64ab9c0bd 100644 (file)
@@ -282,7 +282,7 @@ MODULE_DEVICE_TABLE (pci, pci_ids);
 
 static int ohci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return usb_hcd_pci_probe(dev, id, &ohci_pci_hc_driver);
+       return usb_hcd_pci_probe(dev, &ohci_pci_hc_driver);
 }
 
 /* pci driver glue; this is a "new style" PCI driver module */
index 9b88745d247f5d258b851323d56902e92c5be7e2..3592f757fe05ddfbce622b7bf91b93cc76b30ce2 100644 (file)
@@ -294,7 +294,7 @@ MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
 
 static int uhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return usb_hcd_pci_probe(dev, id, &uhci_driver);
+       return usb_hcd_pci_probe(dev, &uhci_driver);
 }
 
 static struct pci_driver uhci_pci_driver = {
index dce6c0ec8d340370e6bbd1626b9240b53cc771ba..40228a3d77a0b780df0f2ba14bcedab62870a222 100644 (file)
@@ -431,7 +431,7 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
         * to say USB 2.0, but I'm not sure what the implications would be in
         * the other parts of the HCD code.
         */
-       retval = usb_hcd_pci_probe(dev, id, &xhci_pci_hc_driver);
+       retval = usb_hcd_pci_probe(dev, &xhci_pci_hc_driver);
 
        if (retval)
                goto put_runtime_pm;
index 67f8713d3fa37d74b289ea3db6abe61787452a3d..78cd566ee238007e4113a90997234b7f2e440550 100644 (file)
@@ -479,7 +479,6 @@ static inline int ehset_single_step_set_feature(struct usb_hcd *hcd, int port)
 struct pci_dev;
 struct pci_device_id;
 extern int usb_hcd_pci_probe(struct pci_dev *dev,
-                            const struct pci_device_id *id,
                             const struct hc_driver *driver);
 extern void usb_hcd_pci_remove(struct pci_dev *dev);
 extern void usb_hcd_pci_shutdown(struct pci_dev *dev);