Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608667 > unrolled thread

[PATCH 1/8] [media] cec: Add cec_get_drvdata()

Started byJose Abreu <Jose.Abreu@synopsys.com>
First post2017-03-24 17:50 +0100
Last post2017-03-24 17:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/8] [media] cec: Add cec_get_drvdata() Jose Abreu <Jose.Abreu@synopsys.com> - 2017-03-24 17:50 +0100

#1608667 — [PATCH 1/8] [media] cec: Add cec_get_drvdata()

FromJose Abreu <Jose.Abreu@synopsys.com>
Date2017-03-24 17:50 +0100
Subject[PATCH 1/8] [media] cec: Add cec_get_drvdata()
Message-ID<toAzw-4jh-21@gated-at.bofh.it>
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>
Cc: Hans Verkuil <hans.verkuil@cisco.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web