diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-06-27 07:45:08 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:48 -0400 |
commit | a2b1976b8e0184635a1119f8511fc3e68902e429 (patch) | |
tree | b3b519a06233a9a68d1cf69c1b3101bda96e2121 /net | |
parent | b10e8017bd9d02a3c7975c06d8fa2fc39df1731c (diff) |
Bluetooth: Remove reason parameter from hci_amp_disconn function
The hci_amp_disconn function is a local function and there is no
need for a reason parameter. That one can be retrieved from the
hci_conn object easily.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 626160c37103..cc64fbe952fa 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -136,7 +136,7 @@ void hci_disconnect(struct hci_conn *conn, __u8 reason) | |||
136 | hci_send_cmd(conn->hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp); | 136 | hci_send_cmd(conn->hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp); |
137 | } | 137 | } |
138 | 138 | ||
139 | static void hci_amp_disconn(struct hci_conn *conn, __u8 reason) | 139 | static void hci_amp_disconn(struct hci_conn *conn) |
140 | { | 140 | { |
141 | struct hci_cp_disconn_phy_link cp; | 141 | struct hci_cp_disconn_phy_link cp; |
142 | 142 | ||
@@ -145,7 +145,7 @@ static void hci_amp_disconn(struct hci_conn *conn, __u8 reason) | |||
145 | conn->state = BT_DISCONN; | 145 | conn->state = BT_DISCONN; |
146 | 146 | ||
147 | cp.phy_handle = HCI_PHY_HANDLE(conn->handle); | 147 | cp.phy_handle = HCI_PHY_HANDLE(conn->handle); |
148 | cp.reason = reason; | 148 | cp.reason = hci_proto_disconn_ind(conn); |
149 | hci_send_cmd(conn->hdev, HCI_OP_DISCONN_PHY_LINK, | 149 | hci_send_cmd(conn->hdev, HCI_OP_DISCONN_PHY_LINK, |
150 | sizeof(cp), &cp); | 150 | sizeof(cp), &cp); |
151 | } | 151 | } |
@@ -273,13 +273,14 @@ void hci_sco_setup(struct hci_conn *conn, __u8 status) | |||
273 | 273 | ||
274 | static void hci_conn_disconnect(struct hci_conn *conn) | 274 | static void hci_conn_disconnect(struct hci_conn *conn) |
275 | { | 275 | { |
276 | __u8 reason = hci_proto_disconn_ind(conn); | 276 | __u8 reason; |
277 | 277 | ||
278 | switch (conn->type) { | 278 | switch (conn->type) { |
279 | case AMP_LINK: | 279 | case AMP_LINK: |
280 | hci_amp_disconn(conn, reason); | 280 | hci_amp_disconn(conn); |
281 | break; | 281 | break; |
282 | default: | 282 | default: |
283 | reason = hci_proto_disconn_ind(conn); | ||
283 | hci_disconnect(conn, reason); | 284 | hci_disconnect(conn, reason); |
284 | break; | 285 | break; |
285 | } | 286 | } |