Skip to content

Commit

Permalink
Staging: line6/midi.c: Fixed call of obsolete function strict_strtoul
Browse files Browse the repository at this point in the history
The obsolete function strict_strtoul should be replaced by the kstrto*
functions.

In this context kstrtou16 should be use, as midi_mask_receive is only
used as unsigned short. All corresponding datatypes were adapted
accordingly.

Signed-off-by: Andor Daam <andor.daam@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andor Daam authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 4d85fae commit 251c394
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/line6/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ static ssize_t midi_set_midi_mask_receive(struct device *dev,
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
unsigned long value;
unsigned short value;
int ret;

ret = strict_strtoul(buf, 10, &value);
ret = kstrtou16(buf, 10, &value);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/line6/midi.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct snd_line6_midi {
/**
Bit mask for input MIDI channels.
*/
int midi_mask_receive;
unsigned short midi_mask_receive;

/**
Buffer for incoming MIDI stream.
Expand Down

0 comments on commit 251c394

Please sign in to comment.