From: Arnd Bergmann <arnd@arndb.de>
To: Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [media] cec: add missing inline stubs
Date: Fri, 1 Jul 2016 13:19:56 +0200 [thread overview]
Message-ID: <20160701112027.102024-1-arnd@arndb.de> (raw)
The linux/cec.h header file contains empty inline definitions for
a subset of the API for the case in which CEC is not enabled,
however we have driver that call other functions as well:
drivers/media/i2c/adv7604.c: In function 'adv76xx_cec_tx_raw_status':
drivers/media/i2c/adv7604.c:1956:3: error: implicit declaration of function 'cec_transmit_done' [-Werror=implicit-function-declaration]
drivers/media/i2c/adv7604.c: In function 'adv76xx_cec_isr':
drivers/media/i2c/adv7604.c:2012:4: error: implicit declaration of function 'cec_received_msg' [-Werror=implicit-function-declaration]
drivers/media/i2c/adv7604.c: In function 'adv76xx_probe':
drivers/media/i2c/adv7604.c:3482:20: error: implicit declaration of function 'cec_allocate_adapter' [-Werror=implicit-function-declaration]
This adds stubs for the remaining interfaces as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/media/cec.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/include/media/cec.h b/include/media/cec.h
index 9a791c08a789..c462f9b44074 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -208,6 +208,12 @@ void cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt,
void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg);
#else
+static inline struct cec_adapter *cec_allocate_adapter(
+ const struct cec_adap_ops *ops, void *priv, const char *name,
+ u32 caps, u8 available_las, struct device *parent)
+{
+ return NULL;
+}
static inline int cec_register_adapter(struct cec_adapter *adap)
{
@@ -227,6 +233,25 @@ static inline void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr,
{
}
+static inline int cec_transmit_msg(struct cec_adapter *adap,
+ struct cec_msg *msg, bool block)
+{
+ return 0;
+}
+
+/* Called by the adapter */
+static inline void cec_transmit_done(struct cec_adapter *adap, u8 status,
+ u8 arb_lost_cnt, u8 nack_cnt,
+ u8 low_drive_cnt, u8 error_cnt)
+{
+}
+
+static inline void cec_received_msg(struct cec_adapter *adap,
+ struct cec_msg *msg)
+{
+}
+
+
#endif
#endif /* _MEDIA_CEC_H */
--
2.9.0
next reply other threads:[~2016-07-01 11:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 11:19 Arnd Bergmann [this message]
2016-07-01 14:35 ` Hans Verkuil
2016-07-01 15:13 ` Arnd Bergmann
2016-07-01 15:22 ` Hans Verkuil
2016-07-01 15:37 ` Arnd Bergmann
2016-07-01 17:30 ` Hans Verkuil
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=20160701112027.102024-1-arnd@arndb.de \
--to=arnd@arndb.de \
--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®