]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Bluetooth: 6lowpan: Remove unnecessary chan_open() function
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 6 Oct 2015 10:03:22 +0000 (13:03 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 8 Oct 2015 08:43:52 +0000 (10:43 +0200)
All the chan_open() function now does is to call chan_create() so it
doesn't really add any value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/6lowpan.c

index 023fa29db7093ea11ce331db089e746c421ee93b..77eb698d898e1ea536d08ce75f26adf53e1ba3ac 100644 (file)
@@ -780,17 +780,6 @@ static struct l2cap_chan *chan_create(void)
        return chan;
 }
 
-static struct l2cap_chan *chan_open(struct l2cap_chan *pchan)
-{
-       struct l2cap_chan *chan;
-
-       chan = chan_create();
-       if (!chan)
-               return NULL;
-
-       return chan;
-}
-
 static void set_ip_addr_bits(u8 addr_type, u8 *addr)
 {
        if (addr_type == BDADDR_LE_PUBLIC)
@@ -913,7 +902,10 @@ static inline struct l2cap_chan *chan_new_conn_cb(struct l2cap_chan *pchan)
 {
        struct l2cap_chan *chan;
 
-       chan = chan_open(pchan);
+       chan = chan_create();
+       if (!chan)
+               return NULL;
+
        chan->ops = pchan->ops;
 
        BT_DBG("chan %p pchan %p", chan, pchan);