[PATCH 3/3] PCI: Use usleep_range() instead of msleep() for better accuracy

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

 



Msleep < 20ms can sleep for up to 20ms, see
Documentation/timers/timers-howto.txt, so we could
use usleep_range instead.

Signed-off-by: Yijing Wang <wangyijing@xxxxxxxxxx>
---
 drivers/pci/hotplug/pciehp_hpc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index daf54be..4553728 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -118,7 +118,7 @@ static int pcie_poll_cmd(struct controller *ctrl, int timeout)
 		}
 		if (timeout < 0)
 			break;
-		msleep(10);
+		usleep_range(10000, 11000);
 		timeout -= 10;
 	}
 	return 0;	/* timeout */
-- 
1.7.1

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



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux