blob: 11893ea11f05daeed95ff72c44d608cea781aa60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- a/drivers/phy/qualcomm/phy-qcom-dwc3.c
+++ b/drivers/phy/qualcomm/phy-qcom-dwc3.c
@@ -491,7 +491,6 @@ static int qcom_dwc3_phy_probe(struct pl
struct qcom_dwc3_usb_phy *phy_dwc3;
struct phy_provider *phy_provider;
struct phy *generic_phy;
- struct resource *res;
const struct of_device_id *match;
const struct qcom_dwc3_phy_drvdata *data;
struct device_node *np;
@@ -505,7 +504,17 @@ static int qcom_dwc3_phy_probe(struct pl
phy_dwc3->dev = &pdev->dev;
- phy_dwc3->base = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "regmap");
+ np = of_parse_phandle(pdev->dev.of_node, "regmap", 0);
+ if (!np)
+ return -ENODEV;
+
+ if (!of_device_is_compatible(np, "syscon"))
+ return -EINVAL;
+
+ phy_dwc3->base = device_node_to_regmap(np);
+
+ of_node_put(np);
+
if (IS_ERR_OR_NULL(phy_dwc3->base))
return PTR_ERR_OR_ZERO(phy_dwc3->base) ? : -EINVAL;
|