Bluetooth: fix shadow warning in hci_disconnect()
authorFabian Frederick <fabf@skynet.be>
Sat, 25 Oct 2014 08:48:58 +0000 (10:48 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 25 Oct 2014 16:53:39 +0000 (18:53 +0200)
use clkoff_cp for hci_cp_read_clock_offset instead of cp
(already defined above).

Suggested-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_conn.c

index 11aac06d53ced7bf2e7d0cddf3a17b9b185076a9..6a3225bf7bacfe4aa8606d822bd2c58cde0f1f91 100644 (file)
@@ -141,10 +141,11 @@ int hci_disconnect(struct hci_conn *conn, __u8 reason)
         */
        if (conn->type == ACL_LINK && conn->role == HCI_ROLE_MASTER) {
                struct hci_dev *hdev = conn->hdev;
-               struct hci_cp_read_clock_offset cp;
+               struct hci_cp_read_clock_offset clkoff_cp;
 
-               cp.handle = cpu_to_le16(conn->handle);
-               hci_send_cmd(hdev, HCI_OP_READ_CLOCK_OFFSET, sizeof(cp), &cp);
+               clkoff_cp.handle = cpu_to_le16(conn->handle);
+               hci_send_cmd(hdev, HCI_OP_READ_CLOCK_OFFSET, sizeof(clkoff_cp),
+                            &clkoff_cp);
        }
 
        conn->state = BT_DISCONN;