WSL2-Linux-Kernel/drivers/usb
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
..
atm USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
chipidea usb: chipidea: msm: get optional clock by devm_clk_get_optional() 2019-04-19 14:24:26 +02:00
class USB: cdc-acm: clean up throttle handling 2019-04-29 16:14:41 +02:00
common usb: introduce usb_ep_type_string() function 2019-05-03 09:13:48 +03:00
core bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
dwc2 dwc2: gadget: Fix completed transfer size calculation in DDMA 2019-05-03 09:13:49 +03:00
dwc3 drm pull request for 5.2 2019-05-08 21:35:19 -07:00
early drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
gadget usb: gadget: atmel: tie wake lock to running clock 2019-05-03 09:13:49 +03:00
host xhci: Use %zu for printing size_t type 2019-05-22 18:17:16 +02:00
image USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
isp1760 usb: isp1760-hcd: Fix fall-through annotations 2019-05-01 18:13:52 +02:00
misc USB: rio500: simplify locking 2019-05-21 10:11:14 +02:00
mon USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
mtu3 usb: mtu3: fix up undefined reference to usb_debug_root 2019-05-21 10:08:56 +02:00
musb usb: musb: dsps: Use dev_get_drvdata() 2019-04-30 17:55:08 +02:00
phy bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
renesas_usbhs USB: renesas_usbhs: fix spelling mistake "doens't" -> "doesn't" 2019-02-19 14:41:38 +01:00
roles usb: roles: Find the muxes by also matching against the device node 2019-02-14 10:52:25 +01:00
serial USB: serial: f81232: implement break control 2019-05-03 09:19:55 +02:00
storage treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
typec usb: typec: ucsi: ccg: fix missing unlock on error in ccg_cmd_write_flash_row() 2019-04-29 14:25:12 +02:00
usbip usbip: usbip_host: fix stub_dev lock context imbalance regression 2019-05-29 13:26:32 -07:00
wusbcore wusb: Remove unnecessary static function ckhdid_printf 2019-03-01 20:53:41 +01:00
Kconfig USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
Makefile usb: roles: Add Intel xHCI USB role switch driver 2018-03-22 13:49:27 +01:00
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00