PCI: dwc: Replace of_gpio_named_count() by gpiod_count()
PATCH 1/1 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.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/pci/controller/dwc/pcie-kirin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/controller/dwc/pcie-kirin.c +1 -2
@@ -366,12 +366,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 ;
Signature · 1 line
2.35.1
Quoted 3 lines · Andy Shevchenko
As a preparation to unexport
of_gpio_named_count(), convert the driver to usegpiod_count()instead.
I'm always in favor of removing DT APIs.
Quoted 4 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/pci/controller/dwc/pcie-kirin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Acked-by Rob Herring <[email protected]>
Quoted 4 lines · Andy Shevchenko
As a preparation to unexport
of_gpio_named_count(), convert the driver to usegpiod_count()instead.
Applied to pci/dwc, thanks!
[1/1] PCI: dwc: Replace of_gpio_named_count() by gpiod_count()
https://git.kernel.org/lpieralisi/pci/c/2023f9c9190e
Thanks,
Lorenzo