mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpio: blzp1600: drop dependency on OF headers
@ 2025-04-08 14:36 Bartosz Golaszewski
  2025-04-09  8:58 ` Nikolaos Pasaloukos
  2025-04-16 15:56 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-04-08 14:36 UTC (permalink / raw)
  To: James Cowgill, Matt Redfearn, Neil Jones, Nikolaos Pasaloukos,
	Linus Walleij
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.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@linaro.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);
-- 
2.45.2


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

end of thread, other threads:[~2025-04-16 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 14:36 [PATCH] gpio: blzp1600: drop dependency on OF headers Bartosz Golaszewski
2025-04-09  8:58 ` Nikolaos Pasaloukos
2025-04-16 15:56 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®