diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 4574c5cb1..c3653b067 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -1527,9 +1527,6 @@ static void l2cap_sock_close_cb(struct l2cap_chan *chan) { struct sock *sk = chan->data; - if (!sk) - return; - l2cap_sock_kill(sk); } @@ -1538,9 +1535,6 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err) struct sock *sk = chan->data; struct sock *parent; - if (!sk) - return; - BT_DBG("chan %p state %s", chan, state_to_string(chan->state)); /* This callback can be called both for server (BT_LISTEN) @@ -1732,10 +1726,8 @@ static void l2cap_sock_destruct(struct sock *sk) { BT_DBG("sk %p", sk); - if (l2cap_pi(sk)->chan) { - l2cap_pi(sk)->chan->data = NULL; + if (l2cap_pi(sk)->chan) l2cap_chan_put(l2cap_pi(sk)->chan); - } if (l2cap_pi(sk)->rx_busy_skb) { kfree_skb(l2cap_pi(sk)->rx_busy_skb); diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index cf165b0d1..2a14519a8 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -93,10 +93,10 @@ static void sco_sock_timeout(struct work_struct *work) BT_DBG("sock %p state %d", sk, sk->sk_state); - lock_sock(sk); + bh_lock_sock(sk); sk->sk_err = ETIMEDOUT; sk->sk_state_change(sk); - release_sock(sk); + bh_unlock_sock(sk); sock_put(sk); } @@ -193,10 +193,10 @@ static void sco_conn_del(struct hci_conn *hcon, int err) if (sk) { sock_hold(sk); - lock_sock(sk); + bh_lock_sock(sk); sco_sock_clear_timer(sk); sco_chan_del(sk, err); - release_sock(sk); + bh_unlock_sock(sk); sock_put(sk); } @@ -1103,10 +1103,10 @@ static void sco_conn_ready(struct sco_conn *conn) if (sk) { sco_sock_clear_timer(sk); - lock_sock(sk); + bh_lock_sock(sk); sk->sk_state = BT_CONNECTED; sk->sk_state_change(sk); - release_sock(sk); + bh_unlock_sock(sk); } else { sco_conn_lock(conn); @@ -1121,12 +1121,12 @@ static void sco_conn_ready(struct sco_conn *conn) return; } - lock_sock(parent); + bh_lock_sock(parent); sk = sco_sock_alloc(sock_net(parent), NULL, BTPROTO_SCO, GFP_ATOMIC, 0); if (!sk) { - release_sock(parent); + bh_unlock_sock(parent); sco_conn_unlock(conn); return; } @@ -1147,7 +1147,7 @@ static void sco_conn_ready(struct sco_conn *conn) /* Wake up parent */ parent->sk_data_ready(parent); - release_sock(parent); + bh_unlock_sock(parent); sco_conn_unlock(conn); } diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig index 83a7af898..33ab1f7a3 100644 --- a/net/rfkill/Kconfig +++ b/net/rfkill/Kconfig @@ -32,3 +32,12 @@ config RFKILL_GPIO help If you say yes here you get support of a generic gpio RFKILL driver. + +config RFKILL_RK + tristate "Rockchip RFKILL driver" + depends on RFKILL + depends on MMC + depends on ARCH_ROCKCHIP + default y + help + Rockchip rfkill driver for rk29/rk3X diff --git a/net/rfkill/Makefile b/net/rfkill/Makefile index dc47b6174..beed5b506 100644 --- a/net/rfkill/Makefile +++ b/net/rfkill/Makefile @@ -7,3 +7,5 @@ rfkill-y += core.o rfkill-$(CONFIG_RFKILL_INPUT) += input.o obj-$(CONFIG_RFKILL) += rfkill.o obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o +rfkill-rk-y += rfkill-wlan.o rfkill-bt.o +obj-$(CONFIG_RFKILL_RK) += rfkill-rk.o