aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-31 06:24:32 -0400
committerTakashi Iwai <tiwai@suse.de>2014-11-04 09:09:10 -0500
commita6cece9d81990e729c1f9da2a5bff2d29f7df649 (patch)
tree46746842e5039a1ce4e01e1e9de58ccb46f234de /sound/usb/endpoint.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/endpoint.c')
-rw-r--r--sound/usb/endpoint.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 114e3e7ff511..167d0c1643e1 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1002,15 +1002,12 @@ void snd_usb_endpoint_release(struct snd_usb_endpoint *ep)
1002/** 1002/**
1003 * snd_usb_endpoint_free: Free the resources of an snd_usb_endpoint 1003 * snd_usb_endpoint_free: Free the resources of an snd_usb_endpoint
1004 * 1004 *
1005 * @ep: the list header of the endpoint to free 1005 * @ep: the endpoint to free
1006 * 1006 *
1007 * This free all resources of the given ep. 1007 * This free all resources of the given ep.
1008 */ 1008 */
1009void snd_usb_endpoint_free(struct list_head *head) 1009void snd_usb_endpoint_free(struct snd_usb_endpoint *ep)
1010{ 1010{
1011 struct snd_usb_endpoint *ep;
1012
1013 ep = list_entry(head, struct snd_usb_endpoint, list);
1014 kfree(ep); 1011 kfree(ep);
1015} 1012}
1016 1013