Re: [PATCH 2/5] altera_uart: Add support for polling mode(IRQ-less)

From: Anton Vorontsov
Date: Fri Oct 01 2010 - 09:24:39 EST


On Tue, Sep 28, 2010 at 05:45:39PM +0200, Tobias Klauser wrote:
[...]
> > - ret = request_irq(port->irq, altera_uart_interrupt, IRQF_DISABLED,
> > - DRV_NAME, port);
> > - if (ret) {
> > - pr_err(DRV_NAME ": unable to attach Altera UART %d "
> > - "interrupt vector=%d\n", port->line, port->irq);
> > - return ret;
> > - }
> > -
> > spin_lock_irqsave(&port->lock, flags);
> >
> > /* Enable RX interrupts now */
> > @@ -300,6 +304,19 @@ static int altera_uart_startup(struct uart_port *port)
> >
> > spin_unlock_irqrestore(&port->lock, flags);
>
> Shouldn't we only enable the RX interrupt if we actually use interrupts?

Why would that matter if we don't use the interrupts? ;-)

But I made the change anyway.

> Also I would retain the order here (first register the interrupt handler
> and then enable the interrupts).

OK, fixed. Thanks!

--
Anton Vorontsov
email: cbouatmailru@xxxxxxxxx
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/