mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: linux-media@vger.kernel.org
Cc: hans.verkuil@cisco.com, mchehab@kernel.org,
	linux-kernel@vger.kernel.org,
	Jose Abreu <Jose.Abreu@synopsys.com>
Subject: [PATCH 1/8] [media] cec: Add cec_get_drvdata()
Date: Fri, 24 Mar 2017 16:47:52 +0000	[thread overview]
Message-ID: <abb9e3086b6f5166cb7a3eac362d59e1d3358582.1490373499.git.joabreu@synopsys.com> (raw)
In-Reply-To: <cover.1490373499.git.joabreu@synopsys.com>
In-Reply-To: <cover.1490373499.git.joabreu@synopsys.com>

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

  reply	other threads:[~2017-03-24 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 16:47 [PATCH 0/8] " Jose Abreu
2017-03-24 16:47 ` Jose Abreu [this message]
2017-03-24 16:47 ` [PATCH 2/8] [media] staging: st-cec: Use cec_get_drvdata() Jose Abreu
2017-03-28  9:17   ` Benjamin Gaignard
2017-03-28  9:41     ` Hans Verkuil
2017-03-24 16:47 ` [PATCH 3/8] [media] staging: s5p-cec: " Jose Abreu
2017-03-24 16:47 ` [PATCH 4/8] [media] i2c: adv7511: " Jose Abreu
2017-03-24 16:47 ` [PATCH 5/8] [media] i2c: adv7604: " Jose Abreu
2017-03-24 16:47 ` [PATCH 6/8] [media] i2c: adv7842: " Jose Abreu
2017-03-24 16:47 ` [PATCH 7/8] [media] usb: pulse8-cec: " Jose Abreu
2017-03-24 16:47 ` [PATCH 8/8] [media] platform: vivid: " Jose Abreu

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=abb9e3086b6f5166cb7a3eac362d59e1d3358582.1490373499.git.joabreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®