gpiolib: remove gpiochip_find()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 5 Sep 2023 18:53:09 +0000 (20:53 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 4 Nov 2023 09:22:52 +0000 (10:22 +0100)
With all users of gpiochip_find() converted to using gpio_device_find(),
we can now remove this function from the kernel.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h

index cbafcd95243e8fcb2c29912a9073afb350d8203a..1c3c284fa44e7f063b9dee286ea802e06aa42468 100644 (file)
@@ -1092,28 +1092,6 @@ void gpiochip_remove(struct gpio_chip *gc)
 }
 EXPORT_SYMBOL_GPL(gpiochip_remove);
 
-/*
- * FIXME: This will be removed soon.
- *
- * This function is depracated, don't use.
- */
-struct gpio_chip *gpiochip_find(void *data,
-                               int (*match)(struct gpio_chip *gc,
-                                            void *data))
-{
-       struct gpio_device *gdev;
-       struct gpio_chip *gc = NULL;
-
-       gdev = gpio_device_find(data, match);
-       if (gdev) {
-               gc = gdev->chip;
-               gpio_device_put(gdev);
-       }
-
-       return gc;
-}
-EXPORT_SYMBOL_GPL(gpiochip_find);
-
 /**
  * gpio_device_find() - find a specific GPIO device
  * @data: data to pass to match function
index 1d454dc944b37fa379c3a1dd7af266281cd2e4cb..0aed62f0c63309d8b4962275c8a9b32f1cd9f659 100644 (file)
@@ -605,9 +605,6 @@ int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc,
                                    void *data, struct lock_class_key *lock_key,
                                    struct lock_class_key *request_key);
 
-struct gpio_chip *gpiochip_find(void *data,
-                               int (*match)(struct gpio_chip *gc, void *data));
-
 struct gpio_device *gpio_device_find(void *data,
                                int (*match)(struct gpio_chip *gc, void *data));
 struct gpio_device *gpio_device_find_by_label(const char *label);