summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2017-03-24 19:47:52 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-05 21:17:58 +0300
commit0b0b97dcc79fe2b34d320805c4389d87980a0e51 (patch)
tree117f607dd8abf984f68c3e2b38f016c24d273da7 /include/media
parentacf0e531a48bdf805fec024dcc2735a61933a213 (diff)
downloadlinux-0b0b97dcc79fe2b34d320805c4389d87980a0e51.tar.xz
[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@synopsys.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cec.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index 96a0aa770d61..0daff8c04f2e 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);