]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Bluetooth: Convert hdev->out to a bool type
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Jan 2012 07:49:58 +0000 (09:49 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 13 Feb 2012 15:01:28 +0000 (17:01 +0200)
The hdev->out variable is essentially a boolean so the type 'bool' makes
more sense than u8.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c

index 0938168ce602f5c64aa99c16e1666eae1462a041..520da44940e9423f4c35b7bf0a5f3ed379c01e0d 100644 (file)
@@ -282,7 +282,7 @@ struct hci_conn {
        __u16           state;
        __u8            mode;
        __u8            type;
-       __u8            out;
+       bool            out;
        __u8            attempt;
        __u8            dev_class[3];
        __u8            features[8];
index 8a4678a2c982f47a9466a538715ebd2fdd26c041..a707d19ee44ed44c53732d2b11e96bf457f7617a 100644 (file)
@@ -51,7 +51,7 @@ static void hci_le_connect(struct hci_conn *conn)
        struct hci_cp_le_create_conn cp;
 
        conn->state = BT_CONNECT;
-       conn->out = 1;
+       conn->out = true;
        conn->link_mode |= HCI_LM_MASTER;
        conn->sec_level = BT_SECURITY_LOW;
 
@@ -83,7 +83,7 @@ void hci_acl_connect(struct hci_conn *conn)
        BT_DBG("%p", conn);
 
        conn->state = BT_CONNECT;
-       conn->out = 1;
+       conn->out = true;
 
        conn->link_mode = HCI_LM_MASTER;
 
@@ -151,7 +151,7 @@ void hci_add_sco(struct hci_conn *conn, __u16 handle)
        BT_DBG("%p", conn);
 
        conn->state = BT_CONNECT;
-       conn->out = 1;
+       conn->out = true;
 
        conn->attempt++;
 
@@ -169,7 +169,7 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle)
        BT_DBG("%p", conn);
 
        conn->state = BT_CONNECT;
-       conn->out = 1;
+       conn->out = true;
 
        conn->attempt++;
 
index d9a8618ae156639d86e20731701c5ec497619431..f6c13153a5e7b34ce1baa0224ccb0b9ecddfcf0c 100644 (file)
@@ -1154,7 +1154,7 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
                if (!conn) {
                        conn = hci_conn_add(hdev, ACL_LINK, &cp->bdaddr);
                        if (conn) {
-                               conn->out = 1;
+                               conn->out = true;
                                conn->link_mode |= HCI_LM_MASTER;
                        } else
                                BT_ERR("No memory for new connection");
@@ -1526,7 +1526,7 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status)
                        conn = hci_conn_add(hdev, LE_LINK, &cp->peer_addr);
                        if (conn) {
                                conn->dst_type = cp->peer_addr_type;
-                               conn->out = 1;
+                               conn->out = true;
                        } else {
                                BT_ERR("No memory for new connection");
                        }