lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401445633-5290-1-git-send-email-cmroliv@gmail.com>
Date:	Fri, 30 May 2014 11:27:13 +0100
From:	Miguel Oliveira <cmroliv@...il.com>
To:	gregkh@...uxfoundation.org
Cc:	gulsah.1004@...il.com, pavel@....cz, pali.rohar@...il.com,
	peter.p.waskiewicz.jr@...el.com, cmroliv@...il.com,
	kristina.martsenko@...il.com, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep()

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@...il.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ