tty/serial: atmel: remove cache when unnecessary
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 21 Feb 2017 12:03:57 +0000 (13:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Mar 2017 02:59:04 +0000 (10:59 +0800)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c

index 87a921217f8b5bff811fa0c956abdf0551d31a3f..8cc152e67bfb35262bed575ac9dafc1a3794088e 100644 (file)
@@ -176,6 +176,7 @@ struct atmel_uart_port {
        unsigned int            pending_status;
        spinlock_t              lock_suspended;
 
+#ifdef CONFIG_PM
        struct {
                u32             cr;
                u32             mr;
@@ -186,6 +187,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);