From: Bartosz Golaszewski Date: Tue, 8 Apr 2025 14:36:29 +0000 (+0200) Subject: gpio: blzp1600: drop dependency on OF headers X-Git-Tag: v6.16-rc1~169^2~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d024e482630acfb513027b5e4549a7b792ea8abb;p=thirdparty%2Fkernel%2Flinux.git gpio: blzp1600: drop dependency on OF headers 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 Reviewed-by: Nikolaos Pasaloukos Link: https://lore.kernel.org/r/20250408143629.125576-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-blzp1600.c b/drivers/gpio/gpio-blzp1600.c index 77ad0e596f3ea..2760a13c08012 100644 --- a/drivers/gpio/gpio-blzp1600.c +++ b/drivers/gpio/gpio-blzp1600.c @@ -10,9 +10,8 @@ #include #include #include -#include -#include #include +#include #include #include @@ -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);