linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: constify of_phandle_args in of_find_gpio_device_by_xlate()
@ 2024-02-20  7:26 Krzysztof Kozlowski
  2024-02-20 11:45 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-20  7:26 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, linux-gpio, linux-kernel
  Cc: Krzysztof Kozlowski

Pointer to the struct of_phandle_args can be made const after
gpio_device_find() arguments got constified.  This should be part of
commit 4a92857d6e83 ("gpio: constify opaque pointer "data" in
gpio_device_find()").

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

I mixed up chunks of patches, because this should be in previous commit
4a92857d6e83 ("gpio: constify opaque pointer "data" in"). Sorry for
that.
---
 drivers/gpio/gpiolib-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 523b047a2803..e35a9c7da4ee 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -129,7 +129,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip,
 }
 
 static struct gpio_device *
-of_find_gpio_device_by_xlate(struct of_phandle_args *gpiospec)
+of_find_gpio_device_by_xlate(const struct of_phandle_args *gpiospec)
 {
 	return gpio_device_find(gpiospec, of_gpiochip_match_node_and_xlate);
 }
-- 
2.34.1


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

* Re: [PATCH] gpio: constify of_phandle_args in of_find_gpio_device_by_xlate()
  2024-02-20  7:26 [PATCH] gpio: constify of_phandle_args in of_find_gpio_device_by_xlate() Krzysztof Kozlowski
@ 2024-02-20 11:45 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2024-02-20 11:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Linus Walleij, linux-gpio, linux-kernel

On Tue, Feb 20, 2024 at 8:26 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Pointer to the struct of_phandle_args can be made const after
> gpio_device_find() arguments got constified.  This should be part of
> commit 4a92857d6e83 ("gpio: constify opaque pointer "data" in
> gpio_device_find()").
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> I mixed up chunks of patches, because this should be in previous commit
> 4a92857d6e83 ("gpio: constify opaque pointer "data" in"). Sorry for
> that.
> ---
>  drivers/gpio/gpiolib-of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 523b047a2803..e35a9c7da4ee 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -129,7 +129,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip,
>  }
>
>  static struct gpio_device *
> -of_find_gpio_device_by_xlate(struct of_phandle_args *gpiospec)
> +of_find_gpio_device_by_xlate(const struct of_phandle_args *gpiospec)
>  {
>         return gpio_device_find(gpiospec, of_gpiochip_match_node_and_xlate);
>  }
> --
> 2.34.1
>

Applied, thanks!

Bart

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

end of thread, other threads:[~2024-02-20 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20  7:26 [PATCH] gpio: constify of_phandle_args in of_find_gpio_device_by_xlate() Krzysztof Kozlowski
2024-02-20 11:45 ` Bartosz Golaszewski

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).