[PATCH] clk: mediatek: clk-mt8173-apmixedsys: Invoke platform_set_drvdata on probe

Luca Leonardo Scorcia l.scorcia at gmail.com
Sat Oct 10 09:01:30 PDT 2026


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")
Signed-off-by: Luca Leonardo Scorcia <l.scorcia at gmail.com>
---
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(+)

diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
index d7d416172ab3..65dc4489a09c 100644
--- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
@@ -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:
-- 
2.43.0




More information about the Linux-mediatek mailing list