Commit f8aa74cd authored by Domen Puncer's avatar Domen Puncer Committed by Greg Kroah-Hartman

[PATCH] USB: use list_for_each() in class/usb-midi.c

Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 6195cfbd
......@@ -823,9 +823,9 @@ static int usb_midi_open(struct inode *inode, struct file *file)
for(;;) {
down(&open_sem);
for (devs = mididevs.next; devs != &mididevs; devs = devs->next) {
list_for_each(devs, &mididevs) {
s = list_entry(devs, struct usb_midi_state, mididev);
for (mdevs = s->midiDevList.next; mdevs != &s->midiDevList; mdevs = mdevs->next) {
list_for_each(mdevs, &s->midiDevList) {
m = list_entry(mdevs, struct usb_mididev, list);
if ( !((m->dev_midi ^ minor) & ~0xf) )
goto device_found;
......@@ -2018,7 +2018,7 @@ static void usb_midi_disconnect(struct usb_interface *intf)
s->usbdev = NULL;
usb_set_intfdata (intf, NULL);
for ( list = s->midiDevList.next; list != &s->midiDevList; list = list->next ) {
list_for_each(list, &s->midiDevList) {
m = list_entry(list, struct usb_mididev, list);
wake_up(&(m->min.ep->wait));
wake_up(&(m->mout.ep->wait));
......
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