diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-19 02:53:16 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-07-23 10:05:46 -0400 |
commit | dfc450b55d6b9215da27c5dc2c5f3ca1865575a6 (patch) | |
tree | 29dc496996ac63de2f1c976890ee5999b86f7da2 /drivers/hid | |
parent | bc197eedef1ae082ec662c64c3f4aa302821fb7a (diff) |
HID: 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: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-ntrig.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-arvo.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-isku.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-kone.c | 4 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-koneplus.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-kovaplus.c | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 5bc37343eb22..a32f5a24b27c 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
@@ -36,7 +36,7 @@ MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel"); | |||
36 | static unsigned int scroll_speed = 32; | 36 | static unsigned int scroll_speed = 32; |
37 | static int param_set_scroll_speed(const char *val, struct kernel_param *kp) { | 37 | static int param_set_scroll_speed(const char *val, struct kernel_param *kp) { |
38 | unsigned long speed; | 38 | unsigned long speed; |
39 | if (!val || strict_strtoul(val, 0, &speed) || speed > 63) | 39 | if (!val || kstrtoul(val, 0, &speed) || speed > 63) |
40 | return -EINVAL; | 40 | return -EINVAL; |
41 | scroll_speed = speed; | 41 | scroll_speed = speed; |
42 | return 0; | 42 | return 0; |
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index ef95102515e4..98d1fdf7d8cd 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c | |||
@@ -237,7 +237,7 @@ static ssize_t set_min_width(struct device *dev, | |||
237 | 237 | ||
238 | unsigned long val; | 238 | unsigned long val; |
239 | 239 | ||
240 | if (strict_strtoul(buf, 0, &val)) | 240 | if (kstrtoul(buf, 0, &val)) |
241 | return -EINVAL; | 241 | return -EINVAL; |
242 | 242 | ||
243 | if (val > nd->sensor_physical_width) | 243 | if (val > nd->sensor_physical_width) |
@@ -272,7 +272,7 @@ static ssize_t set_min_height(struct device *dev, | |||
272 | 272 | ||
273 | unsigned long val; | 273 | unsigned long val; |
274 | 274 | ||
275 | if (strict_strtoul(buf, 0, &val)) | 275 | if (kstrtoul(buf, 0, &val)) |
276 | return -EINVAL; | 276 | return -EINVAL; |
277 | 277 | ||
278 | if (val > nd->sensor_physical_height) | 278 | if (val > nd->sensor_physical_height) |
@@ -306,7 +306,7 @@ static ssize_t set_activate_slack(struct device *dev, | |||
306 | 306 | ||
307 | unsigned long val; | 307 | unsigned long val; |
308 | 308 | ||
309 | if (strict_strtoul(buf, 0, &val)) | 309 | if (kstrtoul(buf, 0, &val)) |
310 | return -EINVAL; | 310 | return -EINVAL; |
311 | 311 | ||
312 | if (val > 0x7f) | 312 | if (val > 0x7f) |
@@ -341,7 +341,7 @@ static ssize_t set_activation_width(struct device *dev, | |||
341 | 341 | ||
342 | unsigned long val; | 342 | unsigned long val; |
343 | 343 | ||
344 | if (strict_strtoul(buf, 0, &val)) | 344 | if (kstrtoul(buf, 0, &val)) |
345 | return -EINVAL; | 345 | return -EINVAL; |
346 | 346 | ||
347 | if (val > nd->sensor_physical_width) | 347 | if (val > nd->sensor_physical_width) |
@@ -377,7 +377,7 @@ static ssize_t set_activation_height(struct device *dev, | |||
377 | 377 | ||
378 | unsigned long val; | 378 | unsigned long val; |
379 | 379 | ||
380 | if (strict_strtoul(buf, 0, &val)) | 380 | if (kstrtoul(buf, 0, &val)) |
381 | return -EINVAL; | 381 | return -EINVAL; |
382 | 382 | ||
383 | if (val > nd->sensor_physical_height) | 383 | if (val > nd->sensor_physical_height) |
@@ -411,7 +411,7 @@ static ssize_t set_deactivate_slack(struct device *dev, | |||
411 | 411 | ||
412 | unsigned long val; | 412 | unsigned long val; |
413 | 413 | ||
414 | if (strict_strtoul(buf, 0, &val)) | 414 | if (kstrtoul(buf, 0, &val)) |
415 | return -EINVAL; | 415 | return -EINVAL; |
416 | 416 | ||
417 | /* | 417 | /* |
diff --git a/drivers/hid/hid-roccat-arvo.c b/drivers/hid/hid-roccat-arvo.c index 327f9b8ed1f4..071ee9e2fd9f 100644 --- a/drivers/hid/hid-roccat-arvo.c +++ b/drivers/hid/hid-roccat-arvo.c | |||
@@ -59,7 +59,7 @@ static ssize_t arvo_sysfs_set_mode_key(struct device *dev, | |||
59 | unsigned long state; | 59 | unsigned long state; |
60 | int retval; | 60 | int retval; |
61 | 61 | ||
62 | retval = strict_strtoul(buf, 10, &state); | 62 | retval = kstrtoul(buf, 10, &state); |
63 | if (retval) | 63 | if (retval) |
64 | return retval; | 64 | return retval; |
65 | 65 | ||
@@ -107,7 +107,7 @@ static ssize_t arvo_sysfs_set_key_mask(struct device *dev, | |||
107 | unsigned long key_mask; | 107 | unsigned long key_mask; |
108 | int retval; | 108 | int retval; |
109 | 109 | ||
110 | retval = strict_strtoul(buf, 10, &key_mask); | 110 | retval = kstrtoul(buf, 10, &key_mask); |
111 | if (retval) | 111 | if (retval) |
112 | return retval; | 112 | return retval; |
113 | 113 | ||
@@ -159,7 +159,7 @@ static ssize_t arvo_sysfs_set_actual_profile(struct device *dev, | |||
159 | unsigned long profile; | 159 | unsigned long profile; |
160 | int retval; | 160 | int retval; |
161 | 161 | ||
162 | retval = strict_strtoul(buf, 10, &profile); | 162 | retval = kstrtoul(buf, 10, &profile); |
163 | if (retval) | 163 | if (retval) |
164 | return retval; | 164 | return retval; |
165 | 165 | ||
diff --git a/drivers/hid/hid-roccat-isku.c b/drivers/hid/hid-roccat-isku.c index 8023751d5257..5dd0ea4eb4f7 100644 --- a/drivers/hid/hid-roccat-isku.c +++ b/drivers/hid/hid-roccat-isku.c | |||
@@ -82,7 +82,7 @@ static ssize_t isku_sysfs_set_actual_profile(struct device *dev, | |||
82 | isku = hid_get_drvdata(dev_get_drvdata(dev)); | 82 | isku = hid_get_drvdata(dev_get_drvdata(dev)); |
83 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); | 83 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); |
84 | 84 | ||
85 | retval = strict_strtoul(buf, 10, &profile); | 85 | retval = kstrtoul(buf, 10, &profile); |
86 | if (retval) | 86 | if (retval) |
87 | return retval; | 87 | return retval; |
88 | 88 | ||
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 7fae070788fa..00ab287f7384 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c | |||
@@ -456,7 +456,7 @@ static ssize_t kone_sysfs_set_tcu(struct device *dev, | |||
456 | kone = hid_get_drvdata(dev_get_drvdata(dev)); | 456 | kone = hid_get_drvdata(dev_get_drvdata(dev)); |
457 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); | 457 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); |
458 | 458 | ||
459 | retval = strict_strtoul(buf, 10, &state); | 459 | retval = kstrtoul(buf, 10, &state); |
460 | if (retval) | 460 | if (retval) |
461 | return retval; | 461 | return retval; |
462 | 462 | ||
@@ -545,7 +545,7 @@ static ssize_t kone_sysfs_set_startup_profile(struct device *dev, | |||
545 | kone = hid_get_drvdata(dev_get_drvdata(dev)); | 545 | kone = hid_get_drvdata(dev_get_drvdata(dev)); |
546 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); | 546 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); |
547 | 547 | ||
548 | retval = strict_strtoul(buf, 10, &new_startup_profile); | 548 | retval = kstrtoul(buf, 10, &new_startup_profile); |
549 | if (retval) | 549 | if (retval) |
550 | return retval; | 550 | return retval; |
551 | 551 | ||
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 6a48fa3c7da9..26b9663ddf47 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c | |||
@@ -246,7 +246,7 @@ static ssize_t koneplus_sysfs_set_actual_profile(struct device *dev, | |||
246 | koneplus = hid_get_drvdata(dev_get_drvdata(dev)); | 246 | koneplus = hid_get_drvdata(dev_get_drvdata(dev)); |
247 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); | 247 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); |
248 | 248 | ||
249 | retval = strict_strtoul(buf, 10, &profile); | 249 | retval = kstrtoul(buf, 10, &profile); |
250 | if (retval) | 250 | if (retval) |
251 | return retval; | 251 | return retval; |
252 | 252 | ||
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index b8b37789b864..c2a17e45c99c 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c | |||
@@ -282,7 +282,7 @@ static ssize_t kovaplus_sysfs_set_actual_profile(struct device *dev, | |||
282 | kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); | 282 | kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); |
283 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); | 283 | usb_dev = interface_to_usbdev(to_usb_interface(dev)); |
284 | 284 | ||
285 | retval = strict_strtoul(buf, 10, &profile); | 285 | retval = kstrtoul(buf, 10, &profile); |
286 | if (retval) | 286 | if (retval) |
287 | return retval; | 287 | return retval; |
288 | 288 | ||