15 Jul
2015
15 Jul
'15
11:31 a.m.
On 07/10/2015 07:26 PM, Mark Brown wrote:
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.
Yes i can keep it on, as SET_UNIPERIF_ITM_BCLR disable generation. i will update this