On Thu, Jul 06, 2017 at 07:14:45PM +0800, Oder Chiou wrote: > + remain_data = (cur_wp >= rt5514_dsp->buf_rp) ? > + (cur_wp - rt5514_dsp->buf_rp) : > + ((rt5514_dsp->buf_limit - rt5514_dsp->buf_rp) + > + (cur_wp - rt5514_dsp->buf_base)); Please write this using a normal if statement, it'd be much easier to read. > +static irqreturn_t rt5514_spi_irq(int irq, void *data) > +{ > + struct rt5514_dsp *rt5514_dsp = data; > + > + schedule_work(&rt5514_dsp->start_work); > + > + return IRQ_HANDLED; > +} Why not just use a threaded interrupt handler for the start_work? That'd get you into process context. Otherwise this looks basically fine.
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel