[PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep()

From: Miguel Oliveira
Date: Fri May 30 2014 - 06:07:39 EST


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@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/