Re: [PATCH v8 09/13] phy: tegra: xusb: Add wake/sleepwalk for Tegra210
From: Thierry Reding <hidden>
Date: 2021-03-26 12:44:52
Also in:
linux-tegra, linux-usb
From: Thierry Reding <hidden>
Date: 2021-03-26 12:44:52
Also in:
linux-tegra, linux-usb
On Thu, Mar 25, 2021 at 01:26:16PM -0700, Nathan Chancellor wrote:
On Thu, Mar 25, 2021 at 05:40:53PM +0100, Thierry Reding wrote:
[...]
quoted
@@ -2306,6 +3150,26 @@ tegra210_xusb_padctl_probe(struct device *dev, if (err < 0) return ERR_PTR(err); + np = of_parse_phandle(dev->of_node, "nvidia,pmc", 0); + if (!np) { + dev_warn(dev, "nvidia,pmc property is missing\n"); + goto out; + } + + pdev = of_find_device_by_node(np); + if (!pdev) { + dev_warn(dev, "PMC device is not available\n"); + goto out; + } + + if (!device_is_bound(&pdev->dev))This breaks arm64 allmodconfig: ERROR: modpost: "device_is_bound" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! https://github.com/ClangBuiltLinux/continuous-integration2/runs/2196101892?check_suite_focus=true
Good catch. I replaced this with: if (!platform_get_drvdata(pdev)) which will work fine and is equivalent, at least in this particular case. Thanks, Thierry