WSL2-Linux-Kernel/drivers/usb/core
Suzuki K Poulose 418e3ea157 bus_find_device: Unify the match callback with class_find_device
There is an arbitrary difference between the prototypes of
bus_find_device() and class_find_device() preventing their callers
from passing the same pair of data and match() arguments to both of
them, which is the const qualifier used in the prototype of
class_find_device().  If that qualifier is also used in the
bus_find_device() prototype, it will be possible to pass the same
match() callback function to both bus_find_device() and
class_find_device(), which will allow some optimizations to be made in
order to avoid code duplication going forward.  Also with that, constify
the "data" parameter as it is passed as a const to the match function.

For this reason, change the prototype of bus_find_device() to match
the prototype of class_find_device() and adjust its callers to use the
const qualifier in accordance with the new prototype of it.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andreas Noever <andreas.noever@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: David Kershner <david.kershner@unisys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Airlie <airlied@linux.ie>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Harald Freudenberger <freude@linux.ibm.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michael Jamet <michael.jamet@intel.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Sebastian Ott <sebott@linux.ibm.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
Cc: rafael@kernel.org
Acked-by: Corey Minyard <minyard@acm.org>
Acked-by: David Kershner <david.kershner@unisys.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C parts
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-24 05:22:31 +02:00
..
Kconfig usb: core: make default autosuspend delay configurable 2019-03-01 20:53:41 +01:00
Makefile usb: core: add a wrapper for the USB PHYs on the HCD 2018-03-09 09:43:53 -08:00
buffer.c USB: Removing NULL check for pool since dma_pool_destroy is safe 2018-09-10 20:01:04 +02:00
config.c USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor 2019-05-21 10:08:55 +02:00
devices.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
devio.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
driver.c USB: core: Fix bug caused by duplicate interface PM usage counter 2019-04-19 21:15:13 +02:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c USB: Fix configuration selection issues introduced in v4.20.0 2019-02-08 10:22:39 +01:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-05 14:36:53 +02:00
hcd.c usb: introduce usb_ep_type_string() function 2019-05-03 09:13:48 +03:00
hub.c USB: changes for v5.2 merge window 2019-05-03 18:05:27 +02:00
hub.h usb: hub: add retry routine after intr URB submit error 2019-01-18 09:58:04 +01:00
ledtrig-usbport.c USB: leds: fix regression in usbport led trigger 2019-01-18 09:55:05 +01:00
message.c USB: core: Fix unterminated string returned by usb_string() 2019-04-16 12:23:01 +02:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c usb: Change usb_of_get_companion_dev() place to usb/common 2018-09-10 20:40:29 +02:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
phy.c usb: core: comply to PHY framework 2019-01-30 09:22:35 +01:00
phy.h usb: core: comply to PHY framework 2019-01-30 09:22:35 +01:00
port.c usb: export firmware port location in sysfs 2018-10-02 12:05:30 -07:00
quirks.c USB: Add LPM quirk for Surface Dock GigE adapter 2019-05-21 10:08:56 +02:00
sysfs.c USB: Add new USB LPM helpers 2019-01-18 10:02:56 +01:00
urb.c USB: core: urb: Use struct_size() in kmalloc() 2019-01-08 16:46:46 +01:00
usb-acpi.c usb: assign ACPI companions for embedded USB devices 2019-01-25 08:46:26 +01:00
usb.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
usb.h USB: Add new USB LPM helpers 2019-01-18 10:02:56 +01:00