Commit 0c9fd8bb authored by Adam J. Richter's avatar Adam J. Richter Committed by Linus Torvalds

[PATCH] linux-2.5.41/drivers/usb/core/hub.c called down() from interrupt context

	On second thought after reading Oliver Neukum's question about
"shaving off a cycle or two", here is version of my fix for down()
being called from interrupt context that uses unlikely() to get the
speed advantage that would be available from BUG_ON(), while still
ensuring that the condition is executed even if assertions are
compiled out.
parent 69a47015
......@@ -943,7 +943,9 @@ static void usb_hub_events(void)
list_del_init(tmp);
down(&hub->khubd_sem); /* never blocks, we were on list */
if (unlikely(down_trylock(&hub->khubd_sem)))
BUG(); /* never blocks, we were on list */
spin_unlock_irqrestore(&hub_event_lock, flags);
if (hub->error) {
......
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