Skip to content

Commit 64e1f12

Browse files
jhovoldvinodkoul
authored andcommitted
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 <[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 905abf1 commit 64e1f12

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,8 @@ struct qmp_usb {
14851485
enum phy_mode mode;
14861486

14871487
struct phy *phy;
1488+
1489+
struct clk_fixed_rate pipe_clk_fixed;
14881490
};
14891491

14901492
static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val)
@@ -2357,7 +2359,7 @@ static void phy_clk_release_provider(void *res)
23572359
*/
23582360
static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
23592361
{
2360-
struct clk_fixed_rate *fixed;
2362+
struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed;
23612363
struct clk_init_data init = { };
23622364
int ret;
23632365

@@ -2367,10 +2369,6 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
23672369
return ret;
23682370
}
23692371

2370-
fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL);
2371-
if (!fixed)
2372-
return -ENOMEM;
2373-
23742372
init.ops = &clk_fixed_rate_ops;
23752373

23762374
/* controllers using QMP phys use 125MHz pipe clock interface */

0 commit comments

Comments
 (0)