提交 1bac92ca 编写于 作者: J Julia Lawall 提交者: John W. Linville

net/rfkill/core.c: use kstrtoul, etc

Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.

A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression a,b;
{int,long} *c;
@@

-strict_strtoul
+kstrtoul
 (a,b,c)
// </smpl>
Signed-off-by: NJulia Lawall <julia@diku.dk>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 61e3f32c
...@@ -644,7 +644,7 @@ static ssize_t rfkill_soft_store(struct device *dev, ...@@ -644,7 +644,7 @@ static ssize_t rfkill_soft_store(struct device *dev,
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EPERM; return -EPERM;
err = strict_strtoul(buf, 0, &state); err = kstrtoul(buf, 0, &state);
if (err) if (err)
return err; return err;
...@@ -688,7 +688,7 @@ static ssize_t rfkill_state_store(struct device *dev, ...@@ -688,7 +688,7 @@ static ssize_t rfkill_state_store(struct device *dev,
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EPERM; return -EPERM;
err = strict_strtoul(buf, 0, &state); err = kstrtoul(buf, 0, &state);
if (err) if (err)
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册