Skip to contentSkip to conversation

bluetooth: replace strict_strtol() with kstrtol()

PATCH In review Jingoo Han 3 participants 3 messages Jul 19, 2013 – Jul 25, 2013 Bluetooth drivers

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 bluetooth: replace strict_strtol() with kstrtol()

The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used.

---
 drivers/bluetooth/btmrvl_debugfs.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/bluetooth/btmrvl_debugfs.c +3 -3
index db2c3c3..023d35e 100644
@@ -43,7 +43,7 @@ static ssize_t btmrvl_hscfgcmd_write(struct file *file,
 	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
 		return -EFAULT;
 
-	ret = strict_strtol(buf, 10, &result);
+	ret = kstrtol(buf, 10, &result);
 	if (ret)
 		return ret;
 
@@ -89,7 +89,7 @@ static ssize_t btmrvl_pscmd_write(struct file *file, const char __user *ubuf,
 	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
 		return -EFAULT;
 
-	ret = strict_strtol(buf, 10, &result);
+	ret = kstrtol(buf, 10, &result);
 	if (ret)
 		return ret;
 
@@ -135,7 +135,7 @@ static ssize_t btmrvl_hscmd_write(struct file *file, const char __user *ubuf,
 	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
 		return -EFAULT;
 
-	ret = strict_strtol(buf, 10, &result);
+	ret = kstrtol(buf, 10, &result);
 	if (ret)
 		return ret;
 
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Jingoo Han

Hi Jingoo,

Quoted 8 lines · Jingoo Han

The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used.

---
 drivers/bluetooth/btmrvl_debugfs.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

Gustavo