Skip to content

Commit 74975b4

Browse files
author
Bartosz Golaszewski
committed
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 <[email protected]> Reviewed-by: From: Andy Shevchenko <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
1 parent 4819033 commit 74975b4

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -162,34 +162,6 @@ static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin)
162162
return gpio_device_get_desc(gdev, pin);
163163
}
164164

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-
193165
static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
194166
{
195167
struct acpi_gpio_event *event = data;

include/linux/gpio/consumer.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,6 @@ void acpi_dev_remove_driver_gpios(struct acpi_device *adev);
606606
int devm_acpi_dev_add_driver_gpios(struct device *dev,
607607
const struct acpi_gpio_mapping *gpios);
608608

609-
struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label);
610-
611609
#else /* CONFIG_GPIOLIB && CONFIG_ACPI */
612610

613611
#include <linux/err.h>
@@ -625,12 +623,6 @@ static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
625623
return -ENXIO;
626624
}
627625

628-
static inline struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin,
629-
char *label)
630-
{
631-
return ERR_PTR(-ENOSYS);
632-
}
633-
634626
#endif /* CONFIG_GPIOLIB && CONFIG_ACPI */
635627

636628

0 commit comments

Comments
 (0)