ALSA: rawmidi: Minor code refactoring
authorTakashi Iwai <tiwai@suse.de>
Tue, 17 Jul 2018 21:07:29 +0000 (23:07 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 Jul 2018 21:07:29 +0000 (23:07 +0200)
commitf5beb598b0c4dd023833ae1a7c188ecd987b7125
tree06bada3fae446ba30e941ef6756eae3bf86d395e
parent7fdc9b08071b6a3fc85bf90b79e13f6e973a7e5e
ALSA: rawmidi: Minor code refactoring

Unify a few open codes with helper functions to improve the
readability.  Minor behavior changes (rather fixes) are:
- runtime->drain clearance is done within lock
- active_sensing is updated before resizing buffer in
  SNDRV_RAWMIDI_IOCTL_PARAMS ioctl.
Other than that, simply code cleanups.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c