mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-17 19:26:59 +08:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 4d1d3b02286889607ae65fbbe9b4ac1b9a71e3b3 Mon Sep 17 00:00:00 2001
|
|
From: Hector Martin <marcan@marcan.st>
|
|
Date: Sun, 6 Feb 2022 21:13:17 +0900
|
|
Subject: [PATCH 163/171] PCI: apple: Use devm managed GPIO getter
|
|
|
|
Without this, if the driver fails to probe it will leak GPIO references.
|
|
Fix this by using the devm managed getter.
|
|
|
|
Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
|
|
Cc: stable@vger.kernel.org
|
|
Acked-by: Marc Zyngier <maz@kernel.org>
|
|
Signed-off-by: Hector Martin <marcan@marcan.st>
|
|
---
|
|
drivers/pci/controller/pcie-apple.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
|
|
index e6c34a0875b3..e0c06c0ee731 100644
|
|
--- a/drivers/pci/controller/pcie-apple.c
|
|
+++ b/drivers/pci/controller/pcie-apple.c
|
|
@@ -516,8 +516,8 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
|
|
u32 stat, idx;
|
|
int ret, i;
|
|
|
|
- reset = gpiod_get_from_of_node(np, "reset-gpios", 0,
|
|
- GPIOD_OUT_LOW, "PERST#");
|
|
+ reset = devm_gpiod_get_from_of_node(pcie->dev, np, "reset-gpios", 0,
|
|
+ GPIOD_OUT_LOW, "PERST#");
|
|
if (IS_ERR(reset))
|
|
return PTR_ERR(reset);
|
|
|
|
--
|
|
2.34.1
|
|
|