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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
Link: https://lore.kernel.org/r/20250408143629.125576-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
Bartosz Golaszewski 2025-04-08 16:36:29 +02:00 committed by Bartosz Golaszewski
parent df1540f8f3
commit d024e48263

View File

@ -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);