Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585255 > unrolled thread

[PATCH] tty/serial: atmel: remove cache when unnecessary

Started byAlexandre Belloni <alexandre.belloni@free-electrons.com>
First post2017-02-21 13:10 +0100
Last post2017-02-21 14:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] tty/serial: atmel: remove cache when unnecessary Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-02-21 13:10 +0100
    Re: [PATCH] tty/serial: atmel: remove cache when unnecessary Richard Genoud <richard.genoud@gmail.com> - 2017-02-21 14:10 +0100

#1585255 — [PATCH] tty/serial: atmel: remove cache when unnecessary

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2017-02-21 13:10 +0100
Subject[PATCH] tty/serial: atmel: remove cache when unnecessary
Message-ID<tdhqx-2nT-13@gated-at.bofh.it>
struct cache is only used in suspend/resume. Exclude it when PM is not
selected.

Suggested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index dcebb28ffbc4..f0d4894267c2 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -175,6 +175,7 @@ struct atmel_uart_port {
 	unsigned int		pending_status;
 	spinlock_t		lock_suspended;
 
+#ifdef CONFIG_PM
 	struct {
 		u32		cr;
 		u32		mr;
@@ -185,6 +186,7 @@ struct atmel_uart_port {
 		u32		fmr;
 		u32		fimr;
 	} cache;
+#endif
 
 	int (*prepare_rx)(struct uart_port *port);
 	int (*prepare_tx)(struct uart_port *port);
-- 
2.11.0

[toc] | [next] | [standalone]


#1585314

FromRichard Genoud <richard.genoud@gmail.com>
Date2017-02-21 14:10 +0100
Message-ID<tdimE-30G-79@gated-at.bofh.it>
In reply to#1585255
2017-02-21 13:03 GMT+01:00 Alexandre Belloni
<alexandre.belloni@free-electrons.com>:
> struct cache is only used in suspend/resume. Exclude it when PM is not
> selected.
>
> Suggested-by: Richard Genoud <richard.genoud@gmail.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index dcebb28ffbc4..f0d4894267c2 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -175,6 +175,7 @@ struct atmel_uart_port {
>         unsigned int            pending_status;
>         spinlock_t              lock_suspended;
>
> +#ifdef CONFIG_PM
>         struct {
>                 u32             cr;
>                 u32             mr;
> @@ -185,6 +186,7 @@ struct atmel_uart_port {
>                 u32             fmr;
>                 u32             fimr;
>         } cache;
> +#endif
>
>         int (*prepare_rx)(struct uart_port *port);
>         int (*prepare_tx)(struct uart_port *port);
> --
> 2.11.0
>

Thanks !

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web