aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <[email protected]>2020-09-16 16:11:57 -0700
committerVinod Koul <[email protected]>2020-09-28 11:27:53 +0530
commitdab7b10ddc83e5cdaef103cc08a162a2a2b03c15 (patch)
treeb62f89b4b6f93d77a4ebbb50c855545bcc4b44c0
parentaa968cb1a67e27de8a6d0f2012cffc53f256404a (diff)
phy: qcom-qmp: Get dp_com I/O resource by index
The dp_com resource is always at index 1 according to the dts files in the kernel. Get this resource by index so that we don't need to make future additions to the DT binding use 'reg-names'. Signed-off-by: Stephen Boyd <[email protected]> Cc: Jeykumar Sankaran <[email protected]> Cc: Chandan Uddaraju <[email protected]> Cc: Vara Reddy <[email protected]> Cc: Tanmay Shah <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Manu Gautam <[email protected]> Cc: Sandeep Maheswaram <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Sean Paul <[email protected]> Cc: Jonathan Marek <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Rob Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
-rw-r--r--drivers/phy/qualcomm/phy-qcom-qmp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 271cdf7aaffa..0dbe9969db37 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -3268,13 +3268,9 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
/* per PHY dp_com; if PHY has dp_com control block */
if (cfg->has_phy_dp_com_ctrl) {
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
- "dp_com");
- base = devm_ioremap_resource(dev, res);
- if (IS_ERR(base))
- return PTR_ERR(base);
-
- qmp->dp_com = base;
+ qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
+ if (IS_ERR(qmp->dp_com))
+ return PTR_ERR(qmp->dp_com);
}
mutex_init(&qmp->phy_mutex);