Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d20bca5 authored by Ding Xiang's avatar Ding Xiang Committed by Greg Kroah-Hartman
Browse files

usb: misc: fix obsolete function



simple_strtoul is obsolete, and use kstrtoint instead

Signed-off-by: default avatarDing Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 23feefda
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -46,7 +46,9 @@ static ssize_t speed_store(struct device *dev, struct device_attribute *attr,
	struct trancevibrator *tv = usb_get_intfdata(intf);
	int temp, retval, old;

	temp = simple_strtoul(buf, NULL, 10);
	retval = kstrtoint(buf, 10, &temp);
	if (retval)
		return retval;
	if (temp > 255)
		temp = 255;
	else if (temp < 0)