lkml.org 
[lkml]   [2017]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Bluettoth: btusb: Prevent USB devices to autosuspend while setting interface
Date
From: Abhijeet Kumar <abhijeet.kumar@intel.com>

Runtime resume USB device in order to ensure that PM framework knows
that the we might be using the device in a short time and doesn't
autosuspend the device while we update it's interface.

Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
---
drivers/bluetooth/btusb.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 7a5c06aaa181..588aabf991be 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1444,6 +1444,12 @@ static void btusb_work(struct work_struct *work)
data->sco_skb = NULL;
spin_unlock_irqrestore(&data->rxlock, flags);

+ /*
+ *Letting runtime PM know that we wish to use
+ *the device in a short time.
+ */
+ pm_runtime_get(&data->udev->dev);
+
if (__set_isoc_interface(hdev, new_alts) < 0)
return;
}
--
1.9.1
\
 
 \ /
  Last update: 2017-11-15 13:04    [W:0.154 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site