gpio: acpi: remove acpi_get_and_request_gpiod()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 26 Sep 2023 14:59:43 +0000 (16:59 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 9 Oct 2023 12:47:15 +0000 (14:47 +0200)
With no more users, we can remove acpi_get_and_request_gpiod().

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/gpio/gpiolib-acpi.c
include/linux/gpio/consumer.h

index 2ad21f34ee62b27486d9c7cf9e3c09438647a0ab..25a5f07c875521de511bcbb12ce4639feebc9d4c 100644 (file)
@@ -162,34 +162,6 @@ static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin)
        return gpio_device_get_desc(gdev, pin);
 }
 
-/**
- * acpi_get_and_request_gpiod - Translate ACPI GPIO pin to GPIO descriptor and
- *                              hold a refcount to the GPIO device.
- * @path:      ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1")
- * @pin:       ACPI GPIO pin number (0-based, controller-relative)
- * @label:     Label to pass to gpiod_request()
- *
- * This function is a simple pass-through to acpi_get_gpiod(), except that
- * as it is intended for use outside of the GPIO layer (in a similar fashion to
- * gpiod_get_index() for example) it also holds a reference to the GPIO device.
- */
-struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label)
-{
-       struct gpio_desc *gpio;
-       int ret;
-
-       gpio = acpi_get_gpiod(path, pin);
-       if (IS_ERR(gpio))
-               return gpio;
-
-       ret = gpiod_request(gpio, label);
-       if (ret)
-               return ERR_PTR(ret);
-
-       return gpio;
-}
-EXPORT_SYMBOL_GPL(acpi_get_and_request_gpiod);
-
 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
 {
        struct acpi_gpio_event *event = data;
index 6cc345440a5bedbc61974f5cc8195fc873ad4fcc..db2dfbae8edbd12059826183b1c0f73c7a58ff40 100644 (file)
@@ -606,8 +606,6 @@ void acpi_dev_remove_driver_gpios(struct acpi_device *adev);
 int devm_acpi_dev_add_driver_gpios(struct device *dev,
                                   const struct acpi_gpio_mapping *gpios);
 
-struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label);
-
 #else  /* CONFIG_GPIOLIB && CONFIG_ACPI */
 
 #include <linux/err.h>
@@ -625,12 +623,6 @@ static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
        return -ENXIO;
 }
 
-static inline struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin,
-                                                          char *label)
-{
-       return ERR_PTR(-ENOSYS);
-}
-
 #endif /* CONFIG_GPIOLIB && CONFIG_ACPI */