Skip to contentSkip to conversation

HSI: nokia-modem: Replace of_gpio_count() by gpiod_count()

PATCH In review Andy Shevchenko 2 participants 3 messages Sep 14, 2022 – Sep 20, 2022 HSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HSI: nokia-modem: Replace of_gpio_count() by gpiod_count()

As a preparation to unexport of_gpio_named_count(), convert the driver to use gpiod_count() instead.

---
 drivers/hsi/clients/nokia-modem.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/hsi/clients/nokia-modem.c +1 -3
index cd7ebf4c2e2f..97ba59e60663 100644
@@ -13,7 +13,6 @@
 #include <linux/interrupt.h>
 #include <linux/of.h>
 #include <linux/of_irq.h>
-#include <linux/of_gpio.h>
 #include <linux/hsi/ssi_protocol.h>
 
 static unsigned int pm = 1;
@@ -75,8 +74,7 @@ static int nokia_modem_gpio_probe(struct device *dev)
 	struct nokia_modem_device *modem = dev_get_drvdata(dev);
 	int gpio_count, gpio_name_count, i, err;
 
-	gpio_count = of_gpio_count(np);
-
+	gpio_count = gpiod_count(dev, NULL);
 	if (gpio_count < 0) {
 		dev_err(dev, "missing gpios: %d\n", gpio_count);
 		return gpio_count;
Signature · 1 line
2.35.1
#1 lore raw
Quoted 2 lines · Andy Shevchenko

As a preparation to unexport of_gpio_named_count(), convert the driver to use gpiod_count() instead.

Any comments on this?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw

Hi,

Quoted 5 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko

As a preparation to unexport of_gpio_named_count(), convert the driver to use gpiod_count() instead.

Any comments on this?

No comments, but I just queued it :)

-- Sebastian