gpiolib: Deduplicate forward declaration in the consumer.h header
PATCH 1/1 gpiolib: Deduplicate forward declaration in the consumer.h header
struct acpi_device is repeated in two branches of ifdeffery. Move it out and hence deduplicate.
Signed-off-by Andy Shevchenko <[email protected]>
--- include/linux/gpio/consumer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
include/linux/gpio/consumer.h +2 -4
@@ -680,10 +680,10 @@ struct acpi_gpio_mapping {unsigned int quirks; }; -#if IS_ENABLED (CONFIG_GPIOLIB ) &&IS_ENABLED (CONFIG_ACPI ) -struct acpi_device ; +#if IS_ENABLED (CONFIG_GPIOLIB ) &&IS_ENABLED (CONFIG_ACPI ) +int acpi_dev_add_driver_gpios (struct acpi_device *adev,const struct acpi_gpio_mapping *gpios);void acpi_dev_remove_driver_gpios (struct acpi_device *adev);
@@ -696,8 +696,6 @@ struct gpio_desc *acpi_get_and_request_gpiod(char *path, int pin, char *label);#else /* CONFIG_GPIOLIB && CONFIG_ACPI */ -struct acpi_device ; -static inline int acpi_dev_add_driver_gpios (struct acpi_device *adev,const struct acpi_gpio_mapping *gpios) {
Signature · 1 line
2.30.2
Quoted 4 lines · Andy Shevchenko
struct
acpi_deviceis repeated in two branches of ifdeffery. Move it out and hence deduplicate.Signed-off-by Andy Shevchenko <[email protected]>
That's neat!
Reviewed-by Linus Walleij <[email protected]>
Yours,
Linus Walleij
Quoted 10 lines · Linus Walleij
Quoted 4 lines · Andy Shevchenko
struct
acpi_deviceis repeated in two branches of ifdeffery. Move it out and hence deduplicate.Signed-off-by Andy Shevchenko <[email protected]>That's neat!
Reviewed-by Linus Walleij <[email protected]>
Thanks!
Bart, I'll send this inside my usual PR in terms of GPIO ACPI support.
Signature · 2 lines
With Best Regards, Andy Shevchenko