From: abhijeet.kumar@intel.com
To: Marcel Holtmann <marcel@holtmann.org>,
Gustavo Padovan <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: abhijeet.kumar@intel.com
Subject: [PATCH] Bluettoth: btusb: Prevent USB devices to autosuspend while setting interface
Date: Wed, 15 Nov 2017 17:41:28 +0530 [thread overview]
Message-ID: <1510747888-13912-1-git-send-email-abhijeet.kumar@intel.com> (raw)
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
next reply other threads:[~2017-11-15 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 12:11 abhijeet.kumar [this message]
2017-11-15 13:54 ` Marcel Holtmann
2017-11-15 14:01 ` Bastien Nocera
2017-11-15 14:23 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1510747888-13912-1-git-send-email-abhijeet.kumar@intel.com \
--to=abhijeet.kumar@intel.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®