mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
gpiolib: acpi: Convert type for pin to be unsigned
A pin that comes from ACPI tables is of unsigned type. This also applies to the internal APIs which use unsigned int to store the pin. Convert type for pin to be unsigned in the places where it's not yet true. While at it, add a stub for acpi_get_and_request_gpiod() for the sake of consistency in the APIs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
213d266ebf
commit
0c2cae09a7
2 changed files with 17 additions and 9 deletions
|
@ -688,7 +688,7 @@ 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, int pin, char *label);
|
||||
struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label);
|
||||
|
||||
#else /* CONFIG_GPIOLIB && CONFIG_ACPI */
|
||||
|
||||
|
@ -705,6 +705,12 @@ 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 */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue