All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] gpiolib: Deduplicate forward declaration in the consumer.h header
@ 2021-08-03 17:39 Andy Shevchenko
  2021-08-11 12:05 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2021-08-03 17:39 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Linus Walleij, Bartosz Golaszewski

struct acpi_device is repeated in two branches of ifdeffery.
Move it out and hence deduplicate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/gpio/consumer.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 566feb56601f..414b8f98d70f 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -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)
 {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] gpiolib: Deduplicate forward declaration in the consumer.h header
  2021-08-03 17:39 [PATCH v1 1/1] gpiolib: Deduplicate forward declaration in the consumer.h header Andy Shevchenko
@ 2021-08-11 12:05 ` Linus Walleij
  2021-08-11 12:56   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2021-08-11 12:05 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: open list:GPIO SUBSYSTEM, linux-kernel, Bartosz Golaszewski

On Tue, Aug 3, 2021 at 7:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> struct acpi_device is repeated in two branches of ifdeffery.
> Move it out and hence deduplicate.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

That's neat!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] gpiolib: Deduplicate forward declaration in the consumer.h header
  2021-08-11 12:05 ` Linus Walleij
@ 2021-08-11 12:56   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-08-11 12:56 UTC (permalink / raw)
  To: Linus Walleij; +Cc: open list:GPIO SUBSYSTEM, linux-kernel, Bartosz Golaszewski

On Wed, Aug 11, 2021 at 02:05:40PM +0200, Linus Walleij wrote:
> On Tue, Aug 3, 2021 at 7:39 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
> > struct acpi_device is repeated in two branches of ifdeffery.
> > Move it out and hence deduplicate.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> That's neat!
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks!

Bart, I'll send this inside my usual PR in terms of GPIO ACPI support.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-11 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 17:39 [PATCH v1 1/1] gpiolib: Deduplicate forward declaration in the consumer.h header Andy Shevchenko
2021-08-11 12:05 ` Linus Walleij
2021-08-11 12:56   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.