lkml.org 
[lkml]   [2019]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] Bluetooth: btusb: btusb_intel_cmd_timeout: use sleeping functions
From
The btusb_intel_cmd_timeout() is called from workqueue contexts,
so use the helper functions that can sleep.

Signed-off-by: Rajat Jain <rajatja@google.com>

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5de0c2e59b97..9a890b2a7ee1 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)
--
2.20.1.495.gaa96b0ce6b-goog
\
 
 \ /
  Last update: 2019-01-29 00:09    [W:0.035 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site