From: Nicolas Ferre <nicolas.ferre@microchip.com> To: Claudiu Beznea <claudiu.beznea@microchip.com>, <richard.genoud@gmail.com>, <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>, <alexandre.belloni@bootlin.com>, <ludovic.desroches@microchip.com> Cc: <linux-serial@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] tty: serial: atmel: use macros instead of hardcoded values Date: Thu, 7 Oct 2021 14:03:36 +0200 [thread overview] Message-ID: <336df8ff-72fa-90af-607b-eeb683de4a37@microchip.com> (raw) In-Reply-To: <20211007112014.2332019-1-claudiu.beznea@microchip.com> On 07/10/2021 at 13:20, Claudiu Beznea wrote: > Use UART_PM_STATE_ON, UART_PM_STATE_OFF instead of hardcoded values. > > Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Thanks Claudiu, best regards, Nicolas > --- > drivers/tty/serial/atmel_serial.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c > index 249ea35088d2..2c99a47a2535 100644 > --- a/drivers/tty/serial/atmel_serial.c > +++ b/drivers/tty/serial/atmel_serial.c > @@ -2084,7 +2084,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, > struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); > > switch (state) { > - case 0: > + case UART_PM_STATE_ON: > /* > * Enable the peripheral clock for this serial port. > * This is called on uart_open() or a resume event. > @@ -2094,7 +2094,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, > /* re-enable interrupts if we disabled some on suspend */ > atmel_uart_writel(port, ATMEL_US_IER, atmel_port->backup_imr); > break; > - case 3: > + case UART_PM_STATE_OFF: > /* Back up the interrupt mask and disable all interrupts */ > atmel_port->backup_imr = atmel_uart_readl(port, ATMEL_US_IMR); > atmel_uart_writel(port, ATMEL_US_IDR, -1); > -- Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@microchip.com> To: Claudiu Beznea <claudiu.beznea@microchip.com>, <richard.genoud@gmail.com>, <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>, <alexandre.belloni@bootlin.com>, <ludovic.desroches@microchip.com> Cc: <linux-serial@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] tty: serial: atmel: use macros instead of hardcoded values Date: Thu, 7 Oct 2021 14:03:36 +0200 [thread overview] Message-ID: <336df8ff-72fa-90af-607b-eeb683de4a37@microchip.com> (raw) In-Reply-To: <20211007112014.2332019-1-claudiu.beznea@microchip.com> On 07/10/2021 at 13:20, Claudiu Beznea wrote: > Use UART_PM_STATE_ON, UART_PM_STATE_OFF instead of hardcoded values. > > Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Thanks Claudiu, best regards, Nicolas > --- > drivers/tty/serial/atmel_serial.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c > index 249ea35088d2..2c99a47a2535 100644 > --- a/drivers/tty/serial/atmel_serial.c > +++ b/drivers/tty/serial/atmel_serial.c > @@ -2084,7 +2084,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, > struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); > > switch (state) { > - case 0: > + case UART_PM_STATE_ON: > /* > * Enable the peripheral clock for this serial port. > * This is called on uart_open() or a resume event. > @@ -2094,7 +2094,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, > /* re-enable interrupts if we disabled some on suspend */ > atmel_uart_writel(port, ATMEL_US_IER, atmel_port->backup_imr); > break; > - case 3: > + case UART_PM_STATE_OFF: > /* Back up the interrupt mask and disable all interrupts */ > atmel_port->backup_imr = atmel_uart_readl(port, ATMEL_US_IMR); > atmel_uart_writel(port, ATMEL_US_IDR, -1); > -- Nicolas Ferre _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-10-07 12:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-07 11:20 [PATCH] tty: serial: atmel: use macros instead of hardcoded values Claudiu Beznea 2021-10-07 11:20 ` Claudiu Beznea 2021-10-07 12:03 ` Nicolas Ferre [this message] 2021-10-07 12:03 ` Nicolas Ferre 2021-10-07 13:28 ` Richard Genoud 2021-10-07 13:28 ` Richard Genoud
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=336df8ff-72fa-90af-607b-eeb683de4a37@microchip.com \ --to=nicolas.ferre@microchip.com \ --cc=alexandre.belloni@bootlin.com \ --cc=claudiu.beznea@microchip.com \ --cc=gregkh@linuxfoundation.org \ --cc=jirislaby@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=ludovic.desroches@microchip.com \ --cc=richard.genoud@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.