Commit 4e0a1d8b authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz
Browse files

Bluetooth: btusb: Don't suspend when there are connections



This checks if there are connections before suspending since that may
disrupt the connections making it stop receiving any data if remote
wakeup is not enabled.

Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 5d192b69
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4629,6 +4629,10 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)

	BT_DBG("intf %p", intf);

	/* Don't suspend if there are connections */
	if (hci_conn_count(data->hdev))
		return -EBUSY;

	if (data->suspend_count++)
		return 0;