From: Alexandre Belloni Date: Tue, 21 Feb 2017 12:03:57 +0000 (+0100) Subject: tty/serial: atmel: remove cache when unnecessary X-Git-Tag: v5.15~11348^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=488ae82d973c421229c9f02363e94545086313da;p=platform%2Fkernel%2Flinux-starfive.git tty/serial: atmel: remove cache when unnecessary struct cache is only used in suspend/resume. Exclude it when PM is not selected. Suggested-by: Richard Genoud Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 87a9212..8cc152e 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -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);