Skip to contentSkip to conversation

Bluetooth: btusb: btusb_intel_cmd_timeout: use sleeping functions

PATCH In review Rajat Jain 2 participants 2 messages Jan 28, 2019 – Jan 29, 2019 Bluetooth drivers

lore
Share & tools
lore

Rajat Jain

author
#0 lore raw

PATCH 1/1 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.

drivers/bluetooth/btusb.c +3 -3
index 5de0c2e59b97..9a890b2a7ee1 100644
@@ -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)
Signature · 1 line
2.20.1.495.gaa96b0ce6b-goog
maintainer
#1 lore raw

Hi Rajat,

Quoted 4 lines

The btusb_intel_cmd_timeout() is called from workqueue contexts, so use the helper functions that can sleep.

patch has been applied to bluetooth-next tree.

Regards

Marcel