summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-11-23 16:50:51 -0200
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-12-03 15:59:59 -0200
commitffa88e02bc67a1496fae762ad899e8f49136e7a1 (patch)
tree19ccfa6766bea3adc5d9cbfe9f903e4299e18ef4 /include/net
parent20714bfef84d3e690c9c6f8e9cd46543b5ae1eed (diff)
downloadop-kernel-dev-ffa88e02bc67a1496fae762ad899e8f49136e7a1.zip
op-kernel-dev-ffa88e02bc67a1496fae762ad899e8f49136e7a1.tar.gz
Bluetooth: Move double negation to macros
Some comparisons needs to double negation(!!) in order to make the value of the field boolean. Add it to the macro makes the code more readable. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 76891a9..2f2b743 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -767,7 +767,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR)
#define lmp_pause_enc_capable(dev) ((dev)->features[5] & LMP_PAUSE_ENC)
#define lmp_ext_inq_capable(dev) ((dev)->features[6] & LMP_EXT_INQ)
-#define lmp_le_br_capable(dev) ((dev)->features[6] & LMP_SIMUL_LE_BR)
+#define lmp_le_br_capable(dev) !!((dev)->features[6] & LMP_SIMUL_LE_BR)
#define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR)
#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH)
#define lmp_lsto_capable(dev) ((dev)->features[7] & LMP_LSTO)
@@ -776,8 +776,8 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
/* ----- Extended LMP capabilities ----- */
#define lmp_host_ssp_capable(dev) ((dev)->host_features[0] & LMP_HOST_SSP)
-#define lmp_host_le_capable(dev) ((dev)->host_features[0] & LMP_HOST_LE)
-#define lmp_host_le_br_capable(dev) ((dev)->host_features[0] & LMP_HOST_LE_BREDR)
+#define lmp_host_le_capable(dev) !!((dev)->host_features[0] & LMP_HOST_LE)
+#define lmp_host_le_br_capable(dev) !!((dev)->host_features[0] & LMP_HOST_LE_BREDR)
/* ----- HCI protocols ----- */
#define HCI_PROTO_DEFER 0x01
OpenPOWER on IntegriCloud