[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <abb9e3086b6f5166cb7a3eac362d59e1d3358582.1490373499.git.joabreu@synopsys.com>
Date: Fri, 24 Mar 2017 16:47:52 +0000
From: Jose Abreu <Jose.Abreu@...opsys.com>
To: linux-media@...r.kernel.org
Cc: hans.verkuil@...co.com, mchehab@...nel.org,
linux-kernel@...r.kernel.org, Jose Abreu <Jose.Abreu@...opsys.com>
Subject: [PATCH 1/8] [media] cec: Add cec_get_drvdata()
Add a helper function to get driver private data from CEC
adapter. This helps the readability a little bit and allows
to change the 'priv' field name to something else without
needing to touch all drivers.
Signed-off-by: Jose Abreu <joabreu@...opsys.com>
Cc: Hans Verkuil <hans.verkuil@...co.com>
---
include/media/cec.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/media/cec.h b/include/media/cec.h
index 96a0aa7..0daff8c 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -184,6 +184,11 @@ struct cec_adapter {
char input_drv[32];
};
+static inline void *cec_get_drvdata(const struct cec_adapter *adap)
+{
+ return adap->priv;
+}
+
static inline bool cec_has_log_addr(const struct cec_adapter *adap, u8 log_addr)
{
return adap->log_addrs.log_addr_mask & (1 << log_addr);
--
1.9.1
Powered by blists - more mailing lists