diff options
| author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-10-15 18:24:51 -0400 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-15 19:42:45 -0400 |
| commit | 74e7574066e020dca8ad8a57927470e67ea91394 (patch) | |
| tree | becd92c0eb03be5527fc1148296a48210339426d /net | |
| parent | dc25306b033cc27ca2a45b4bb307a437092408d1 (diff) | |
Bluetooth: use l2cap_chan_ready() instead of duplicate code
In this case the replacement by l2cap_chan_ready() doesn't change the code
flow, the same operations will executed plus two others that have no
effect: the use of the parent socket, that a non-oriented channel doesn't
have and the reset of conf_state, which is also fine since the connection
is ready at this point.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/bluetooth/l2cap_core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 39f02c08a882..72ce21a822f7 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
| @@ -1450,12 +1450,7 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) | |||
| 1450 | l2cap_chan_ready(chan); | 1450 | l2cap_chan_ready(chan); |
| 1451 | 1451 | ||
| 1452 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { | 1452 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { |
| 1453 | struct sock *sk = chan->sk; | 1453 | l2cap_chan_ready(chan); |
| 1454 | __clear_chan_timer(chan); | ||
| 1455 | lock_sock(sk); | ||
| 1456 | __l2cap_state_change(chan, BT_CONNECTED); | ||
| 1457 | sk->sk_state_change(sk); | ||
| 1458 | release_sock(sk); | ||
| 1459 | 1454 | ||
| 1460 | } else if (chan->state == BT_CONNECT) { | 1455 | } else if (chan->state == BT_CONNECT) { |
| 1461 | l2cap_do_start(chan); | 1456 | l2cap_do_start(chan); |
