summaryrefslogtreecommitdiff
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-01-10 16:32:10 +0100
committerMarcel Holtmann <marcel@holtmann.org>2018-01-10 19:00:14 +0100
commite4b9e5b8618dc59f5de5cecf4e0188a3cdcd5648 (patch)
treeb643a9756385aeb1e09f5499c75853b612be7de9 /include/linux/interrupt.h
parent5954cdf1793a0e1296e495884669c79f9ef2b2b3 (diff)
downloadlinux-e4b9e5b8618dc59f5de5cecf4e0188a3cdcd5648.tar.gz
linux-e4b9e5b8618dc59f5de5cecf4e0188a3cdcd5648.tar.xz
Bluetooth: hci_bcm: Sleep instead of spinning
The driver calls mdelay(15) in the ->suspend, ->resume, ->runtime_suspend and ->runtime_resume hook, however spinning for such a long period of time is discouraged as per Documentation/timers/timers-howto.txt. The use of mdelay() seems unnecessary, it is allowed to sleep in the system sleep and runtime PM hooks (with the exception of ->suspend_noirq and ->resume_noirq) and the driver itself also does not rely on a non-sleeping ->runtime_resume as the only place where a synchronous resume is performed, in bcm_dequeue(), is called from a work item in hci_ldisc.c and hci_serdev.c. So replace the mdelay(15) with msleep(15). Note that the delay is inserted after asserting or deasserting the device wake pin, but in bcm_gpio_set_power() that pin is asserted or deasserted *without* observing a delay. It is thus unclear if the delay is necessary at all. It is likewise unclear why it is exactly 15 ms, the commit introducing it, 118612fb9165 ("Bluetooth: hci_bcm: Add suspend/resume PM functions"), does not provide a rationale. Cc: Frédéric Danis <frederic.danis.oss@gmail.com> Suggested-and-reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/linux/interrupt.h')
0 files changed, 0 insertions, 0 deletions