diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-12 07:23:03 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-13 08:18:34 -0400 |
commit | 06f33f13ac2562cddf44285bfdea6cfb0cdd3515 (patch) | |
tree | 2c69695eff140a847e34ddfe6b95be0eb6b878f0 /drivers/net/wireless/ath/ath6kl | |
parent | b0fc7c1a643bb0e689cd2846b0edf7c707a87600 (diff) |
ath6kl: replace strict_strtoul() with kstrtoul()
Recommended by checkpatch.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rwxr-xr-x | drivers/net/wireless/ath/ath6kl/debug.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 9170b05e5d87..552adb3f80d0 100755 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c | |||
@@ -856,17 +856,9 @@ static ssize_t ath6kl_regread_write(struct file *file, | |||
856 | size_t count, loff_t *ppos) | 856 | size_t count, loff_t *ppos) |
857 | { | 857 | { |
858 | struct ath6kl *ar = file->private_data; | 858 | struct ath6kl *ar = file->private_data; |
859 | u8 buf[50]; | ||
860 | unsigned int len; | ||
861 | unsigned long reg_addr; | 859 | unsigned long reg_addr; |
862 | 860 | ||
863 | len = min(count, sizeof(buf) - 1); | 861 | if (kstrtoul_from_user(user_buf, count, 0, ®_addr)) |
864 | if (copy_from_user(buf, user_buf, len)) | ||
865 | return -EFAULT; | ||
866 | |||
867 | buf[len] = '\0'; | ||
868 | |||
869 | if (strict_strtoul(buf, 0, ®_addr)) | ||
870 | return -EINVAL; | 862 | return -EINVAL; |
871 | 863 | ||
872 | if ((reg_addr % 4) != 0) | 864 | if ((reg_addr % 4) != 0) |
@@ -980,15 +972,8 @@ static ssize_t ath6kl_lrssi_roam_write(struct file *file, | |||
980 | { | 972 | { |
981 | struct ath6kl *ar = file->private_data; | 973 | struct ath6kl *ar = file->private_data; |
982 | unsigned long lrssi_roam_threshold; | 974 | unsigned long lrssi_roam_threshold; |
983 | char buf[32]; | ||
984 | ssize_t len; | ||
985 | 975 | ||
986 | len = min(count, sizeof(buf) - 1); | 976 | if (kstrtoul_from_user(user_buf, count, 0, &lrssi_roam_threshold)) |
987 | if (copy_from_user(buf, user_buf, len)) | ||
988 | return -EFAULT; | ||
989 | |||
990 | buf[len] = '\0'; | ||
991 | if (strict_strtoul(buf, 0, &lrssi_roam_threshold)) | ||
992 | return -EINVAL; | 977 | return -EINVAL; |
993 | 978 | ||
994 | ar->lrssi_roam_threshold = lrssi_roam_threshold; | 979 | ar->lrssi_roam_threshold = lrssi_roam_threshold; |