summaryrefslogtreecommitdiff
path: root/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2022-11-11 12:42:38 +0300
committerVinod Koul <vkoul@kernel.org>2022-11-24 20:25:17 +0300
commit64e1f12b2658c1abca55cffd9413f2d3c3bbfa8f (patch)
tree4828cd57124818d8cebdd2cc830b5fc564a9cc1c /drivers/phy/qualcomm/phy-qcom-qmp-usb.c
parent905abf1229efd33aa57f3f65881c378770dfbb65 (diff)
downloadlinux-64e1f12b2658c1abca55cffd9413f2d3c3bbfa8f.tar.xz
phy: qcom-qmp-usb: drop redundant clock allocation
Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20221111094239.11547-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/qualcomm/phy-qcom-qmp-usb.c')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-qmp-usb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 64b9472a1a70..4aa338fc4643 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -1485,6 +1485,8 @@ struct qmp_usb {
enum phy_mode mode;
struct phy *phy;
+
+ struct clk_fixed_rate pipe_clk_fixed;
};
static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val)
@@ -2357,7 +2359,7 @@ static void phy_clk_release_provider(void *res)
*/
static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
{
- struct clk_fixed_rate *fixed;
+ struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed;
struct clk_init_data init = { };
int ret;
@@ -2367,10 +2369,6 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
return ret;
}
- fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL);
- if (!fixed)
- return -ENOMEM;
-
init.ops = &clk_fixed_rate_ops;
/* controllers using QMP phys use 125MHz pipe clock interface */