aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorGravatar Johan Hovold <johan+linaro@kernel.org> 2022-06-23 13:33:14 +0200
committerGravatar Vinod Koul <vkoul@kernel.org> 2022-07-05 12:33:26 +0530
commit5d5b7d509ff85675779caeafcffa8086d7094339 (patch)
treeffe8e131e9402864a0d6ba610fd0e7069f930150 /drivers/phy
parentphy: qcom-qmp-pcie-msm8996: drop obsolete pipe clock type check (diff)
downloadlinux-5d5b7d509ff85675779caeafcffa8086d7094339.tar.gz
linux-5d5b7d509ff85675779caeafcffa8086d7094339.tar.bz2
linux-5d5b7d509ff85675779caeafcffa8086d7094339.zip
phy: qcom-qmp-usb: clean up pipe clock handling
Clean up the pipe clock handling by using dev_err_probe() to handle probe deferral and dropping the obsolete comment that claimed that the pipe clock was optional for some other PHY types. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220623113314.29761-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-qmp-usb.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index aebe5ed4e4e3..40e87f75ec4a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2530,22 +2530,11 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id,
if (!qphy->pcs_misc)
dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
- /*
- * Get PHY's Pipe clock, if any. USB3 and PCIe are PIPE3
- * based phys, so they essentially have pipe clock. So,
- * we return error in case phy is USB3 or PIPE type.
- * Otherwise, we initialize pipe clock to NULL for
- * all phys that don't need this.
- */
snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
if (IS_ERR(qphy->pipe_clk)) {
- ret = PTR_ERR(qphy->pipe_clk);
- if (ret != -EPROBE_DEFER)
- dev_err(dev,
- "failed to get lane%d pipe_clk, %d\n",
- id, ret);
- return ret;
+ return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
+ "failed to get lane%d pipe clock\n", id);
}
generic_phy = devm_phy_create(dev, np, &qcom_qmp_phy_usb_ops);