Message ID | 20220920073826.20811-7-johan+linaro@kernel.org |
---|---|
State | Accepted |
Commit | fe2da191f125d299835e0bb299e7b35f68aa26e6 |
Headers | show |
Series | phy: qcom-qmp: config and misc clean ups | expand |
On 20/09/2022 09:38, Johan Hovold wrote: > Drop the unnecessary PHY init and exit callback wrappers. > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > --- > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++--------------------- > 1 file changed, 4 insertions(+), 25 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > index 03481b6f1c35..a42e13905c15 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > @@ -2125,8 +2125,9 @@ static int qmp_usb_serdes_init(struct qmp_phy *qphy) > return 0; > } > > -static int qmp_usb_com_init(struct qmp_phy *qphy) > +static int qmp_usb_init(struct phy *phy) > { > + struct qmp_phy *qphy = phy_get_drvdata(phy); > struct qcom_qmp *qmp = qphy->qmp; > const struct qmp_phy_cfg *cfg = qphy->cfg; > void __iomem *pcs = qphy->pcs; > @@ -2197,8 +2198,9 @@ static int qmp_usb_com_init(struct qmp_phy *qphy) > return ret; > } > > -static int qmp_usb_com_exit(struct qmp_phy *qphy) > +static int qmp_usb_exit(struct phy *phy) > { > + struct qmp_phy *qphy = phy_get_drvdata(phy); > struct qcom_qmp *qmp = qphy->qmp; > const struct qmp_phy_cfg *cfg = qphy->cfg; > > @@ -2211,20 +2213,6 @@ static int qmp_usb_com_exit(struct qmp_phy *qphy) > return 0; > } > > -static int qmp_usb_init(struct phy *phy) > -{ > - struct qmp_phy *qphy = phy_get_drvdata(phy); > - struct qcom_qmp *qmp = qphy->qmp; > - int ret; > - dev_vdbg(qmp->dev, "Initializing QMP phy\n"); > - > - ret = qmp_usb_com_init(qphy); > - if (ret) > - return ret; > - > - return 0; > -} > - > static int qmp_usb_power_on(struct phy *phy) > { > struct qmp_phy *qphy = phy_get_drvdata(phy); > @@ -2316,15 +2304,6 @@ static int qmp_usb_power_off(struct phy *phy) > return 0; > } > > -static int qmp_usb_exit(struct phy *phy) > -{ > - struct qmp_phy *qphy = phy_get_drvdata(phy); > - > - qmp_usb_com_exit(qphy); > - > - return 0; > -} > - > static int qmp_usb_enable(struct phy *phy) > { > int ret; Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 20/09/2022 10:38, Johan Hovold wrote: > Drop the unnecessary PHY init and exit callback wrappers. > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > --- > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++--------------------- > 1 file changed, 4 insertions(+), 25 deletions(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 03481b6f1c35..a42e13905c15 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2125,8 +2125,9 @@ static int qmp_usb_serdes_init(struct qmp_phy *qphy) return 0; } -static int qmp_usb_com_init(struct qmp_phy *qphy) +static int qmp_usb_init(struct phy *phy) { + struct qmp_phy *qphy = phy_get_drvdata(phy); struct qcom_qmp *qmp = qphy->qmp; const struct qmp_phy_cfg *cfg = qphy->cfg; void __iomem *pcs = qphy->pcs; @@ -2197,8 +2198,9 @@ static int qmp_usb_com_init(struct qmp_phy *qphy) return ret; } -static int qmp_usb_com_exit(struct qmp_phy *qphy) +static int qmp_usb_exit(struct phy *phy) { + struct qmp_phy *qphy = phy_get_drvdata(phy); struct qcom_qmp *qmp = qphy->qmp; const struct qmp_phy_cfg *cfg = qphy->cfg; @@ -2211,20 +2213,6 @@ static int qmp_usb_com_exit(struct qmp_phy *qphy) return 0; } -static int qmp_usb_init(struct phy *phy) -{ - struct qmp_phy *qphy = phy_get_drvdata(phy); - struct qcom_qmp *qmp = qphy->qmp; - int ret; - dev_vdbg(qmp->dev, "Initializing QMP phy\n"); - - ret = qmp_usb_com_init(qphy); - if (ret) - return ret; - - return 0; -} - static int qmp_usb_power_on(struct phy *phy) { struct qmp_phy *qphy = phy_get_drvdata(phy); @@ -2316,15 +2304,6 @@ static int qmp_usb_power_off(struct phy *phy) return 0; } -static int qmp_usb_exit(struct phy *phy) -{ - struct qmp_phy *qphy = phy_get_drvdata(phy); - - qmp_usb_com_exit(qphy); - - return 0; -} - static int qmp_usb_enable(struct phy *phy) { int ret;
Drop the unnecessary PHY init and exit callback wrappers. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++--------------------- 1 file changed, 4 insertions(+), 25 deletions(-)