linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static
@ 2019-09-04 17:26 Dmitry Torokhov
  2019-09-04 17:33 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2019-09-04 17:26 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Andy Shevchenko, Linus Walleij, linux-gpio, linux-acpi, linux-kernel

It is not used outside gpiolib-acpi.c module, so there is no need to
export it.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/gpio/gpiolib-acpi.c | 19 ++++++++++---------
 drivers/gpio/gpiolib-acpi.h |  8 --------
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index fdee8afa5339..2b6fdc9947f7 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -728,6 +728,16 @@ static struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev,
 	return ret ? ERR_PTR(ret) : lookup.desc;
 }
 
+static bool acpi_can_fallback_to_crs(struct acpi_device *adev,
+				     const char *con_id)
+{
+	/* Never allow fallback if the device has properties */
+	if (acpi_dev_has_props(adev) || adev->driver_gpios)
+		return false;
+
+	return con_id == NULL;
+}
+
 struct gpio_desc *acpi_find_gpio(struct device *dev,
 				 const char *con_id,
 				 unsigned int idx,
@@ -1264,15 +1274,6 @@ int acpi_gpio_count(struct device *dev, const char *con_id)
 	return count ? count : -ENOENT;
 }
 
-bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id)
-{
-	/* Never allow fallback if the device has properties */
-	if (acpi_dev_has_props(adev) || adev->driver_gpios)
-		return false;
-
-	return con_id == NULL;
-}
-
 /* Run deferred acpi_gpiochip_request_irqs() */
 static int acpi_gpio_handle_deferred_request_irqs(void)
 {
diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h
index d7241b432b8b..1c6d65cf0629 100644
--- a/drivers/gpio/gpiolib-acpi.h
+++ b/drivers/gpio/gpiolib-acpi.h
@@ -52,8 +52,6 @@ struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode,
 				      struct acpi_gpio_info *info);
 
 int acpi_gpio_count(struct device *dev, const char *con_id);
-
-bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id);
 #else
 static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
 static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
@@ -93,12 +91,6 @@ static inline int acpi_gpio_count(struct device *dev, const char *con_id)
 {
 	return -ENODEV;
 }
-
-static inline bool acpi_can_fallback_to_crs(struct acpi_device *adev,
-					    const char *con_id)
-{
-	return false;
-}
 #endif
 
 #endif /* GPIOLIB_ACPI_H */
-- 
2.23.0.187.g17f5b7556c-goog


-- 
Dmitry

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

* Re: [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static
  2019-09-04 17:26 [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static Dmitry Torokhov
@ 2019-09-04 17:33 ` Andy Shevchenko
  2019-09-05  5:03 ` Mika Westerberg
  2019-09-10 10:35 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2019-09-04 17:33 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Mika Westerberg, Linus Walleij, linux-gpio, linux-acpi, linux-kernel

On Wed, Sep 04, 2019 at 10:26:24AM -0700, Dmitry Torokhov wrote:
> It is not used outside gpiolib-acpi.c module, so there is no need to
> export it.
> 

Thank you for a nice clean up!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/gpio/gpiolib-acpi.c | 19 ++++++++++---------
>  drivers/gpio/gpiolib-acpi.h |  8 --------
>  2 files changed, 10 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index fdee8afa5339..2b6fdc9947f7 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -728,6 +728,16 @@ static struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev,
>  	return ret ? ERR_PTR(ret) : lookup.desc;
>  }
>  
> +static bool acpi_can_fallback_to_crs(struct acpi_device *adev,
> +				     const char *con_id)
> +{
> +	/* Never allow fallback if the device has properties */
> +	if (acpi_dev_has_props(adev) || adev->driver_gpios)
> +		return false;
> +
> +	return con_id == NULL;
> +}
> +
>  struct gpio_desc *acpi_find_gpio(struct device *dev,
>  				 const char *con_id,
>  				 unsigned int idx,
> @@ -1264,15 +1274,6 @@ int acpi_gpio_count(struct device *dev, const char *con_id)
>  	return count ? count : -ENOENT;
>  }
>  
> -bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id)
> -{
> -	/* Never allow fallback if the device has properties */
> -	if (acpi_dev_has_props(adev) || adev->driver_gpios)
> -		return false;
> -
> -	return con_id == NULL;
> -}
> -
>  /* Run deferred acpi_gpiochip_request_irqs() */
>  static int acpi_gpio_handle_deferred_request_irqs(void)
>  {
> diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h
> index d7241b432b8b..1c6d65cf0629 100644
> --- a/drivers/gpio/gpiolib-acpi.h
> +++ b/drivers/gpio/gpiolib-acpi.h
> @@ -52,8 +52,6 @@ struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode,
>  				      struct acpi_gpio_info *info);
>  
>  int acpi_gpio_count(struct device *dev, const char *con_id);
> -
> -bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id);
>  #else
>  static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
>  static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
> @@ -93,12 +91,6 @@ static inline int acpi_gpio_count(struct device *dev, const char *con_id)
>  {
>  	return -ENODEV;
>  }
> -
> -static inline bool acpi_can_fallback_to_crs(struct acpi_device *adev,
> -					    const char *con_id)
> -{
> -	return false;
> -}
>  #endif
>  
>  #endif /* GPIOLIB_ACPI_H */
> -- 
> 2.23.0.187.g17f5b7556c-goog
> 
> 
> -- 
> Dmitry

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static
  2019-09-04 17:26 [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static Dmitry Torokhov
  2019-09-04 17:33 ` Andy Shevchenko
@ 2019-09-05  5:03 ` Mika Westerberg
  2019-09-10 10:35 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2019-09-05  5:03 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Andy Shevchenko, Linus Walleij, linux-gpio, linux-acpi, linux-kernel

On Wed, Sep 04, 2019 at 10:26:24AM -0700, Dmitry Torokhov wrote:
> It is not used outside gpiolib-acpi.c module, so there is no need to
> export it.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* Re: [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static
  2019-09-04 17:26 [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static Dmitry Torokhov
  2019-09-04 17:33 ` Andy Shevchenko
  2019-09-05  5:03 ` Mika Westerberg
@ 2019-09-10 10:35 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-09-10 10:35 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Mika Westerberg, Andy Shevchenko, open list:GPIO SUBSYSTEM,
	ACPI Devel Maling List, linux-kernel

On Wed, Sep 4, 2019 at 6:26 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:

> It is not used outside gpiolib-acpi.c module, so there is no need to
> export it.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Patch applied with the ACKs.

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-09-10 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 17:26 [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static Dmitry Torokhov
2019-09-04 17:33 ` Andy Shevchenko
2019-09-05  5:03 ` Mika Westerberg
2019-09-10 10:35 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).