Skip to content

Commit e8511f4

Browse files
jhovoldvinodkoul
authored andcommitted
phy: qcom-qmp-pcie: 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 <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 64e1f12 commit e8511f4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-pcie.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,8 @@ struct qmp_pcie {
15501550

15511551
struct phy *phy;
15521552
int mode;
1553+
1554+
struct clk_fixed_rate pipe_clk_fixed;
15531555
};
15541556

15551557
static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val)
@@ -2416,7 +2418,7 @@ static void phy_clk_release_provider(void *res)
24162418
*/
24172419
static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np)
24182420
{
2419-
struct clk_fixed_rate *fixed;
2421+
struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed;
24202422
struct clk_init_data init = { };
24212423
int ret;
24222424

@@ -2426,10 +2428,6 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np)
24262428
return ret;
24272429
}
24282430

2429-
fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL);
2430-
if (!fixed)
2431-
return -ENOMEM;
2432-
24332431
init.ops = &clk_fixed_rate_ops;
24342432

24352433
/*

0 commit comments

Comments
 (0)