summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-24 15:33:18 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-24 15:33:18 -0400
commit917c16b4d1c3081902c460841de1acdaa2e87c1d (patch)
tree0657102f293a1765e274a4412ebd46a1da980f88
parent6bffbff41541525ff4e7b9395357934914709b63 (diff)
downloadlongterm-queue-4.12-917c16b4d1c3081902c460841de1acdaa2e87c1d.tar.gz
phy: drop patch n/a for 4.12
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/phy-tegra-fix-device-tree-node-lookups.patch135
-rw-r--r--queue/series1
2 files changed, 0 insertions, 136 deletions
diff --git a/queue/phy-tegra-fix-device-tree-node-lookups.patch b/queue/phy-tegra-fix-device-tree-node-lookups.patch
deleted file mode 100644
index 69773ac..0000000
--- a/queue/phy-tegra-fix-device-tree-node-lookups.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 046046737bd35bed047460f080ea47e186be731e Mon Sep 17 00:00:00 2001
-From: Johan Hovold <johan@kernel.org>
-Date: Wed, 15 Nov 2017 10:43:16 +0100
-Subject: [PATCH] phy: tegra: fix device-tree node lookups
-
-commit 046046737bd35bed047460f080ea47e186be731e upstream.
-
-Fix child-node lookups during probe, which ended up searching the whole
-device tree depth-first starting at the parents rather than just
-matching on their children.
-
-To make things worse, some parent nodes could end up being being
-prematurely freed (by tegra_xusb_pad_register()) as
-of_find_node_by_name() drops a reference to its first argument.
-
-Fixes: 53d2a715c240 ("phy: Add Tegra XUSB pad controller support")
-Cc: stable <stable@vger.kernel.org> # 4.7
-Cc: Thierry Reding <treding@nvidia.com>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-
-diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
-index 4307bf0013e1..63e916d4d069 100644
---- a/drivers/phy/tegra/xusb.c
-+++ b/drivers/phy/tegra/xusb.c
-@@ -75,14 +75,14 @@ MODULE_DEVICE_TABLE(of, tegra_xusb_padctl_of_match);
- static struct device_node *
- tegra_xusb_find_pad_node(struct tegra_xusb_padctl *padctl, const char *name)
- {
-- /*
-- * of_find_node_by_name() drops a reference, so make sure to grab one.
-- */
-- struct device_node *np = of_node_get(padctl->dev->of_node);
-+ struct device_node *pads, *np;
-+
-+ pads = of_get_child_by_name(padctl->dev->of_node, "pads");
-+ if (!pads)
-+ return NULL;
-
-- np = of_find_node_by_name(np, "pads");
-- if (np)
-- np = of_find_node_by_name(np, name);
-+ np = of_get_child_by_name(pads, name);
-+ of_node_put(pads);
-
- return np;
- }
-@@ -90,16 +90,16 @@ tegra_xusb_find_pad_node(struct tegra_xusb_padctl *padctl, const char *name)
- static struct device_node *
- tegra_xusb_pad_find_phy_node(struct tegra_xusb_pad *pad, unsigned int index)
- {
-- /*
-- * of_find_node_by_name() drops a reference, so make sure to grab one.
-- */
-- struct device_node *np = of_node_get(pad->dev.of_node);
-+ struct device_node *np, *lanes;
-
-- np = of_find_node_by_name(np, "lanes");
-- if (!np)
-+ lanes = of_get_child_by_name(pad->dev.of_node, "lanes");
-+ if (!lanes)
- return NULL;
-
-- return of_find_node_by_name(np, pad->soc->lanes[index].name);
-+ np = of_get_child_by_name(lanes, pad->soc->lanes[index].name);
-+ of_node_put(lanes);
-+
-+ return np;
- }
-
- static int
-@@ -195,7 +195,7 @@ int tegra_xusb_pad_register(struct tegra_xusb_pad *pad,
- unsigned int i;
- int err;
-
-- children = of_find_node_by_name(pad->dev.of_node, "lanes");
-+ children = of_get_child_by_name(pad->dev.of_node, "lanes");
- if (!children)
- return -ENODEV;
-
-@@ -444,21 +444,21 @@ static struct device_node *
- tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
- unsigned int index)
- {
-- /*
-- * of_find_node_by_name() drops a reference, so make sure to grab one.
-- */
-- struct device_node *np = of_node_get(padctl->dev->of_node);
-+ struct device_node *ports, *np;
-+ char *name;
-
-- np = of_find_node_by_name(np, "ports");
-- if (np) {
-- char *name;
-+ ports = of_get_child_by_name(padctl->dev->of_node, "ports");
-+ if (!ports)
-+ return NULL;
-
-- name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
-- if (!name)
-- return ERR_PTR(-ENOMEM);
-- np = of_find_node_by_name(np, name);
-- kfree(name);
-+ name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
-+ if (!name) {
-+ of_node_put(ports);
-+ return ERR_PTR(-ENOMEM);
- }
-+ np = of_get_child_by_name(ports, name);
-+ kfree(name);
-+ of_node_put(ports);
-
- return np;
- }
-@@ -847,7 +847,7 @@ static void tegra_xusb_remove_ports(struct tegra_xusb_padctl *padctl)
-
- static int tegra_xusb_padctl_probe(struct platform_device *pdev)
- {
-- struct device_node *np = of_node_get(pdev->dev.of_node);
-+ struct device_node *np = pdev->dev.of_node;
- const struct tegra_xusb_padctl_soc *soc;
- struct tegra_xusb_padctl *padctl;
- const struct of_device_id *match;
-@@ -855,7 +855,7 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
- int err;
-
- /* for backwards compatibility with old device trees */
-- np = of_find_node_by_name(np, "pads");
-+ np = of_get_child_by_name(np, "pads");
- if (!np) {
- dev_warn(&pdev->dev, "deprecated DT, using legacy driver\n");
- return tegra_xusb_padctl_legacy_probe(pdev);
---
-2.15.0
-
diff --git a/queue/series b/queue/series
index 777141e..e56073c 100644
--- a/queue/series
+++ b/queue/series
@@ -70,7 +70,6 @@ usb-xhci-Add-XHCI_TRUST_TX_LENGTH-for-Renesas-uPD720.patch
timers-Use-deferrable-base-independent-of-base-nohz_.patch
timers-Invoke-timer_start_debug-where-it-makes-sense.patch
timers-Reinitialize-per-cpu-bases-on-hotplug.patch
-phy-tegra-fix-device-tree-node-lookups.patch
drivers-base-cacheinfo-fix-cache-type-for-non-archit.patch
staging-android-ion-Fix-dma-direction-for-dma_sync_s.patch
n_tty-fix-EXTPROC-vs-ICANON-interaction-with-TIOCINQ.patch