Commit dfc450b5 authored by Jingoo Han's avatar Jingoo Han Committed by Jiri Kosina

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent bc197eed
...@@ -36,7 +36,7 @@ MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel"); ...@@ -36,7 +36,7 @@ MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
static unsigned int scroll_speed = 32; static unsigned int scroll_speed = 32;
static int param_set_scroll_speed(const char *val, struct kernel_param *kp) { static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
unsigned long speed; unsigned long speed;
if (!val || strict_strtoul(val, 0, &speed) || speed > 63) if (!val || kstrtoul(val, 0, &speed) || speed > 63)
return -EINVAL; return -EINVAL;
scroll_speed = speed; scroll_speed = speed;
return 0; return 0;
......
...@@ -237,7 +237,7 @@ static ssize_t set_min_width(struct device *dev, ...@@ -237,7 +237,7 @@ static ssize_t set_min_width(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val > nd->sensor_physical_width) if (val > nd->sensor_physical_width)
...@@ -272,7 +272,7 @@ static ssize_t set_min_height(struct device *dev, ...@@ -272,7 +272,7 @@ static ssize_t set_min_height(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val > nd->sensor_physical_height) if (val > nd->sensor_physical_height)
...@@ -306,7 +306,7 @@ static ssize_t set_activate_slack(struct device *dev, ...@@ -306,7 +306,7 @@ static ssize_t set_activate_slack(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val > 0x7f) if (val > 0x7f)
...@@ -341,7 +341,7 @@ static ssize_t set_activation_width(struct device *dev, ...@@ -341,7 +341,7 @@ static ssize_t set_activation_width(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val > nd->sensor_physical_width) if (val > nd->sensor_physical_width)
...@@ -377,7 +377,7 @@ static ssize_t set_activation_height(struct device *dev, ...@@ -377,7 +377,7 @@ static ssize_t set_activation_height(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
if (val > nd->sensor_physical_height) if (val > nd->sensor_physical_height)
...@@ -411,7 +411,7 @@ static ssize_t set_deactivate_slack(struct device *dev, ...@@ -411,7 +411,7 @@ static ssize_t set_deactivate_slack(struct device *dev,
unsigned long val; unsigned long val;
if (strict_strtoul(buf, 0, &val)) if (kstrtoul(buf, 0, &val))
return -EINVAL; return -EINVAL;
/* /*
......
...@@ -59,7 +59,7 @@ static ssize_t arvo_sysfs_set_mode_key(struct device *dev, ...@@ -59,7 +59,7 @@ static ssize_t arvo_sysfs_set_mode_key(struct device *dev,
unsigned long state; unsigned long state;
int retval; int retval;
retval = strict_strtoul(buf, 10, &state); retval = kstrtoul(buf, 10, &state);
if (retval) if (retval)
return retval; return retval;
...@@ -107,7 +107,7 @@ static ssize_t arvo_sysfs_set_key_mask(struct device *dev, ...@@ -107,7 +107,7 @@ static ssize_t arvo_sysfs_set_key_mask(struct device *dev,
unsigned long key_mask; unsigned long key_mask;
int retval; int retval;
retval = strict_strtoul(buf, 10, &key_mask); retval = kstrtoul(buf, 10, &key_mask);
if (retval) if (retval)
return retval; return retval;
...@@ -159,7 +159,7 @@ static ssize_t arvo_sysfs_set_actual_profile(struct device *dev, ...@@ -159,7 +159,7 @@ static ssize_t arvo_sysfs_set_actual_profile(struct device *dev,
unsigned long profile; unsigned long profile;
int retval; int retval;
retval = strict_strtoul(buf, 10, &profile); retval = kstrtoul(buf, 10, &profile);
if (retval) if (retval)
return retval; return retval;
......
...@@ -82,7 +82,7 @@ static ssize_t isku_sysfs_set_actual_profile(struct device *dev, ...@@ -82,7 +82,7 @@ static ssize_t isku_sysfs_set_actual_profile(struct device *dev,
isku = hid_get_drvdata(dev_get_drvdata(dev)); isku = hid_get_drvdata(dev_get_drvdata(dev));
usb_dev = interface_to_usbdev(to_usb_interface(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev));
retval = strict_strtoul(buf, 10, &profile); retval = kstrtoul(buf, 10, &profile);
if (retval) if (retval)
return retval; return retval;
......
...@@ -456,7 +456,7 @@ static ssize_t kone_sysfs_set_tcu(struct device *dev, ...@@ -456,7 +456,7 @@ static ssize_t kone_sysfs_set_tcu(struct device *dev,
kone = hid_get_drvdata(dev_get_drvdata(dev)); kone = hid_get_drvdata(dev_get_drvdata(dev));
usb_dev = interface_to_usbdev(to_usb_interface(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev));
retval = strict_strtoul(buf, 10, &state); retval = kstrtoul(buf, 10, &state);
if (retval) if (retval)
return retval; return retval;
...@@ -545,7 +545,7 @@ static ssize_t kone_sysfs_set_startup_profile(struct device *dev, ...@@ -545,7 +545,7 @@ static ssize_t kone_sysfs_set_startup_profile(struct device *dev,
kone = hid_get_drvdata(dev_get_drvdata(dev)); kone = hid_get_drvdata(dev_get_drvdata(dev));
usb_dev = interface_to_usbdev(to_usb_interface(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev));
retval = strict_strtoul(buf, 10, &new_startup_profile); retval = kstrtoul(buf, 10, &new_startup_profile);
if (retval) if (retval)
return retval; return retval;
......
...@@ -246,7 +246,7 @@ static ssize_t koneplus_sysfs_set_actual_profile(struct device *dev, ...@@ -246,7 +246,7 @@ static ssize_t koneplus_sysfs_set_actual_profile(struct device *dev,
koneplus = hid_get_drvdata(dev_get_drvdata(dev)); koneplus = hid_get_drvdata(dev_get_drvdata(dev));
usb_dev = interface_to_usbdev(to_usb_interface(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev));
retval = strict_strtoul(buf, 10, &profile); retval = kstrtoul(buf, 10, &profile);
if (retval) if (retval)
return retval; return retval;
......
...@@ -282,7 +282,7 @@ static ssize_t kovaplus_sysfs_set_actual_profile(struct device *dev, ...@@ -282,7 +282,7 @@ static ssize_t kovaplus_sysfs_set_actual_profile(struct device *dev,
kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); kovaplus = hid_get_drvdata(dev_get_drvdata(dev));
usb_dev = interface_to_usbdev(to_usb_interface(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev));
retval = strict_strtoul(buf, 10, &profile); retval = kstrtoul(buf, 10, &profile);
if (retval) if (retval)
return retval; return retval;
......
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