From: Shraddha Barke <shraddha.6596@gmail.com>
To: Marek Belisko <marek.belisko@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joe Perches <joe@perches.com>,
Julia Lawall <julia.lawall@lip6.fr>
Cc: linux-kernel@vger.kernel.org, Shraddha Barke <shraddha.6596@gmail.com>
Subject: [PATCH] Staging: ft1000: use usleep_range()
Date: Sun, 13 Sep 2015 22:46:06 +0530 [thread overview]
Message-ID: <1442164566-11053-1-git-send-email-shraddha.6596@gmail.com> (raw)
This patch fixes checkpatch.pl warning
WARNING : msleep < 20ms can sleep for up to 20ms; see
Documentation/timers/timers-howto.txt
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 297b7ae..cf85021 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -131,7 +131,7 @@ static int check_usb_db(struct ft1000_usb *ft1000dev)
break;
}
loopcnt++;
- msleep(10);
+ usleep_range(10000, 11000);
}
@@ -142,7 +142,7 @@ static int check_usb_db(struct ft1000_usb *ft1000dev)
pr_debug("Doorbell = 0x%x\n", temp);
if (temp & 0x8000) {
loopcnt++;
- msleep(10);
+ usleep_range(10000, 11000);
} else {
pr_debug("door bell is cleared, return 0\n");
return 0;
@@ -191,7 +191,7 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 expected_value)
return handshake;
}
loopcnt++;
- msleep(10);
+ usleep_range(10000, 11000);
}
return HANDSHAKE_TIMEOUT_VALUE;
@@ -254,7 +254,7 @@ static u16 get_handshake_usb(struct ft1000_usb *ft1000dev, u16 expected_value)
}
loopcnt++;
- msleep(10);
+ usleep_range(10000, 11000);
handshake = ntohs(handshake);
if ((handshake == expected_value) ||
(handshake == HANDSHAKE_RESET_VALUE_USB))
--
2.1.4
reply other threads:[~2015-09-13 17:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442164566-11053-1-git-send-email-shraddha.6596@gmail.com \
--to=shraddha.6596@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).