aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-06-27 07:23:07 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:47 -0400
commitb10e8017bd9d02a3c7975c06d8fa2fc39df1731c (patch)
tree9abb0e5a43f7aaa7b64c1edfb23cb6fafea5b1a9 /net
parent642ac7745a45904d2a7c2463a3a3e60dc097be04 (diff)
Bluetooth: Remove unnecessary hcon->smp_conn variable
The smp_conn member of struct hci_conn was simply a pointer to the l2cap_conn object. Since we already have hcon->l2cap_data that points to the same thing there's no need to have this second variable. This patch removes it and changes the single place that was using it to use hcon->l2cap_data instead. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/smp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 641ce8b69d2a..414c5151aa46 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -584,7 +584,6 @@ static struct smp_chan *smp_chan_create(struct l2cap_conn *conn)
584 584
585 smp->conn = conn; 585 smp->conn = conn;
586 conn->smp_chan = smp; 586 conn->smp_chan = smp;
587 conn->hcon->smp_conn = conn;
588 587
589 hci_conn_hold(conn->hcon); 588 hci_conn_hold(conn->hcon);
590 589
@@ -626,13 +625,12 @@ void smp_chan_destroy(struct l2cap_conn *conn)
626 625
627 kfree(smp); 626 kfree(smp);
628 conn->smp_chan = NULL; 627 conn->smp_chan = NULL;
629 conn->hcon->smp_conn = NULL;
630 hci_conn_drop(conn->hcon); 628 hci_conn_drop(conn->hcon);
631} 629}
632 630
633int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey) 631int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey)
634{ 632{
635 struct l2cap_conn *conn = hcon->smp_conn; 633 struct l2cap_conn *conn = hcon->l2cap_data;
636 struct smp_chan *smp; 634 struct smp_chan *smp;
637 u32 value; 635 u32 value;
638 636