Skip to contentSkip to conversation

clk: mediatek: clk-mt8173-apmixedsys: Invoke platform_set_drvdata on probe

PATCH New Luca Leonardo Scorcia 1 participant 1 message Oct 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mediatek: clk-mt8173-apmixedsys: Invoke platform_set_drvdata on probe

The remove function for mt8173-apmixedsys needs drvdata to correctly unregister apmixedsys clocks, but the probe function never calls platform_set_drvdata. Add the missing call to platform_set_drvdata on probe success.

Fixes 4c02c9af3cb9 ("clk: mediatek: mt8173: Break down clock drivers and allow module build")

---
This issue was identified by Sashiko while I was working on the mt8167 apmixedsys, but it is present on the current mt8173 driver too.

 drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/mediatek/clk-mt8173-apmixedsys.c +2 -0
index d7d416172ab3..65dc4489a09c 100644
@@ -179,6 +179,8 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
 	if (r)
 		goto unregister_ref2usb;
 
+	platform_set_drvdata(pdev, clk_data);
+
 	return 0;
 
 unregister_ref2usb:
Signature · 1 line
2.43.0