]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/rfkill/core.c: use kstrtoul, etc
authorJulia Lawall <julia@diku.dk>
Sun, 6 Nov 2011 13:26:49 +0000 (14:26 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Nov 2011 21:14:10 +0000 (16:14 -0500)
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: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/rfkill/core.c

index 5be19575c340886ff869e94dc7ae65c0e959e00c..354760ebbbd254f1409a196e7c27140c0512e5e9 100644 (file)
@@ -644,7 +644,7 @@ static ssize_t rfkill_soft_store(struct device *dev,
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
 
-       err = strict_strtoul(buf, 0, &state);
+       err = kstrtoul(buf, 0, &state);
        if (err)
                return err;
 
@@ -688,7 +688,7 @@ static ssize_t rfkill_state_store(struct device *dev,
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
 
-       err = strict_strtoul(buf, 0, &state);
+       err = kstrtoul(buf, 0, &state);
        if (err)
                return err;