mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
gpiolib: Remove unused devm_gpio_request()
Remove devm_gpio_request() due to lack of users. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250531212331.3635269-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
32f6d31dc0
commit
a558931338
3 changed files with 0 additions and 47 deletions
|
@ -275,7 +275,6 @@ GPIO
|
|||
devm_gpiod_put()
|
||||
devm_gpiod_unhinge()
|
||||
devm_gpiochip_add_data()
|
||||
devm_gpio_request()
|
||||
devm_gpio_request_one()
|
||||
|
||||
I2C
|
||||
|
|
|
@ -85,44 +85,6 @@ static void devm_gpio_release(struct device *dev, void *res)
|
|||
gpio_free(*gpio);
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_gpio_request - request a GPIO for a managed device
|
||||
* @dev: device to request the GPIO for
|
||||
* @gpio: GPIO to allocate
|
||||
* @label: the name of the requested GPIO
|
||||
*
|
||||
* Except for the extra @dev argument, this function takes the
|
||||
* same arguments and performs the same function as gpio_request().
|
||||
* GPIOs requested with this function will be automatically freed
|
||||
* on driver detach.
|
||||
*
|
||||
* **DEPRECATED** This function is deprecated and must not be used in new code.
|
||||
*
|
||||
* Returns:
|
||||
* 0 on success, or negative errno on failure.
|
||||
*/
|
||||
int devm_gpio_request(struct device *dev, unsigned gpio, const char *label)
|
||||
{
|
||||
unsigned *dr;
|
||||
int rc;
|
||||
|
||||
dr = devres_alloc(devm_gpio_release, sizeof(unsigned), GFP_KERNEL);
|
||||
if (!dr)
|
||||
return -ENOMEM;
|
||||
|
||||
rc = gpio_request(gpio, label);
|
||||
if (rc) {
|
||||
devres_free(dr);
|
||||
return rc;
|
||||
}
|
||||
|
||||
*dr = gpio;
|
||||
devres_add(dev, dr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_gpio_request);
|
||||
|
||||
/**
|
||||
* devm_gpio_request_one - request a single GPIO with initial setup
|
||||
* @dev: device to request for
|
||||
|
|
|
@ -110,7 +110,6 @@ static inline int gpio_to_irq(unsigned gpio)
|
|||
|
||||
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
|
||||
|
||||
int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
|
||||
int devm_gpio_request_one(struct device *dev, unsigned gpio,
|
||||
unsigned long flags, const char *label);
|
||||
|
||||
|
@ -188,13 +187,6 @@ static inline int gpio_to_irq(unsigned gpio)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int devm_gpio_request(struct device *dev, unsigned gpio,
|
||||
const char *label)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int devm_gpio_request_one(struct device *dev, unsigned gpio,
|
||||
unsigned long flags, const char *label)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue