Commit a3762902 authored by Laurent Navet's avatar Laurent Navet Committed by Greg Kroah-Hartman

staging: line6: pcm.c fix checkpatch issues

fix those checkpatch issues
drivers/staging/line6/pcm.c:84:
	WARNING: simple_strtoul is obsolete, use kstrtoul instead
	call to obsolete simple_strtoul() replaced by kstrtoint()

drivers/staging/line6/pcm.c:423:
	ERROR: switch and case should be at the same indent
	realigns comments
Signed-off-by: default avatarLaurent Navet <laurent.navet@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b466eb5e
...@@ -49,11 +49,11 @@ static ssize_t pcm_set_impulse_volume(struct device *dev, ...@@ -49,11 +49,11 @@ static ssize_t pcm_set_impulse_volume(struct device *dev,
{ {
struct snd_line6_pcm *line6pcm = dev2pcm(dev); struct snd_line6_pcm *line6pcm = dev2pcm(dev);
int value; int value;
int rv; int ret;
rv = kstrtoint(buf, 10, &value); ret = kstrtoint(buf, 10, &value);
if (rv < 0) if (ret < 0)
return rv; return ret;
line6pcm->impulse_volume = value; line6pcm->impulse_volume = value;
...@@ -81,7 +81,14 @@ static ssize_t pcm_set_impulse_period(struct device *dev, ...@@ -81,7 +81,14 @@ static ssize_t pcm_set_impulse_period(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
dev2pcm(dev)->impulse_period = simple_strtoul(buf, NULL, 10); int value;
int ret;
ret = kstrtoint(buf, 10, &value);
if (ret < 0)
return ret;
dev2pcm(dev)->impulse_period = value;
return count; return count;
} }
...@@ -455,13 +462,12 @@ int line6_init_pcm(struct usb_line6 *line6, ...@@ -455,13 +462,12 @@ int line6_init_pcm(struct usb_line6 *line6,
ep_write = 0x01; ep_write = 0x01;
break; break;
/* this is for interface_number == 1: /* this is for interface_number == 1:
case LINE6_DEVID_TONEPORT_UX2: case LINE6_DEVID_TONEPORT_UX2:
case LINE6_DEVID_PODSTUDIO_UX2: case LINE6_DEVID_PODSTUDIO_UX2:
ep_read = 0x87; ep_read = 0x87;
ep_write = 0x00; ep_write = 0x00;
break; break; */
*/
default: default:
MISSING_CASE; MISSING_CASE;
......
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