[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240502-master-v1-1-8bd109c6a3ba@collabora.com>
Date: Thu, 02 May 2024 17:22:21 +0200
From: Julien Massot <julien.massot@...labora.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Jacopo Mondi <jacopo+renesas@...ndi.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Niklas Söderlund <niklas.soderlund+renesas@...natech.se>,
Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
Sylvain Petinot <sylvain.petinot@...s.st.com>,
Yong Zhi <yong.zhi@...el.com>, Bingbu Cao <bingbu.cao@...el.com>,
Dan Scally <djrscally@...il.com>, Tianshu Qiu <tian.shu.qiu@...el.com>,
Eugen Hristev <eugen.hristev@...labora.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Maxime Ripard <mripard@...nel.org>, Rui Miguel Silva <rmfrfs@...il.com>,
Martin Kepplinger <martink@...teo.de>, Purism Kernel Team <kernel@...i.sm>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Robert Foss <rfoss@...nel.org>,
Todor Tomov <todor.too@...il.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Dafna Hirschfeld <dafna@...tmail.com>, Heiko Stuebner <heiko@...ech.de>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Hugues Fruchet <hugues.fruchet@...s.st.com>,
Alain Volmat <alain.volmat@...s.st.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>, Yong Deng <yong.deng@...ewell.com>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Benoit Parrot <bparrot@...com>, Jai Luthra <j-luthra@...com>,
Philipp Zabel <p.zabel@...gutronix.de>, Michal Simek <michal.simek@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev,
linux-arm-msm@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com, linux-sunxi@...ts.linux.dev,
linux-staging@...ts.linux.dev, linux-tegra@...r.kernel.org,
Julien Massot <julien.massot@...labora.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: [PATCH 1/2] media: v4l: async: Add
v4l2_async_nf_unregister_cleanup
Many drivers are calling v4l2_async_nf_unregister, and
v4l2_async_nf_cleanup, add a function to do it.
Suggested-by: Sakari Ailus <sakari.ailus@....fi>
Signed-off-by: Julien Massot <julien.massot@...labora.com>
---
include/media/v4l2-async.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index f26c323e9c96..cdbe63c26779 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -304,6 +304,23 @@ void v4l2_async_nf_unregister(struct v4l2_async_notifier *notifier);
*/
void v4l2_async_nf_cleanup(struct v4l2_async_notifier *notifier);
+/**
+ * v4l2_async_nf_unregister_cleanup - unregister and clean up notifier resources
+ * @notifier: the notifier the notifier to unregister and for which
+ * the resources are to be cleaned up
+ *
+ * Unregister a subdevice asynchronous device and release memory resources
+ * related to a notifier.
+ * Convenient function to call v4l2_async_nf_unregister() and
+ * v4l2_async_nf_cleanup().
+ */
+static inline void
+v4l2_async_nf_unregister_cleanup(struct v4l2_async_notifier *notifier)
+{
+ v4l2_async_nf_unregister(notifier);
+ v4l2_async_nf_cleanup(notifier);
+};
+
/**
* v4l2_async_register_subdev - registers a sub-device to the asynchronous
* subdevice framework
--
2.44.0
Powered by blists - more mailing lists