[PATCH 1/2] staging/nokia_h4p: replace short sleep using msleep with usleep_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Son Le <sonle.hut@xxxxxxxxx>
---
 drivers/staging/nokia_h4p/nokia_core.c   |    2 +-
 drivers/staging/nokia_h4p/nokia_fw-csr.c |    2 +-
 drivers/staging/nokia_h4p/nokia_uart.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/nokia_h4p/nokia_core.c b/drivers/staging/nokia_h4p/nokia_core.c
index 775e1d0..bab01e9 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, 10500);
 
 	if (gpio_get_value(info->host_wakeup_gpio) == 1) {
 		dev_err(info->dev, "host_wakeup_gpio not low\n");
diff --git a/drivers/staging/nokia_h4p/nokia_fw-csr.c b/drivers/staging/nokia_h4p/nokia_fw-csr.c
index fe6b704..aa05c13 100644
--- a/drivers/staging/nokia_h4p/nokia_fw-csr.c
+++ b/drivers/staging/nokia_h4p/nokia_fw-csr.c
@@ -118,7 +118,7 @@ int hci_h4p_bc4_send_fw(struct hci_h4p_info *info,
 	while ((!skb_queue_empty(&info->txq) ||
 	       !(hci_h4p_inb(info, UART_LSR) & UART_LSR_TEMT)) &&
 	       retries--) {
-		msleep(10);
+		usleep_range(10000, 10500);
 	}
 	if (!retries) {
 		dev_err(info->dev, "Transmitter not empty\n");
diff --git a/drivers/staging/nokia_h4p/nokia_uart.c b/drivers/staging/nokia_h4p/nokia_uart.c
index 0fb57de..a6d4301 100644
--- a/drivers/staging/nokia_h4p/nokia_uart.c
+++ b/drivers/staging/nokia_h4p/nokia_uart.c
@@ -67,7 +67,7 @@ int hci_h4p_wait_for_cts(struct hci_h4p_info *info, int active,
 		}
 		if (time_after(jiffies, timeout))
 			return -ETIMEDOUT;
-		msleep(1);
+		usleep_range(1000, 1500);
 	}
 }
 
-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux