Skip to content

Commit

Permalink
PCI: dwc: Replace of_gpio_named_count() by gpiod_count()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Lorenzo Pieralisi committed Oct 3, 2022
1 parent 423511e commit 0dbc452
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/controller/dwc/pcie-kirin.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/mfd/syscon.h>
#include <linux/of_address.h>
Expand Down Expand Up @@ -366,12 +367,11 @@ static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie,
struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
char name[32];
int ret, i;

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

Expand Down

0 comments on commit 0dbc452

Please sign in to comment.