Hello Nicolas, On Thu, Oct 01, 2015 at 06:50:02PM +0200, Nicolas Ferre wrote: > Le 30/09/2015 10:19, Uwe Kleine-König a écrit : > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > > Tested-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx> > > But still a little remarks below... > > > --- > > drivers/tty/serial/atmel_serial.c | 140 +++++--------------------------------- > > 1 file changed, 18 insertions(+), 122 deletions(-) > > > > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c > > index 7502af04f21b..ce2c9327dcad 100644 > > --- a/drivers/tty/serial/atmel_serial.c > > +++ b/drivers/tty/serial/atmel_serial.c > > @@ -149,7 +149,6 @@ struct atmel_uart_port { > > struct circ_buf rx_ring; > > > > struct mctrl_gpios *gpios; > > - int gpio_irq[UART_GPIO_MAX]; > > unsigned int tx_done_mask; > > u32 fifo_size; > > u32 rts_high; > > @@ -544,27 +543,21 @@ static void atmel_enable_ms(struct uart_port *port) > > > > atmel_port->ms_irq_enabled = true; > > So, what about removing this boolean as well? I'd prefer to have this > security only managed by mctrl_on in the mctrl_gpio_enable_ms() function... Even though this bool was probably introduced to not do request_irq more than once it's still a shortcut not to write US_IER/US_IDR more than once. Having said this I think getting rid of ms_irq_enabled would make a nice follow-up patch but shouldn't be squashed into this one. > > [...] > > - /* > > - * If something went wrong, rollback. > > - */ > > - while (err && (--i >= 0)) > > - if (irq[i] >= 0) > > - free_irq(irq[i], port); > > - > > - return err; > > -} > > - > > Cool to not have to deal with this anymore... The secret plan to move this into mctrl_gpio is to not duplicate this into the imx driver :-) Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html