[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fddbe517-db80-4957-a277-a6619cf50286@blaize.com>
Date: Wed, 9 Apr 2025 09:58:06 +0100
From: Nikolaos Pasaloukos <nikolaos.pasaloukos@...ize.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
James Cowgill <james.cowgill@...ize.com>,
Matt Redfearn <matt.redfearn@...ize.com>,
Neil Jones
<neil.jones@...ize.com>,
Linus Walleij <linus.walleij@...aro.org>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] gpio: blzp1600: drop dependency on OF headers
On 08/04/2025 15:36, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> Use the generic boolean device property getter instead of the
> OF-specific variant. This allows us to stop pulling in linux/of.h. While
> at it: drop the of_irq.h inclusion as none of its symbols are used in
> this driver.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
> drivers/gpio/gpio-blzp1600.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-blzp1600.c b/drivers/gpio/gpio-blzp1600.c
> index 77ad0e596f3e..2760a13c0801 100644
> --- a/drivers/gpio/gpio-blzp1600.c
> +++ b/drivers/gpio/gpio-blzp1600.c
> @@ -10,9 +10,8 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/of.h>
> -#include <linux/of_irq.h>
> #include <linux/platform_device.h>
> +#include <linux/property.h>
> #include <linux/slab.h>
> #include <linux/spinlock.h>
>
> @@ -217,7 +216,6 @@ static int blzp1600_gpio_set_config(struct gpio_chip *gc, unsigned int offset, u
>
> static int blzp1600_gpio_probe(struct platform_device *pdev)
> {
> - struct device_node *node = pdev->dev.of_node;
> struct blzp1600_gpio *chip;
> struct gpio_chip *gc;
> int ret;
> @@ -240,7 +238,7 @@ static int blzp1600_gpio_probe(struct platform_device *pdev)
> gc = &chip->gc;
> gc->set_config = blzp1600_gpio_set_config;
>
> - if (of_property_read_bool(node, "interrupt-controller")) {
> + if (device_property_present(&pdev->dev, "interrupt-controller")) {
> struct gpio_irq_chip *girq;
>
> chip->irq = platform_get_irq(pdev, 0);
Reviewed-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@...ize.com>
Powered by blists - more mailing lists