ChangeSet 1.865.28.4, 2002/12/19 12:09:01-08:00, oliver@neukum.name [PATCH] USB: simplify spinlocks in send path for speedtouch irqsave spinlocks in an interrupt handler are superfluous. Simple spinlocks are sufficient and quicker. As this is in interrupt context, every cycle counts. diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Sun Dec 22 00:41:40 2002 +++ b/drivers/usb/misc/speedtouch.c Sun Dec 22 00:41:40 2002 @@ -582,7 +582,6 @@ struct udsl_usb_send_data_context *ctx = (struct udsl_usb_send_data_context *) urb->context; struct udsl_instance_data *instance = ctx->instance; int err; - unsigned long flags; PDEBUG ("udsl_usb_send_data_completion (vcc = %p, skb = %p, status %d)\n", ctx->vcc, ctx->skb, urb->status); @@ -590,15 +589,15 @@ ctx->vcc->pop (ctx->vcc, ctx->skb); ctx->skb = NULL; - spin_lock_irqsave (&instance->sndqlock, flags); + spin_lock (&instance->sndqlock); if (skb_queue_empty (&instance->sndqueue)) { - spin_unlock_irqrestore (&instance->sndqlock, flags); + spin_unlock (&instance->sndqlock); return; } /* submit next skb */ ctx->skb = skb_dequeue (&(instance->sndqueue)); ctx->vcc = ((struct udsl_cb *) (ctx->skb->cb))->vcc; - spin_unlock_irqrestore (&instance->sndqlock, flags); + spin_unlock (&instance->sndqlock); usb_fill_bulk_urb (urb, instance->usb_dev, usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT),