Skip to content

Commit 0dbc452

Browse files
andy-shevLorenzo Pieralisi
authored andcommitted
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>
1 parent 423511e commit 0dbc452

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/dwc/pcie-kirin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/delay.h>
1414
#include <linux/err.h>
1515
#include <linux/gpio.h>
16+
#include <linux/gpio/consumer.h>
1617
#include <linux/interrupt.h>
1718
#include <linux/mfd/syscon.h>
1819
#include <linux/of_address.h>
@@ -366,12 +367,11 @@ static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie,
366367
struct platform_device *pdev)
367368
{
368369
struct device *dev = &pdev->dev;
369-
struct device_node *np = dev->of_node;
370370
char name[32];
371371
int ret, i;
372372

373373
/* This is an optional property */
374-
ret = of_gpio_named_count(np, "hisilicon,clken-gpios");
374+
ret = gpiod_count(dev, "hisilicon,clken");
375375
if (ret < 0)
376376
return 0;
377377

0 commit comments

Comments
 (0)