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

Configure Feed

Select the types of activity you want to include in your feed.

gpio: acpi: remove acpi_get_and_request_gpiod()

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>

-36
-28
drivers/gpio/gpiolib-acpi.c
··· 162 162 return gpio_device_get_desc(gdev, pin); 163 163 } 164 164 165 - /** 166 - * acpi_get_and_request_gpiod - Translate ACPI GPIO pin to GPIO descriptor and 167 - * hold a refcount to the GPIO device. 168 - * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") 169 - * @pin: ACPI GPIO pin number (0-based, controller-relative) 170 - * @label: Label to pass to gpiod_request() 171 - * 172 - * This function is a simple pass-through to acpi_get_gpiod(), except that 173 - * as it is intended for use outside of the GPIO layer (in a similar fashion to 174 - * gpiod_get_index() for example) it also holds a reference to the GPIO device. 175 - */ 176 - struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label) 177 - { 178 - struct gpio_desc *gpio; 179 - int ret; 180 - 181 - gpio = acpi_get_gpiod(path, pin); 182 - if (IS_ERR(gpio)) 183 - return gpio; 184 - 185 - ret = gpiod_request(gpio, label); 186 - if (ret) 187 - return ERR_PTR(ret); 188 - 189 - return gpio; 190 - } 191 - EXPORT_SYMBOL_GPL(acpi_get_and_request_gpiod); 192 - 193 165 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data) 194 166 { 195 167 struct acpi_gpio_event *event = data;
-8
include/linux/gpio/consumer.h
··· 606 606 int devm_acpi_dev_add_driver_gpios(struct device *dev, 607 607 const struct acpi_gpio_mapping *gpios); 608 608 609 - struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label); 610 - 611 609 #else /* CONFIG_GPIOLIB && CONFIG_ACPI */ 612 610 613 611 #include <linux/err.h> ··· 621 623 const struct acpi_gpio_mapping *gpios) 622 624 { 623 625 return -ENXIO; 624 - } 625 - 626 - static inline struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, 627 - char *label) 628 - { 629 - return ERR_PTR(-ENOSYS); 630 626 } 631 627 632 628 #endif /* CONFIG_GPIOLIB && CONFIG_ACPI */