10 Jul
2015
10 Jul
'15
7:26 p.m.
On Mon, Jun 22, 2015 at 04:31:08PM +0200, Arnaud Pouliquen wrote:
+static int uni_reader_stop(struct uniperif *reader) +{
- /* The reader should not be in stopped state */
- if (reader->state == UNIPERIF_STATE_STOPPED) {
dev_err(reader->dev, "%s: invalid reader state", __func__);
return -EINVAL;
- }
- /* Turn the reader off */
- SET_UNIPERIF_CTRL_OPERATION_OFF(reader);
- /* Disable interrupts */
- SET_UNIPERIF_ITM_BCLR(reader, GET_UNIPERIF_ITM(reader));
- disable_irq_nosync(reader->irq);
Do you really need to disable interrupts with disable_irq()? It's more normal to just leave the interrupts registered and stop the hardware generating them.