[PATCH 5/5] media: sunxi: a83t-mipi-csi2: Set .owner = THIS_MODULE in phy_ops

Ian Rogers irogers at google.com
Thu Dec 3 09:15:47 PST 2026


phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin
the PHY provider module while the PHY is in use, and of_phy_put() calls
module_put(phy->ops->owner). sun8i-a83t-mipi-csi2 can be built as a
module (CONFIG_VIDEO_SUN8I_A83T_MIPI_CSI2), so omitting .owner leaves
phy->ops->owner NULL.

Set .owner = THIS_MODULE in sun8i_a83t_dphy_ops, found with Clang's
require_explicit_initialization attribute.

Fixes: 576d196c522b ("media: sunxi: Add support for the A83T MIPI CSI-2 controller")
Signed-off-by: Ian Rogers <irogers at google.com>
---
 .../media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c
index 24bbcc85013d..b14982df5f25 100644
--- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c
+++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c
@@ -47,6 +47,7 @@ static const struct phy_ops sun8i_a83t_dphy_ops = {
 	.configure	= sun8i_a83t_dphy_configure,
 	.power_on	= sun8i_a83t_dphy_power_on,
 	.power_off	= sun8i_a83t_dphy_power_off,
+	.owner		= THIS_MODULE,
 };
 
 int sun8i_a83t_dphy_register(struct sun8i_a83t_mipi_csi2_device *csi2_dev)
-- 
2.56.1.839.g22a8290db9-goog




More information about the linux-arm-kernel mailing list