staging: brcm80211: replace simple_strtoul with strict_strtoul
authorArend van Spriel <arend@broadcom.com>
Wed, 2 Mar 2011 16:01:37 +0000 (17:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 Mar 2011 21:04:21 +0000 (16:04 -0500)
By checkpatch recommendation using strict_strtoul now.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c

index 6059e4cc3aa14df63339be7f5e9ab55dc466f2ff..6ce5172557f6e62f6776338cd110439f915d4fc4 100644 (file)
@@ -1293,18 +1293,22 @@ static int __init wl_module_init(void)
                wl_msg_level = msglevel;
        else {
                char *var = getvar(NULL, "wl_msglevel");
-               if (var)
-                       wl_msg_level = simple_strtoul(var, NULL, 0);
-       }
-       {
-               extern u32 phyhal_msg_level;
-
-               if (phymsglevel != 0xdeadbeef)
-                       phyhal_msg_level = phymsglevel;
-               else {
-                       char *var = getvar(NULL, "phy_msglevel");
-                       if (var)
-                               phyhal_msg_level = simple_strtoul(var, NULL, 0);
+               if (var) {
+                       unsigned long value;
+
+                       (void)strict_strtoul(var, 0, &value);
+                       wl_msg_level = value;
+               }
+       }
+       if (phymsglevel != 0xdeadbeef)
+               phyhal_msg_level = phymsglevel;
+       else {
+               char *var = getvar(NULL, "phy_msglevel");
+               if (var) {
+                       unsigned long value;
+
+                       (void)strict_strtoul(var, 0, &value);
+                       phyhal_msg_level = value;
                }
        }
 #endif                         /* BCMDBG */