Skip to content

Commit

Permalink
net: wireless: replace strict_strtoul() with kstrtoul()
Browse files Browse the repository at this point in the history
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jingoo Han authored and David S. Miller committed Jun 3, 2013
1 parent 67d6bfa commit 27d7f47
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/ath/ath9k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask))
if (kstrtoul(buf, 0, &mask))
return -EINVAL;

common->debug_mask = mask;
Expand Down Expand Up @@ -114,7 +114,7 @@ static ssize_t write_file_tx_chainmask(struct file *file, const char __user *use
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask))
if (kstrtoul(buf, 0, &mask))
return -EINVAL;

ah->txchainmask = mask;
Expand Down Expand Up @@ -157,7 +157,7 @@ static ssize_t write_file_rx_chainmask(struct file *file, const char __user *use
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask))
if (kstrtoul(buf, 0, &mask))
return -EINVAL;

ah->rxchainmask = mask;
Expand Down Expand Up @@ -200,7 +200,7 @@ static ssize_t write_file_disable_ani(struct file *file,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &disable_ani))
if (kstrtoul(buf, 0, &disable_ani))
return -EINVAL;

common->disable_ani = !!disable_ani;
Expand Down Expand Up @@ -253,7 +253,7 @@ static ssize_t write_file_ant_diversity(struct file *file,
goto exit;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &antenna_diversity))
if (kstrtoul(buf, 0, &antenna_diversity))
return -EINVAL;

common->antenna_diversity = !!antenna_diversity;
Expand Down Expand Up @@ -1278,7 +1278,7 @@ static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &regidx))
if (kstrtoul(buf, 0, &regidx))
return -EINVAL;

sc->debug.regidx = regidx;
Expand Down Expand Up @@ -1323,7 +1323,7 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &regval))
if (kstrtoul(buf, 0, &regval))
return -EINVAL;

ath9k_ps_wakeup(sc);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/dfs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static ssize_t write_file_dfs(struct file *file, const char __user *user_buf,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &val))
if (kstrtoul(buf, 0, &val))
return -EINVAL;

if (val == DFS_STATS_RESET_MAGIC)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/htc_drv_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
return -EFAULT;

buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask))
if (kstrtoul(buf, 0, &mask))
return -EINVAL;

common->debug_mask = mask;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlegacy/3945-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr,
unsigned long val;
int ret;

ret = strict_strtoul(buf, 0, &val);
ret = kstrtoul(buf, 0, &val);
if (ret)
IL_INFO("%s is not in hex or decimal form.\n", buf);
else
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -4567,7 +4567,7 @@ il4965_store_debug_level(struct device *d, struct device_attribute *attr,
unsigned long val;
int ret;

ret = strict_strtoul(buf, 0, &val);
ret = kstrtoul(buf, 0, &val);
if (ret)
IL_ERR("%s is not in hex or decimal form.\n", buf);
else
Expand Down Expand Up @@ -4614,7 +4614,7 @@ il4965_store_tx_power(struct device *d, struct device_attribute *attr,
unsigned long val;
int ret;

ret = strict_strtoul(buf, 10, &val);
ret = kstrtoul(buf, 10, &val);
if (ret)
IL_INFO("%s is not in decimal form.\n", buf);
else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/libertas/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static ssize_t lbs_prb_rsp_limit_set(struct device *dev,
memset(&mesh_access, 0, sizeof(mesh_access));
mesh_access.data[0] = cpu_to_le32(CMD_ACT_SET);

if (!strict_strtoul(buf, 10, &retry_limit))
if (!kstrtoul(buf, 10, &retry_limit))
return -ENOTSUPP;
if (retry_limit > 15)
return -ENOTSUPP;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtlwifi/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ static ssize_t rtl_store_debug_level(struct device *d,
unsigned long val;
int ret;

ret = strict_strtoul(buf, 0, &val);
ret = kstrtoul(buf, 0, &val);
if (ret) {
printk(KERN_DEBUG "%s is not in hex or decimal form.\n", buf);
} else {
Expand Down

0 comments on commit 27d7f47

Please sign in to comment.