Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	linux-media@vger.kernel.org, llvm@lists.linux.dev,
	 linux-kernel@vger.kernel.org, Ian Rogers <irogers@google.com>,
	 Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	 Samuel Holland <samuel@sholland.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	 Maxime Ripard <mripard@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	 linux-sunxi@lists.linux.dev
Subject: [PATCH 5/5] media: sunxi: a83t-mipi-csi2: Set .owner = THIS_MODULE in phy_ops
Date: Thu,  3 Dec 2026 09:15:47 -0800	[thread overview]
Message-ID: <20261203171549.438355-6-irogers@google.com> (raw)
In-Reply-To: <20261203171549.438355-1-irogers@google.com>

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@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



      parent reply	other threads:[~2026-12-03 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261203171549.438355-1-irogers@google.com>
2026-12-03 17:15 ` [PATCH 2/5] media: rockchip: rkcif: Set .owner = THIS_MODULE in v4l2_file_operations Ian Rogers
2026-12-03 17:15 ` [PATCH 3/5] media: rkisp1: " Ian Rogers
2026-12-03 17:15 ` Ian Rogers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203171549.438355-6-irogers@google.com \
    --to=irogers@google.com \
    --cc=hverkuil@kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=llvm@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=nathan@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox