Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/base: Remove unused auxiliary_find_device

auxiliary_find_device has been unused since commit
1c5de097bea3 ("net/mlx5: Fix mlx5_get_next_dev() peer device matching")

which was the only use since it was originally added.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20240929141112.69824-1-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
0ebe74c5 cec78a59

-34
-1
Documentation/driver-api/auxiliary_bus.rst
··· 24 24 25 25 .. kernel-doc:: drivers/base/auxiliary.c 26 26 :identifiers: auxiliary_device_init __auxiliary_device_add 27 - auxiliary_find_device 28 27 29 28 Auxiliary Device Memory Model and Lifespan 30 29 ------------------------------------------
-29
drivers/base/auxiliary.c
··· 336 336 EXPORT_SYMBOL_GPL(__auxiliary_device_add); 337 337 338 338 /** 339 - * auxiliary_find_device - auxiliary device iterator for locating a particular device. 340 - * @start: Device to begin with 341 - * @data: Data to pass to match function 342 - * @match: Callback function to check device 343 - * 344 - * This function returns a reference to a device that is 'found' 345 - * for later use, as determined by the @match callback. 346 - * 347 - * The reference returned should be released with put_device(). 348 - * 349 - * The callback should return 0 if the device doesn't match and non-zero 350 - * if it does. If the callback returns non-zero, this function will 351 - * return to the caller and not iterate over any more devices. 352 - */ 353 - struct auxiliary_device *auxiliary_find_device(struct device *start, 354 - const void *data, 355 - device_match_t match) 356 - { 357 - struct device *dev; 358 - 359 - dev = bus_find_device(&auxiliary_bus_type, start, data, match); 360 - if (!dev) 361 - return NULL; 362 - 363 - return to_auxiliary_dev(dev); 364 - } 365 - EXPORT_SYMBOL_GPL(auxiliary_find_device); 366 - 367 - /** 368 339 * __auxiliary_driver_register - register a driver for auxiliary bus devices 369 340 * @auxdrv: auxiliary_driver structure 370 341 * @owner: owning module/driver
-4
include/linux/auxiliary_bus.h
··· 269 269 #define module_auxiliary_driver(__auxiliary_driver) \ 270 270 module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister) 271 271 272 - struct auxiliary_device *auxiliary_find_device(struct device *start, 273 - const void *data, 274 - device_match_t match); 275 - 276 272 #endif /* _AUXILIARY_BUS_H_ */