summaryrefslogtreecommitdiff
path: root/include/uapi/linux/cec.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-11-04 13:23:27 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 20:43:10 +0300
commit3145c754aca8182b4cfe301b3cfe6dc8f2cb499c (patch)
tree5c4303225cf3a91a27f102bb6eb2630e9f7ea2db /include/uapi/linux/cec.h
parent7ae2a888eedd5a6b03849614eddd55f31793eeae (diff)
downloadlinux-3145c754aca8182b4cfe301b3cfe6dc8f2cb499c.tar.xz
[media] cec.h/cec-funcs.h: don't use bool in public headers
Replace bool by int or __u8 (when used in a struct). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/uapi/linux/cec.h')
-rw-r--r--include/uapi/linux/cec.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/include/uapi/linux/cec.h b/include/uapi/linux/cec.h
index f4ec0af67707..14b6f24b189e 100644
--- a/include/uapi/linux/cec.h
+++ b/include/uapi/linux/cec.h
@@ -37,6 +37,7 @@
#define _CEC_UAPI_H
#include <linux/types.h>
+#include <linux/string.h>
#define CEC_MAX_MSG_SIZE 16
@@ -129,7 +130,7 @@ static inline int cec_msg_opcode(const struct cec_msg *msg)
* cec_msg_is_broadcast - return true if this is a broadcast message.
* @msg: the message structure
*/
-static inline bool cec_msg_is_broadcast(const struct cec_msg *msg)
+static inline int cec_msg_is_broadcast(const struct cec_msg *msg)
{
return (msg->msg[0] & 0xf) == 0xf;
}
@@ -184,14 +185,14 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg,
#define CEC_RX_STATUS_TIMEOUT (1 << 1)
#define CEC_RX_STATUS_FEATURE_ABORT (1 << 2)
-static inline bool cec_msg_status_is_ok(const struct cec_msg *msg)
+static inline int cec_msg_status_is_ok(const struct cec_msg *msg)
{
if (msg->tx_status && !(msg->tx_status & CEC_TX_STATUS_OK))
- return false;
+ return 0;
if (msg->rx_status && !(msg->rx_status & CEC_RX_STATUS_OK))
- return false;
+ return 0;
if (!msg->tx_status && !msg->rx_status)
- return false;
+ return 0;
return !(msg->rx_status & CEC_RX_STATUS_FEATURE_ABORT);
}
@@ -254,47 +255,47 @@ static inline bool cec_msg_status_is_ok(const struct cec_msg *msg)
#define CEC_LOG_ADDR_MASK_SPECIFIC (1 << CEC_LOG_ADDR_SPECIFIC)
#define CEC_LOG_ADDR_MASK_UNREGISTERED (1 << CEC_LOG_ADDR_UNREGISTERED)
-static inline bool cec_has_tv(__u16 log_addr_mask)
+static inline int cec_has_tv(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_TV;
}
-static inline bool cec_has_record(__u16 log_addr_mask)
+static inline int cec_has_record(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_RECORD;
}
-static inline bool cec_has_tuner(__u16 log_addr_mask)
+static inline int cec_has_tuner(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_TUNER;
}
-static inline bool cec_has_playback(__u16 log_addr_mask)
+static inline int cec_has_playback(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_PLAYBACK;
}
-static inline bool cec_has_audiosystem(__u16 log_addr_mask)
+static inline int cec_has_audiosystem(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_AUDIOSYSTEM;
}
-static inline bool cec_has_backup(__u16 log_addr_mask)
+static inline int cec_has_backup(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_BACKUP;
}
-static inline bool cec_has_specific(__u16 log_addr_mask)
+static inline int cec_has_specific(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_SPECIFIC;
}
-static inline bool cec_is_unregistered(__u16 log_addr_mask)
+static inline int cec_is_unregistered(__u16 log_addr_mask)
{
return log_addr_mask & CEC_LOG_ADDR_MASK_UNREGISTERED;
}
-static inline bool cec_is_unconfigured(__u16 log_addr_mask)
+static inline int cec_is_unconfigured(__u16 log_addr_mask)
{
return log_addr_mask == 0;
}
@@ -1016,7 +1017,7 @@ struct cec_event {
/* Helper functions to identify the 'special' CEC devices */
-static inline bool cec_is_2nd_tv(const struct cec_log_addrs *las)
+static inline int cec_is_2nd_tv(const struct cec_log_addrs *las)
{
/*
* It is a second TV if the logical address is 14 or 15 and the
@@ -1027,7 +1028,7 @@ static inline bool cec_is_2nd_tv(const struct cec_log_addrs *las)
las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_TV;
}
-static inline bool cec_is_processor(const struct cec_log_addrs *las)
+static inline int cec_is_processor(const struct cec_log_addrs *las)
{
/*
* It is a processor if the logical address is 12-15 and the
@@ -1038,7 +1039,7 @@ static inline bool cec_is_processor(const struct cec_log_addrs *las)
las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_PROCESSOR;
}
-static inline bool cec_is_switch(const struct cec_log_addrs *las)
+static inline int cec_is_switch(const struct cec_log_addrs *las)
{
/*
* It is a switch if the logical address is 15 and the
@@ -1050,7 +1051,7 @@ static inline bool cec_is_switch(const struct cec_log_addrs *las)
!(las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY);
}
-static inline bool cec_is_cdc_only(const struct cec_log_addrs *las)
+static inline int cec_is_cdc_only(const struct cec_log_addrs *las)
{
/*
* It is a CDC-only device if the logical address is 15 and the