linux/drivers/thunderbolt
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
..
cap.c thunderbolt: Add dummy read after port capability list walk on Light Ridge 2019-04-18 11:18:51 +03:00
ctl.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
ctl.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
dma_port.c thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
dma_port.h thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
domain.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
eeprom.c thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
icm.c thunderbolt: Start firmware on Titan Ridge Apple systems 2019-04-18 11:18:54 +03:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lc.c thunderbolt: Set sleep bit when suspending switch 2019-04-18 11:18:52 +03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nhi_regs.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
nhi.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nhi.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
path.c thunderbolt: Reword output of tb_dump_hop() 2019-04-18 11:18:54 +03:00
property.c thunderbolt: property: Fix a missing check of kzalloc 2019-03-28 11:30:47 +03:00
switch.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
tb_msgs.h thunderbolt: Add XDomain UUID exchange support 2019-04-18 11:18:53 +03:00
tb_regs.h thunderbolt: Add support for DMA tunnels 2019-04-18 11:18:53 +03:00
tb.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
tb.h thunderbolt: Make priority unsigned in struct tb_path 2019-04-25 12:18:27 +03:00
tunnel.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
tunnel.h thunderbolt: Add support for DMA tunnels 2019-04-18 11:18:53 +03:00
xdomain.c thunderbolt: Add XDomain UUID exchange support 2019-04-18 11:18:53 +03:00