summaryrefslogtreecommitdiff
path: root/sound/usb/mixer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-31 11:24:32 +0100
committerTakashi Iwai <tiwai@suse.de>2014-11-04 15:09:10 +0100
commita6cece9d81990e729c1f9da2a5bff2d29f7df649 (patch)
tree46746842e5039a1ce4e01e1e9de58ccb46f234de /sound/usb/mixer.c
parent4c8c3a4fcc021677c9a363b4e77f61dd09dbfd1a (diff)
ALSA: usb-audio: Pass direct struct pointer instead of list_head
Some functions in mixer.c and endpoint.c receive list_head instead of the object itself. This is not obvious and rather error-prone. Let's pass the proper object directly instead. The functions in midi.c still receive list_head and this can't be changed since the object definition isn't exposed to the outside of midi.c, so left as is. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r--sound/usb/mixer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 63a8adb1705e..e4aaa21baed2 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -2483,11 +2483,8 @@ _error:
return err;
}
-void snd_usb_mixer_disconnect(struct list_head *p)
+void snd_usb_mixer_disconnect(struct usb_mixer_interface *mixer)
{
- struct usb_mixer_interface *mixer;
-
- mixer = list_entry(p, struct usb_mixer_interface, list);
usb_kill_urb(mixer->urb);
usb_kill_urb(mixer->rc_urb);
}