From: Rajat Jain Date: Mon, 28 Jan 2019 23:08:09 +0000 (-0800) Subject: Bluetooth: btusb: btusb_intel_cmd_timeout: use sleeping functions X-Git-Tag: v5.4-rc1~1543^2~97^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2de66bb87351086ce9bef37c1b98d9bae93eddcd;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: btusb: btusb_intel_cmd_timeout: use sleeping functions The btusb_intel_cmd_timeout() is called from workqueue contexts, so use the helper functions that can sleep. Signed-off-by: Rajat Jain Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 5de0c2e..9a890b2 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -523,9 +523,9 @@ static void btusb_intel_cmd_timeout(struct hci_dev *hdev) } bt_dev_err(hdev, "Initiating HW reset via gpio"); - gpiod_set_value(reset_gpio, 1); - mdelay(100); - gpiod_set_value(reset_gpio, 0); + gpiod_set_value_cansleep(reset_gpio, 1); + msleep(100); + gpiod_set_value_cansleep(reset_gpio, 0); } static inline void btusb_free_frags(struct btusb_data *data)