Skip to content

Commit

Permalink
Bluetooth: rtk_btusb: static init running_flag_lock
Browse files Browse the repository at this point in the history
rtk_btusb: RTKBT_RELEASE_NAME: 20200318_BT_ANDROID_9.0
rtk_btusb: Realtek Bluetooth USB driver module init, version 5.2.1
rtk_btusb: Register usb char device interface for BT driver
BUG: spinlock bad magic on CPU#0, swapper/0/1
 lock: running_flag_lock+0x0/0x38, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.194 FireflyTeam#10
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<ffffff800808a8c0>] dump_backtrace+0x0/0x1f4
[<ffffff800808aac8>] show_stack+0x14/0x1c
[<ffffff8008416248>] dump_stack+0xb4/0xf4
[<ffffff800810b1c0>] spin_dump+0x70/0x8c
[<ffffff800810b204>] spin_bug+0x28/0x34
[<ffffff800810b2a0>] do_raw_spin_lock+0x34/0x158
[<ffffff8008d68650>] _raw_spin_lock+0x48/0x54
[<ffffff80093b996c>] btusb_init+0x200/0x21c
[<ffffff80080834a8>] do_one_initcall+0x84/0x1a8
[<ffffff8009380f10>] kernel_init_freeable+0x278/0x27c
[<ffffff8008d61d3c>] kernel_init+0x10/0xf8
[<ffffff80080832d0>] ret_from_fork+0x10/0x40

Fixes: 4c267a4 ("Bluetooth: rtk_btusb: update rtk_btusb to version 5.2.1")
Change-Id: I6ea6c46a5abccc5848ec6e1538c4d7109135b725
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
  • Loading branch information
rkhuangtao committed Nov 5, 2020
1 parent 5374e9c commit b9af286
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/bluetooth/rtk_btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#define SET_WAKEUP_DEVICE 0


static spinlock_t queue_lock;
static spinlock_t running_flag_lock;
static DEFINE_SPINLOCK(queue_lock);
static DEFINE_SPINLOCK(running_flag_lock);
static volatile uint16_t driver_state = 0;

#if SUSPNED_DW_FW
Expand Down Expand Up @@ -4479,8 +4479,6 @@ static int btusb_probe(struct usb_interface *intf, const struct usb_device_id *i
data->udev = udev;
data->intf = intf;

spin_lock_init(&queue_lock);
spin_lock_init(&running_flag_lock);
spin_lock_init(&data->lock);

INIT_WORK(&data->work, btusb_work);
Expand Down

0 comments on commit b9af286

Please sign in to comment.