Commit 27d7f477 authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller

net: wireless: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 67d6bfa6
...@@ -69,7 +69,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf, ...@@ -69,7 +69,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask)) if (kstrtoul(buf, 0, &mask))
return -EINVAL; return -EINVAL;
common->debug_mask = mask; common->debug_mask = mask;
...@@ -114,7 +114,7 @@ static ssize_t write_file_tx_chainmask(struct file *file, const char __user *use ...@@ -114,7 +114,7 @@ static ssize_t write_file_tx_chainmask(struct file *file, const char __user *use
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask)) if (kstrtoul(buf, 0, &mask))
return -EINVAL; return -EINVAL;
ah->txchainmask = mask; ah->txchainmask = mask;
...@@ -157,7 +157,7 @@ static ssize_t write_file_rx_chainmask(struct file *file, const char __user *use ...@@ -157,7 +157,7 @@ static ssize_t write_file_rx_chainmask(struct file *file, const char __user *use
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask)) if (kstrtoul(buf, 0, &mask))
return -EINVAL; return -EINVAL;
ah->rxchainmask = mask; ah->rxchainmask = mask;
...@@ -200,7 +200,7 @@ static ssize_t write_file_disable_ani(struct file *file, ...@@ -200,7 +200,7 @@ static ssize_t write_file_disable_ani(struct file *file,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &disable_ani)) if (kstrtoul(buf, 0, &disable_ani))
return -EINVAL; return -EINVAL;
common->disable_ani = !!disable_ani; common->disable_ani = !!disable_ani;
...@@ -253,7 +253,7 @@ static ssize_t write_file_ant_diversity(struct file *file, ...@@ -253,7 +253,7 @@ static ssize_t write_file_ant_diversity(struct file *file,
goto exit; goto exit;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &antenna_diversity)) if (kstrtoul(buf, 0, &antenna_diversity))
return -EINVAL; return -EINVAL;
common->antenna_diversity = !!antenna_diversity; common->antenna_diversity = !!antenna_diversity;
...@@ -1278,7 +1278,7 @@ static ssize_t write_file_regidx(struct file *file, const char __user *user_buf, ...@@ -1278,7 +1278,7 @@ static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &regidx)) if (kstrtoul(buf, 0, &regidx))
return -EINVAL; return -EINVAL;
sc->debug.regidx = regidx; sc->debug.regidx = regidx;
...@@ -1323,7 +1323,7 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf, ...@@ -1323,7 +1323,7 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &regval)) if (kstrtoul(buf, 0, &regval))
return -EINVAL; return -EINVAL;
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
......
...@@ -96,7 +96,7 @@ static ssize_t write_file_dfs(struct file *file, const char __user *user_buf, ...@@ -96,7 +96,7 @@ static ssize_t write_file_dfs(struct file *file, const char __user *user_buf,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val == DFS_STATS_RESET_MAGIC) if (val == DFS_STATS_RESET_MAGIC)
......
...@@ -471,7 +471,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf, ...@@ -471,7 +471,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
return -EFAULT; return -EFAULT;
buf[len] = '\0'; buf[len] = '\0';
if (strict_strtoul(buf, 0, &mask)) if (kstrtoul(buf, 0, &mask))
return -EINVAL; return -EINVAL;
common->debug_mask = mask; common->debug_mask = mask;
......
...@@ -3119,7 +3119,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr, ...@@ -3119,7 +3119,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr,
unsigned long val; unsigned long val;
int ret; int ret;
ret = strict_strtoul(buf, 0, &val); ret = kstrtoul(buf, 0, &val);
if (ret) if (ret)
IL_INFO("%s is not in hex or decimal form.\n", buf); IL_INFO("%s is not in hex or decimal form.\n", buf);
else else
......
...@@ -4567,7 +4567,7 @@ il4965_store_debug_level(struct device *d, struct device_attribute *attr, ...@@ -4567,7 +4567,7 @@ il4965_store_debug_level(struct device *d, struct device_attribute *attr,
unsigned long val; unsigned long val;
int ret; int ret;
ret = strict_strtoul(buf, 0, &val); ret = kstrtoul(buf, 0, &val);
if (ret) if (ret)
IL_ERR("%s is not in hex or decimal form.\n", buf); IL_ERR("%s is not in hex or decimal form.\n", buf);
else else
...@@ -4614,7 +4614,7 @@ il4965_store_tx_power(struct device *d, struct device_attribute *attr, ...@@ -4614,7 +4614,7 @@ il4965_store_tx_power(struct device *d, struct device_attribute *attr,
unsigned long val; unsigned long val;
int ret; int ret;
ret = strict_strtoul(buf, 10, &val); ret = kstrtoul(buf, 10, &val);
if (ret) if (ret)
IL_INFO("%s is not in decimal form.\n", buf); IL_INFO("%s is not in decimal form.\n", buf);
else { else {
......
...@@ -240,7 +240,7 @@ static ssize_t lbs_prb_rsp_limit_set(struct device *dev, ...@@ -240,7 +240,7 @@ static ssize_t lbs_prb_rsp_limit_set(struct device *dev,
memset(&mesh_access, 0, sizeof(mesh_access)); memset(&mesh_access, 0, sizeof(mesh_access));
mesh_access.data[0] = cpu_to_le32(CMD_ACT_SET); 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; return -ENOTSUPP;
if (retry_limit > 15) if (retry_limit > 15)
return -ENOTSUPP; return -ENOTSUPP;
......
...@@ -1817,7 +1817,7 @@ static ssize_t rtl_store_debug_level(struct device *d, ...@@ -1817,7 +1817,7 @@ static ssize_t rtl_store_debug_level(struct device *d,
unsigned long val; unsigned long val;
int ret; int ret;
ret = strict_strtoul(buf, 0, &val); ret = kstrtoul(buf, 0, &val);
if (ret) { if (ret) {
printk(KERN_DEBUG "%s is not in hex or decimal form.\n", buf); printk(KERN_DEBUG "%s is not in hex or decimal form.\n", buf);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment