* [PATCH 1/3] Bluetooth: Remove reason parameter from hci_amp_disconn function
@ 2014-06-27 11:45 Marcel Holtmann
2014-06-27 11:53 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2014-06-27 11:45 UTC (permalink / raw)
To: linux-bluetooth
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>
---
net/bluetooth/hci_conn.c | 9 +++++----
1 file 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)
hci_send_cmd(conn->hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp);
}
-static void hci_amp_disconn(struct hci_conn *conn, __u8 reason)
+static void hci_amp_disconn(struct hci_conn *conn)
{
struct hci_cp_disconn_phy_link cp;
@@ -145,7 +145,7 @@ static void hci_amp_disconn(struct hci_conn *conn, __u8 reason)
conn->state = BT_DISCONN;
cp.phy_handle = HCI_PHY_HANDLE(conn->handle);
- cp.reason = reason;
+ cp.reason = hci_proto_disconn_ind(conn);
hci_send_cmd(conn->hdev, HCI_OP_DISCONN_PHY_LINK,
sizeof(cp), &cp);
}
@@ -273,13 +273,14 @@ void hci_sco_setup(struct hci_conn *conn, __u8 status)
static void hci_conn_disconnect(struct hci_conn *conn)
{
- __u8 reason = hci_proto_disconn_ind(conn);
+ __u8 reason;
switch (conn->type) {
case AMP_LINK:
- hci_amp_disconn(conn, reason);
+ hci_amp_disconn(conn);
break;
default:
+ reason = hci_proto_disconn_ind(conn);
hci_disconnect(conn, reason);
break;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] Bluetooth: Remove reason parameter from hci_amp_disconn function
2014-06-27 11:45 [PATCH 1/3] Bluetooth: Remove reason parameter from hci_amp_disconn function Marcel Holtmann
@ 2014-06-27 11:53 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2014-06-27 11:53 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Fri, Jun 27, 2014, Marcel Holtmann wrote:
> 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>
> ---
> net/bluetooth/hci_conn.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
All three patches have been applied to bluetooth-next. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-27 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-27 11:45 [PATCH 1/3] Bluetooth: Remove reason parameter from hci_amp_disconn function Marcel Holtmann
2014-06-27 11:53 ` Johan Hedberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.