All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep()
@ 2014-05-30 10:27 Miguel Oliveira
  2014-05-30 11:34 ` Pavel Machek
  2014-05-30 16:01 ` Greg KH
  0 siblings, 2 replies; 27+ messages in thread
From: Miguel Oliveira @ 2014-05-30 10:27 UTC (permalink / raw)
  To: gregkh
  Cc: gulsah.1004, pavel, pali.rohar, peter.p.waskiewicz.jr, cmroliv,
	kristina.martsenko, linux-kernel

Creating this patch for the Eudyptula Challenge.
Replaced msleep() for a delay < 20ms with a usleep_range() between 10000us and 15000us.
Also inserted a blank line after adeclaration.

Signed-off-by: Miguel Oliveira <cmroliv@gmail.com>
---
 drivers/staging/nokia_h4p/nokia_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/nokia_h4p/nokia_core.c b/drivers/staging/nokia_h4p/nokia_core.c
index 5e19cd6..ba0506d 100644
--- a/drivers/staging/nokia_h4p/nokia_core.c
+++ b/drivers/staging/nokia_h4p/nokia_core.c
@@ -724,7 +724,7 @@ static int hci_h4p_reset(struct hci_h4p_info *info)

	gpio_set_value(info->reset_gpio, 0);
	gpio_set_value(info->bt_wakeup_gpio, 1);
-	msleep(10);
+	usleep_range(10000, 15000);

	if (gpio_get_value(info->host_wakeup_gpio) == 1) {
		dev_err(info->dev, "host_wakeup_gpio not low\n");
@@ -756,6 +756,7 @@ static int hci_h4p_reset(struct hci_h4p_info *info)
static int hci_h4p_hci_flush(struct hci_dev *hdev)
{
	struct hci_h4p_info *info = hci_get_drvdata(hdev);
+
	skb_queue_purge(&info->txq);

	return 0;
--
1.7.10.4


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-08-10  7:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30 10:27 [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 11:34 ` Pavel Machek
2014-05-30 11:52   ` Marcel Holtmann
2014-05-30 12:30     ` Pavel Machek
2014-05-30 15:59       ` Greg KH
2014-05-30 16:15         ` Pali Rohár
2014-05-30 16:36           ` Greg KH
2014-08-06 20:56             ` Marcel Holtmann
2014-08-06 21:30               ` Pavel Machek
2014-08-07  0:25                 ` Greg KH
2014-08-07  8:13                   ` [PATCH] staging: nokia_h4: use more consistent name for intermediate object Pavel Machek
2014-08-07 20:24                     ` Greg KH
2014-08-09 15:48                       ` Pavel Machek
2014-08-10  7:29                       ` [PATCH 1/3] staging: nokia_h4: switch to right types and use bdaddr_t Pavel Machek
2014-08-10  7:31                       ` [PATCH 2/3] staging: nokia_h4: avoid __uX types Pavel Machek
2014-08-10  7:33                       ` [PATCH 3/3] staging: use inlines where it makes sense Pavel Machek
2014-08-10  7:34                       ` [PATCH] bluetooth: avoid using __uX types Pavel Machek
2014-08-07  9:07                   ` [PATCH] staging: nokia_h4: merge firmware together so that we can reduce ammount of exports Pavel Machek
2014-08-07  9:36                     ` Pavel Machek
2014-08-07 14:48                     ` Marcel Holtmann
2014-08-09 15:47                       ` Pavel Machek
2014-05-30 12:15   ` [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 12:35     ` Pavel Machek
2014-05-30 12:58       ` Miguel Oliveira
2014-05-30 16:01 ` Greg KH
2014-05-30 16:05   ` Miguel Oliveira
2014-05-30 16:13     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.