]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers/base: Remove unused auxiliary_find_device
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 29 Sep 2024 14:11:12 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2024 06:21:09 +0000 (08:21 +0200)
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>
Documentation/driver-api/auxiliary_bus.rst
drivers/base/auxiliary.c
include/linux/auxiliary_bus.h

index cec84908fbc0d63b4d1edc46fa50f931be728867..b236de773e1d6cca9a4619ffac8b7e81a8c649f0 100644 (file)
@@ -24,7 +24,6 @@ Auxiliary Device Creation
 
 .. kernel-doc:: drivers/base/auxiliary.c
    :identifiers: auxiliary_device_init __auxiliary_device_add
-                 auxiliary_find_device
 
 Auxiliary Device Memory Model and Lifespan
 ------------------------------------------
index 7823888af4f68472627e9c31f296ebda1ee7b565..69b7c93613d6dc0010bc5995ef9f13da0682ab2c 100644 (file)
@@ -335,35 +335,6 @@ int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname)
 }
 EXPORT_SYMBOL_GPL(__auxiliary_device_add);
 
-/**
- * auxiliary_find_device - auxiliary device iterator for locating a particular device.
- * @start: Device to begin with
- * @data: Data to pass to match function
- * @match: Callback function to check device
- *
- * This function returns a reference to a device that is 'found'
- * for later use, as determined by the @match callback.
- *
- * The reference returned should be released with put_device().
- *
- * The callback should return 0 if the device doesn't match and non-zero
- * if it does.  If the callback returns non-zero, this function will
- * return to the caller and not iterate over any more devices.
- */
-struct auxiliary_device *auxiliary_find_device(struct device *start,
-                                              const void *data,
-                                              device_match_t match)
-{
-       struct device *dev;
-
-       dev = bus_find_device(&auxiliary_bus_type, start, data, match);
-       if (!dev)
-               return NULL;
-
-       return to_auxiliary_dev(dev);
-}
-EXPORT_SYMBOL_GPL(auxiliary_find_device);
-
 /**
  * __auxiliary_driver_register - register a driver for auxiliary bus devices
  * @auxdrv: auxiliary_driver structure
index 31762324bcc9b55810b3d4e4da1ea7eaf8920c02..65dd7f15437474468acf0e28f6932a7ff2cfff2c 100644 (file)
@@ -269,8 +269,4 @@ void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv);
 #define module_auxiliary_driver(__auxiliary_driver) \
        module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
 
-struct auxiliary_device *auxiliary_find_device(struct device *start,
-                                              const void *data,
-                                              device_match_t match);
-
 #endif /* _AUXILIARY_BUS_H_ */