* [PATCH] tty: serial: atmel: use macros instead of hardcoded values
@ 2021-10-07 11:20 Claudiu Beznea
2021-10-07 12:03 ` Nicolas Ferre
2021-10-07 13:28 ` Richard Genoud
0 siblings, 2 replies; 3+ messages in thread
From: Claudiu Beznea @ 2021-10-07 11:20 UTC (permalink / raw)
To: richard.genoud, gregkh, jirislaby, nicolas.ferre,
alexandre.belloni, ludovic.desroches
Cc: linux-serial, linux-arm-kernel, linux-kernel, Claudiu Beznea
Use UART_PM_STATE_ON, UART_PM_STATE_OFF instead of hardcoded values.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
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);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: serial: atmel: use macros instead of hardcoded values
2021-10-07 11:20 [PATCH] tty: serial: atmel: use macros instead of hardcoded values Claudiu Beznea
@ 2021-10-07 12:03 ` Nicolas Ferre
2021-10-07 13:28 ` Richard Genoud
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2021-10-07 12:03 UTC (permalink / raw)
To: Claudiu Beznea, richard.genoud, gregkh, jirislaby,
alexandre.belloni, ludovic.desroches
Cc: linux-serial, linux-arm-kernel, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: serial: atmel: use macros instead of hardcoded values
2021-10-07 11:20 [PATCH] tty: serial: atmel: use macros instead of hardcoded values Claudiu Beznea
2021-10-07 12:03 ` Nicolas Ferre
@ 2021-10-07 13:28 ` Richard Genoud
1 sibling, 0 replies; 3+ messages in thread
From: Richard Genoud @ 2021-10-07 13:28 UTC (permalink / raw)
To: Claudiu Beznea, richard.genoud, gregkh, jirislaby, nicolas.ferre,
alexandre.belloni, ludovic.desroches
Cc: linux-serial, linux-arm-kernel, linux-kernel
Le 07/10/2021 à 13:20, Claudiu Beznea a écrit :
> Use UART_PM_STATE_ON, UART_PM_STATE_OFF instead of hardcoded values.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
> ---
> 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);
>
Thanks !
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-07 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 11:20 [PATCH] tty: serial: atmel: use macros instead of hardcoded values Claudiu Beznea
2021-10-07 12:03 ` Nicolas Ferre
2021-10-07 13:28 ` Richard Genoud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).