Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: dwc: Replace of_gpio_named_count() by gpiod_count()

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

Link: https://lore.kernel.org/r/20220830183310.48541-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>

authored by

Andy Shevchenko and committed by
Lorenzo Pieralisi
0dbc4524 423511ec

+2 -2
+2 -2
drivers/pci/controller/dwc/pcie-kirin.c
··· 13 13 #include <linux/delay.h> 14 14 #include <linux/err.h> 15 15 #include <linux/gpio.h> 16 + #include <linux/gpio/consumer.h> 16 17 #include <linux/interrupt.h> 17 18 #include <linux/mfd/syscon.h> 18 19 #include <linux/of_address.h> ··· 367 366 struct platform_device *pdev) 368 367 { 369 368 struct device *dev = &pdev->dev; 370 - struct device_node *np = dev->of_node; 371 369 char name[32]; 372 370 int ret, i; 373 371 374 372 /* This is an optional property */ 375 - ret = of_gpio_named_count(np, "hisilicon,clken-gpios"); 373 + ret = gpiod_count(dev, "hisilicon,clken"); 376 374 if (ret < 0) 377 375 return 0; 378 376