Messages in this thread | | | Date | Mon, 1 Apr 2013 14:24:08 +0100 | From | Mark Brown <> | Subject | Re: [REPOST PATCH] spi: Unlock a spinlock before calling into the controller driver. |
| |
On Wed, Mar 13, 2013 at 11:17:40AM -0700, Doug Anderson wrote: > From: Bryan Freed <bfreed@chromium.org> > > spi_pump_messages() calls into a controller driver with > unprepare_transfer_hardware() which is documented as "This may sleep". > As in the prepare_transfer_hardware() call below, we should release the > queue_lock spinlock before making the call. > Rework the logic a bit to hold queue_lock to protect the 'busy' flag, > then release it to call unprepare_transfer_hardware().
Applied, thanks. However...
> spin_unlock_irqrestore(&master->queue_lock, flags); > + if (master->unprepare_transfer_hardware && > + master->unprepare_transfer_hardware(master)) > + dev_err(&master->dev, > + "failed to unprepare transfer hardware\n");
...it'd be nicer to pay attention to and log the error code if we fail to unprepare. [unhandled content-type:application/pgp-signature] | |