History

[media] cec.h/cec-funcs.h: don't use bool in public headers

Replace bool by int or __u8 (when used in a struct).

Hans Verkuil committed 10 years ago

Commit 3145c751 parent 7ae2a882 files · +54 −53Browse files

Showing the changes to include/uapi/linux (2 of 2 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/cec-funcs.h +35 −35
  2. include/uapi/linux/cec.h +19 −18
include/uapi/linux/cec-funcs.h+35−35
@@ -84,7 +84,7 @@ static inline void cec_ops_inactive_source(const struct cec_msg *msg, · 83 unmodified lines
84}84}
85 85
86static inline void cec_msg_request_active_source(struct cec_msg *msg,86static inline void cec_msg_request_active_source(struct cec_msg *msg,
87 bool reply)87 int reply)
88{88{
89 msg->len = 2;89 msg->len = 2;
90 msg->msg[0] |= 0xf; /* broadcast */90 msg->msg[0] |= 0xf; /* broadcast */
@@ -109,7 +109,7 @@ static inline void cec_ops_routing_information(const struct cec_msg *msg, · 18 unmodified lines
109}109}
110 110
111static inline void cec_msg_routing_change(struct cec_msg *msg,111static inline void cec_msg_routing_change(struct cec_msg *msg,
112 bool reply,112 int reply,
113 __u16 orig_phys_addr,113 __u16 orig_phys_addr,
114 __u16 new_phys_addr)114 __u16 new_phys_addr)
115{115{
@@ -156,7 +156,7 @@ static inline void cec_msg_standby(struct cec_msg *msg) · 40 unmodified lines
156 156
157 157
158/* One Touch Record Feature */158/* One Touch Record Feature */
159static inline void cec_msg_record_off(struct cec_msg *msg, bool reply)159static inline void cec_msg_record_off(struct cec_msg *msg, int reply)
160{160{
161 msg->len = 2;161 msg->len = 2;
162 msg->msg[1] = CEC_MSG_RECORD_OFF;162 msg->msg[1] = CEC_MSG_RECORD_OFF;
@@ -318,7 +318,7 @@ static inline void cec_msg_record_on_phys_addr(struct cec_msg *msg, · 155 unmodified lines
318}318}
319 319
320static inline void cec_msg_record_on(struct cec_msg *msg,320static inline void cec_msg_record_on(struct cec_msg *msg,
321 bool reply,321 int reply,
322 const struct cec_op_record_src *rec_src)322 const struct cec_op_record_src *rec_src)
323{323{
324 switch (rec_src->type) {324 switch (rec_src->type) {
@@ -385,7 +385,7 @@ static inline void cec_ops_record_status(const struct cec_msg *msg, · 60 unmodified lines
385}385}
386 386
387static inline void cec_msg_record_tv_screen(struct cec_msg *msg,387static inline void cec_msg_record_tv_screen(struct cec_msg *msg,
388 bool reply)388 int reply)
389{389{
390 msg->len = 2;390 msg->len = 2;
391 msg->msg[1] = CEC_MSG_RECORD_TV_SCREEN;391 msg->msg[1] = CEC_MSG_RECORD_TV_SCREEN;
@@ -459,7 +459,7 @@ static inline void cec_ops_timer_cleared_status(const struct cec_msg *msg, · 67 unmodified lines
459}459}
460 460
461static inline void cec_msg_clear_analogue_timer(struct cec_msg *msg,461static inline void cec_msg_clear_analogue_timer(struct cec_msg *msg,
462 bool reply,462 int reply,
463 __u8 day,463 __u8 day,
464 __u8 month,464 __u8 month,
465 __u8 start_hr,465 __u8 start_hr,
@@ -514,7 +514,7 @@ static inline void cec_ops_clear_analogue_timer(const struct cec_msg *msg, · 48 unmodified lines
514}514}
515 515
516static inline void cec_msg_clear_digital_timer(struct cec_msg *msg,516static inline void cec_msg_clear_digital_timer(struct cec_msg *msg,
517 bool reply,517 int reply,
518 __u8 day,518 __u8 day,
519 __u8 month,519 __u8 month,
520 __u8 start_hr,520 __u8 start_hr,
@@ -560,7 +560,7 @@ static inline void cec_ops_clear_digital_timer(const struct cec_msg *msg, · 39 unmodified lines
560}560}
561 561
562static inline void cec_msg_clear_ext_timer(struct cec_msg *msg,562static inline void cec_msg_clear_ext_timer(struct cec_msg *msg,
563 bool reply,563 int reply,
564 __u8 day,564 __u8 day,
565 __u8 month,565 __u8 month,
566 __u8 start_hr,566 __u8 start_hr,
@@ -615,7 +615,7 @@ static inline void cec_ops_clear_ext_timer(const struct cec_msg *msg, · 48 unmodified lines
615}615}
616 616
617static inline void cec_msg_set_analogue_timer(struct cec_msg *msg,617static inline void cec_msg_set_analogue_timer(struct cec_msg *msg,
618 bool reply,618 int reply,
619 __u8 day,619 __u8 day,
620 __u8 month,620 __u8 month,
621 __u8 start_hr,621 __u8 start_hr,
@@ -670,7 +670,7 @@ static inline void cec_ops_set_analogue_timer(const struct cec_msg *msg, · 48 unmodified lines
670}670}
671 671
672static inline void cec_msg_set_digital_timer(struct cec_msg *msg,672static inline void cec_msg_set_digital_timer(struct cec_msg *msg,
673 bool reply,673 int reply,
674 __u8 day,674 __u8 day,
675 __u8 month,675 __u8 month,
676 __u8 start_hr,676 __u8 start_hr,
@@ -716,7 +716,7 @@ static inline void cec_ops_set_digital_timer(const struct cec_msg *msg, · 39 unmodified lines
716}716}
717 717
718static inline void cec_msg_set_ext_timer(struct cec_msg *msg,718static inline void cec_msg_set_ext_timer(struct cec_msg *msg,
719 bool reply,719 int reply,
720 __u8 day,720 __u8 day,
721 __u8 month,721 __u8 month,
722 __u8 start_hr,722 __u8 start_hr,
@@ -808,7 +808,7 @@ static inline void cec_ops_cec_version(const struct cec_msg *msg, · 85 unmodified lines
808}808}
809 809
810static inline void cec_msg_get_cec_version(struct cec_msg *msg,810static inline void cec_msg_get_cec_version(struct cec_msg *msg,
811 bool reply)811 int reply)
812{812{
813 msg->len = 2;813 msg->len = 2;
814 msg->msg[1] = CEC_MSG_GET_CEC_VERSION;814 msg->msg[1] = CEC_MSG_GET_CEC_VERSION;
@@ -834,7 +834,7 @@ static inline void cec_ops_report_physical_addr(const struct cec_msg *msg, · 19 unmodified lines
834}834}
835 835
836static inline void cec_msg_give_physical_addr(struct cec_msg *msg,836static inline void cec_msg_give_physical_addr(struct cec_msg *msg,
837 bool reply)837 int reply)
838{838{
839 msg->len = 2;839 msg->len = 2;
840 msg->msg[1] = CEC_MSG_GIVE_PHYSICAL_ADDR;840 msg->msg[1] = CEC_MSG_GIVE_PHYSICAL_ADDR;
@@ -858,7 +858,7 @@ static inline void cec_ops_set_menu_language(const struct cec_msg *msg, · 17 unmodified lines
858}858}
859 859
860static inline void cec_msg_get_menu_language(struct cec_msg *msg,860static inline void cec_msg_get_menu_language(struct cec_msg *msg,
861 bool reply)861 int reply)
862{862{
863 msg->len = 2;863 msg->len = 2;
864 msg->msg[1] = CEC_MSG_GET_MENU_LANGUAGE;864 msg->msg[1] = CEC_MSG_GET_MENU_LANGUAGE;
@@ -907,7 +907,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg, · 42 unmodified lines
907}907}
908 908
909static inline void cec_msg_give_features(struct cec_msg *msg,909static inline void cec_msg_give_features(struct cec_msg *msg,
910 bool reply)910 int reply)
911{911{
912 msg->len = 2;912 msg->len = 2;
913 msg->msg[1] = CEC_MSG_GIVE_FEATURES;913 msg->msg[1] = CEC_MSG_GIVE_FEATURES;
@@ -944,7 +944,7 @@ static inline void cec_ops_deck_status(const struct cec_msg *msg, · 30 unmodified lines
944}944}
945 945
946static inline void cec_msg_give_deck_status(struct cec_msg *msg,946static inline void cec_msg_give_deck_status(struct cec_msg *msg,
947 bool reply,947 int reply,
948 __u8 status_req)948 __u8 status_req)
949{949{
950 msg->len = 3;950 msg->len = 3;
@@ -978,7 +978,7 @@ static inline void cec_ops_play(const struct cec_msg *msg, · 27 unmodified lines
978struct cec_op_tuner_device_info {978struct cec_op_tuner_device_info {
979 __u8 rec_flag;979 __u8 rec_flag;
980 __u8 tuner_display_info;980 __u8 tuner_display_info;
981 bool is_analog;981 __u8 is_analog;
982 union {982 union {
983 struct cec_op_digital_service_id digital;983 struct cec_op_digital_service_id digital;
984 struct {984 struct {
@@ -1048,7 +1048,7 @@ static inline void cec_ops_tuner_device_status(const struct cec_msg *msg, · 63 unmodified lines
1048}1048}
1049 1049
1050static inline void cec_msg_give_tuner_device_status(struct cec_msg *msg,1050static inline void cec_msg_give_tuner_device_status(struct cec_msg *msg,
1051 bool reply,1051 int reply,
1052 __u8 status_req)1052 __u8 status_req)
1053{1053{
1054 msg->len = 3;1054 msg->len = 3;
@@ -1131,7 +1131,7 @@ static inline void cec_ops_device_vendor_id(const struct cec_msg *msg, · 76 unmodified lines
1131}1131}
1132 1132
1133static inline void cec_msg_give_device_vendor_id(struct cec_msg *msg,1133static inline void cec_msg_give_device_vendor_id(struct cec_msg *msg,
1134 bool reply)1134 int reply)
1135{1135{
1136 msg->len = 2;1136 msg->len = 2;
1137 msg->msg[1] = CEC_MSG_GIVE_DEVICE_VENDOR_ID;1137 msg->msg[1] = CEC_MSG_GIVE_DEVICE_VENDOR_ID;
@@ -1267,7 +1267,7 @@ static inline void cec_ops_set_osd_name(const struct cec_msg *msg, · 129 unmodified lines
1267}1267}
1268 1268
1269static inline void cec_msg_give_osd_name(struct cec_msg *msg,1269static inline void cec_msg_give_osd_name(struct cec_msg *msg,
1270 bool reply)1270 int reply)
1271{1271{
1272 msg->len = 2;1272 msg->len = 2;
1273 msg->msg[1] = CEC_MSG_GIVE_OSD_NAME;1273 msg->msg[1] = CEC_MSG_GIVE_OSD_NAME;
@@ -1291,7 +1291,7 @@ static inline void cec_ops_menu_status(const struct cec_msg *msg, · 17 unmodified lines
1291}1291}
1292 1292
1293static inline void cec_msg_menu_request(struct cec_msg *msg,1293static inline void cec_msg_menu_request(struct cec_msg *msg,
1294 bool reply,1294 int reply,
1295 __u8 menu_req)1295 __u8 menu_req)
1296{1296{
1297 msg->len = 3;1297 msg->len = 3;
@@ -1308,7 +1308,7 @@ static inline void cec_ops_menu_request(const struct cec_msg *msg, · 10 unmodified lines
1308 1308
1309struct cec_op_ui_command {1309struct cec_op_ui_command {
1310 __u8 ui_cmd;1310 __u8 ui_cmd;
1311 bool has_opt_arg;1311 __u8 has_opt_arg;
1312 union {1312 union {
1313 struct cec_op_channel_data channel_identifier;1313 struct cec_op_channel_data channel_identifier;
1314 __u8 ui_broadcast_type;1314 __u8 ui_broadcast_type;
@@ -1354,7 +1354,7 @@ static inline void cec_ops_user_control_pressed(const struct cec_msg *msg, · 39 unmodified lines
1354 struct cec_op_ui_command *ui_cmd)1354 struct cec_op_ui_command *ui_cmd)
1355{1355{
1356 ui_cmd->ui_cmd = msg->msg[2];1356 ui_cmd->ui_cmd = msg->msg[2];
1357 ui_cmd->has_opt_arg = false;1357 ui_cmd->has_opt_arg = 0;
1358 if (msg->len == 3)1358 if (msg->len == 3)
1359 return;1359 return;
1360 switch (ui_cmd->ui_cmd) {1360 switch (ui_cmd->ui_cmd) {
@@ -1366,12 +1366,12 @@ static inline void cec_ops_user_control_pressed(const struct cec_msg *msg, · 5 unmodified lines
1366 case 0x6a:1366 case 0x6a:
1367 /* The optional operand is one byte for all these ui commands */1367 /* The optional operand is one byte for all these ui commands */
1368 ui_cmd->play_mode = msg->msg[3];1368 ui_cmd->play_mode = msg->msg[3];
1369 ui_cmd->has_opt_arg = true;1369 ui_cmd->has_opt_arg = 1;
1370 break;1370 break;
1371 case 0x67:1371 case 0x67:
1372 if (msg->len < 7)1372 if (msg->len < 7)
1373 break;1373 break;
1374 ui_cmd->has_opt_arg = true;1374 ui_cmd->has_opt_arg = 1;
1375 ui_cmd->channel_identifier.channel_number_fmt = msg->msg[3] >> 2;1375 ui_cmd->channel_identifier.channel_number_fmt = msg->msg[3] >> 2;
1376 ui_cmd->channel_identifier.major = ((msg->msg[3] & 3) << 6) | msg->msg[4];1376 ui_cmd->channel_identifier.major = ((msg->msg[3] & 3) << 6) | msg->msg[4];
1377 ui_cmd->channel_identifier.minor = (msg->msg[5] << 8) | msg->msg[6];1377 ui_cmd->channel_identifier.minor = (msg->msg[5] << 8) | msg->msg[6];
@@ -1403,7 +1403,7 @@ static inline void cec_ops_report_power_status(const struct cec_msg *msg, · 25 unmodified lines
1403}1403}
1404 1404
1405static inline void cec_msg_give_device_power_status(struct cec_msg *msg,1405static inline void cec_msg_give_device_power_status(struct cec_msg *msg,
1406 bool reply)1406 int reply)
1407{1407{
1408 msg->len = 2;1408 msg->len = 2;
1409 msg->msg[1] = CEC_MSG_GIVE_DEVICE_POWER_STATUS;1409 msg->msg[1] = CEC_MSG_GIVE_DEVICE_POWER_STATUS;
@@ -1463,7 +1463,7 @@ static inline void cec_ops_report_audio_status(const struct cec_msg *msg, · 53 unmodified lines
1463}1463}
1464 1464
1465static inline void cec_msg_give_audio_status(struct cec_msg *msg,1465static inline void cec_msg_give_audio_status(struct cec_msg *msg,
1466 bool reply)1466 int reply)
1467{1467{
1468 msg->len = 2;1468 msg->len = 2;
1469 msg->msg[1] = CEC_MSG_GIVE_AUDIO_STATUS;1469 msg->msg[1] = CEC_MSG_GIVE_AUDIO_STATUS;
@@ -1485,7 +1485,7 @@ static inline void cec_ops_set_system_audio_mode(const struct cec_msg *msg, · 15 unmodified lines
1485}1485}
1486 1486
1487static inline void cec_msg_system_audio_mode_request(struct cec_msg *msg,1487static inline void cec_msg_system_audio_mode_request(struct cec_msg *msg,
1488 bool reply,1488 int reply,
1489 __u16 phys_addr)1489 __u16 phys_addr)
1490{1490{
1491 msg->len = phys_addr == 0xffff ? 2 : 4;1491 msg->len = phys_addr == 0xffff ? 2 : 4;
@@ -1520,7 +1520,7 @@ static inline void cec_ops_system_audio_mode_status(const struct cec_msg *msg, · 28 unmodified lines
1520}1520}
1521 1521
1522static inline void cec_msg_give_system_audio_mode_status(struct cec_msg *msg,1522static inline void cec_msg_give_system_audio_mode_status(struct cec_msg *msg,
1523 bool reply)1523 int reply)
1524{1524{
1525 msg->len = 2;1525 msg->len = 2;
1526 msg->msg[1] = CEC_MSG_GIVE_SYSTEM_AUDIO_MODE_STATUS;1526 msg->msg[1] = CEC_MSG_GIVE_SYSTEM_AUDIO_MODE_STATUS;
@@ -1560,7 +1560,7 @@ static inline void cec_ops_report_short_audio_descriptor(const struct cec_msg *m · 33 unmodified lines
1560}1560}
1561 1561
1562static inline void cec_msg_request_short_audio_descriptor(struct cec_msg *msg,1562static inline void cec_msg_request_short_audio_descriptor(struct cec_msg *msg,
1563 bool reply,1563 int reply,
1564 __u8 num_descriptors,1564 __u8 num_descriptors,
1565 const __u8 *audio_format_id,1565 const __u8 *audio_format_id,
1566 const __u8 *audio_format_code)1566 const __u8 *audio_format_code)
@@ -1618,7 +1618,7 @@ static inline void cec_msg_report_arc_initiated(struct cec_msg *msg) · 51 unmodified lines
1618}1618}
1619 1619
1620static inline void cec_msg_initiate_arc(struct cec_msg *msg,1620static inline void cec_msg_initiate_arc(struct cec_msg *msg,
1621 bool reply)1621 int reply)
1622{1622{
1623 msg->len = 2;1623 msg->len = 2;
1624 msg->msg[1] = CEC_MSG_INITIATE_ARC;1624 msg->msg[1] = CEC_MSG_INITIATE_ARC;
@@ -1626,7 +1626,7 @@ static inline void cec_msg_initiate_arc(struct cec_msg *msg, · 1 unmodified line
1626}1626}
1627 1627
1628static inline void cec_msg_request_arc_initiation(struct cec_msg *msg,1628static inline void cec_msg_request_arc_initiation(struct cec_msg *msg,
1629 bool reply)1629 int reply)
1630{1630{
1631 msg->len = 2;1631 msg->len = 2;
1632 msg->msg[1] = CEC_MSG_REQUEST_ARC_INITIATION;1632 msg->msg[1] = CEC_MSG_REQUEST_ARC_INITIATION;
@@ -1640,7 +1640,7 @@ static inline void cec_msg_report_arc_terminated(struct cec_msg *msg) · 7 unmodified lines
1640}1640}
1641 1641
1642static inline void cec_msg_terminate_arc(struct cec_msg *msg,1642static inline void cec_msg_terminate_arc(struct cec_msg *msg,
1643 bool reply)1643 int reply)
1644{1644{
1645 msg->len = 2;1645 msg->len = 2;
1646 msg->msg[1] = CEC_MSG_TERMINATE_ARC;1646 msg->msg[1] = CEC_MSG_TERMINATE_ARC;
@@ -1648,7 +1648,7 @@ static inline void cec_msg_terminate_arc(struct cec_msg *msg, · 1 unmodified line
1648}1648}
1649 1649
1650static inline void cec_msg_request_arc_termination(struct cec_msg *msg,1650static inline void cec_msg_request_arc_termination(struct cec_msg *msg,
1651 bool reply)1651 int reply)
1652{1652{
1653 msg->len = 2;1653 msg->len = 2;
1654 msg->msg[1] = CEC_MSG_REQUEST_ARC_TERMINATION;1654 msg->msg[1] = CEC_MSG_REQUEST_ARC_TERMINATION;
@@ -1690,7 +1690,7 @@ static inline void cec_ops_report_current_latency(const struct cec_msg *msg, · 35 unmodified lines
1690}1690}
1691 1691
1692static inline void cec_msg_request_current_latency(struct cec_msg *msg,1692static inline void cec_msg_request_current_latency(struct cec_msg *msg,
1693 bool reply,1693 int reply,
1694 __u16 phys_addr)1694 __u16 phys_addr)
1695{1695{
1696 msg->len = 4;1696 msg->len = 4;
include/uapi/linux/cec.h+19−18
@@ -37,6 +37,7 @@ · 36 unmodified lines
37#define _CEC_UAPI_H37#define _CEC_UAPI_H
38 38
39#include <linux/types.h>39#include <linux/types.h>
40#include <linux/string.h>
40 41
41#define CEC_MAX_MSG_SIZE 1642#define CEC_MAX_MSG_SIZE 16
42 43
@@ -129,7 +130,7 @@ static inline int cec_msg_opcode(const struct cec_msg *msg) · 86 unmodified lines
129 * cec_msg_is_broadcast - return true if this is a broadcast message.130 * cec_msg_is_broadcast - return true if this is a broadcast message.
130 * @msg: the message structure131 * @msg: the message structure
131 */132 */
132static inline bool cec_msg_is_broadcast(const struct cec_msg *msg)133static inline int cec_msg_is_broadcast(const struct cec_msg *msg)
133{134{
134 return (msg->msg[0] & 0xf) == 0xf;135 return (msg->msg[0] & 0xf) == 0xf;
135}136}
@@ -184,14 +185,14 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg, · 48 unmodified lines
184#define CEC_RX_STATUS_TIMEOUT (1 << 1)185#define CEC_RX_STATUS_TIMEOUT (1 << 1)
185#define CEC_RX_STATUS_FEATURE_ABORT (1 << 2)186#define CEC_RX_STATUS_FEATURE_ABORT (1 << 2)
186 187
187static inline bool cec_msg_status_is_ok(const struct cec_msg *msg)188static inline int cec_msg_status_is_ok(const struct cec_msg *msg)
188{189{
189 if (msg->tx_status && !(msg->tx_status & CEC_TX_STATUS_OK))190 if (msg->tx_status && !(msg->tx_status & CEC_TX_STATUS_OK))
190 return false;191 return 0;
191 if (msg->rx_status && !(msg->rx_status & CEC_RX_STATUS_OK))192 if (msg->rx_status && !(msg->rx_status & CEC_RX_STATUS_OK))
192 return false;193 return 0;
193 if (!msg->tx_status && !msg->rx_status)194 if (!msg->tx_status && !msg->rx_status)
194 return false;195 return 0;
195 return !(msg->rx_status & CEC_RX_STATUS_FEATURE_ABORT);196 return !(msg->rx_status & CEC_RX_STATUS_FEATURE_ABORT);
196}197}
197 198
@@ -254,47 +255,47 @@ static inline bool cec_msg_status_is_ok(const struct cec_msg *msg) · 56 unmodified lines
254#define CEC_LOG_ADDR_MASK_SPECIFIC (1 << CEC_LOG_ADDR_SPECIFIC)255#define CEC_LOG_ADDR_MASK_SPECIFIC (1 << CEC_LOG_ADDR_SPECIFIC)
255#define CEC_LOG_ADDR_MASK_UNREGISTERED (1 << CEC_LOG_ADDR_UNREGISTERED)256#define CEC_LOG_ADDR_MASK_UNREGISTERED (1 << CEC_LOG_ADDR_UNREGISTERED)
256 257
257static inline bool cec_has_tv(__u16 log_addr_mask)258static inline int cec_has_tv(__u16 log_addr_mask)
258{259{
259 return log_addr_mask & CEC_LOG_ADDR_MASK_TV;260 return log_addr_mask & CEC_LOG_ADDR_MASK_TV;
260}261}
261 262
262static inline bool cec_has_record(__u16 log_addr_mask)263static inline int cec_has_record(__u16 log_addr_mask)
263{264{
264 return log_addr_mask & CEC_LOG_ADDR_MASK_RECORD;265 return log_addr_mask & CEC_LOG_ADDR_MASK_RECORD;
265}266}
266 267
267static inline bool cec_has_tuner(__u16 log_addr_mask)268static inline int cec_has_tuner(__u16 log_addr_mask)
268{269{
269 return log_addr_mask & CEC_LOG_ADDR_MASK_TUNER;270 return log_addr_mask & CEC_LOG_ADDR_MASK_TUNER;
270}271}
271 272
272static inline bool cec_has_playback(__u16 log_addr_mask)273static inline int cec_has_playback(__u16 log_addr_mask)
273{274{
274 return log_addr_mask & CEC_LOG_ADDR_MASK_PLAYBACK;275 return log_addr_mask & CEC_LOG_ADDR_MASK_PLAYBACK;
275}276}
276 277
277static inline bool cec_has_audiosystem(__u16 log_addr_mask)278static inline int cec_has_audiosystem(__u16 log_addr_mask)
278{279{
279 return log_addr_mask & CEC_LOG_ADDR_MASK_AUDIOSYSTEM;280 return log_addr_mask & CEC_LOG_ADDR_MASK_AUDIOSYSTEM;
280}281}
281 282
282static inline bool cec_has_backup(__u16 log_addr_mask)283static inline int cec_has_backup(__u16 log_addr_mask)
283{284{
284 return log_addr_mask & CEC_LOG_ADDR_MASK_BACKUP;285 return log_addr_mask & CEC_LOG_ADDR_MASK_BACKUP;
285}286}
286 287
287static inline bool cec_has_specific(__u16 log_addr_mask)288static inline int cec_has_specific(__u16 log_addr_mask)
288{289{
289 return log_addr_mask & CEC_LOG_ADDR_MASK_SPECIFIC;290 return log_addr_mask & CEC_LOG_ADDR_MASK_SPECIFIC;
290}291}
291 292
292static inline bool cec_is_unregistered(__u16 log_addr_mask)293static inline int cec_is_unregistered(__u16 log_addr_mask)
293{294{
294 return log_addr_mask & CEC_LOG_ADDR_MASK_UNREGISTERED;295 return log_addr_mask & CEC_LOG_ADDR_MASK_UNREGISTERED;
295}296}
296 297
297static inline bool cec_is_unconfigured(__u16 log_addr_mask)298static inline int cec_is_unconfigured(__u16 log_addr_mask)
298{299{
299 return log_addr_mask == 0;300 return log_addr_mask == 0;
300}301}
@@ -1016,7 +1017,7 @@ struct cec_event { · 715 unmodified lines
1016 1017
1017/* Helper functions to identify the 'special' CEC devices */1018/* Helper functions to identify the 'special' CEC devices */
1018 1019
1019static inline bool cec_is_2nd_tv(const struct cec_log_addrs *las)1020static inline int cec_is_2nd_tv(const struct cec_log_addrs *las)
1020{1021{
1021 /*1022 /*
1022 * It is a second TV if the logical address is 14 or 15 and the1023 * 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) · 4 unmodified lines
1027 las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_TV;1028 las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_TV;
1028}1029}
1029 1030
1030static inline bool cec_is_processor(const struct cec_log_addrs *las)1031static inline int cec_is_processor(const struct cec_log_addrs *las)
1031{1032{
1032 /*1033 /*
1033 * It is a processor if the logical address is 12-15 and the1034 * 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) · 4 unmodified lines
1038 las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_PROCESSOR;1039 las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_PROCESSOR;
1039}1040}
1040 1041
1041static inline bool cec_is_switch(const struct cec_log_addrs *las)1042static inline int cec_is_switch(const struct cec_log_addrs *las)
1042{1043{
1043 /*1044 /*
1044 * It is a switch if the logical address is 15 and the1045 * 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) · 5 unmodified lines
1050 !(las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY);1051 !(las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY);
1051}1052}
1052 1053
1053static inline bool cec_is_cdc_only(const struct cec_log_addrs *las)1054static inline int cec_is_cdc_only(const struct cec_log_addrs *las)
1054{1055{
1055 /*1056 /*
1056 * It is a CDC-only device if the logical address is 15 and the1057 * It is a CDC-only device if the logical address is 15 and the