浏览代码

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 <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>
Alexandre Belloni 8 年之前
父节点
当前提交
488ae82d97
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/tty/serial/atmel_serial.c

+ 2 - 0
drivers/tty/serial/atmel_serial.c

@@ -176,6 +176,7 @@ struct atmel_uart_port {
 	unsigned int		pending_status;
 	unsigned int		pending_status;
 	spinlock_t		lock_suspended;
 	spinlock_t		lock_suspended;
 
 
+#ifdef CONFIG_PM
 	struct {
 	struct {
 		u32		cr;
 		u32		cr;
 		u32		mr;
 		u32		mr;
@@ -186,6 +187,7 @@ struct atmel_uart_port {
 		u32		fmr;
 		u32		fmr;
 		u32		fimr;
 		u32		fimr;
 	} cache;
 	} cache;
+#endif
 
 
 	int (*prepare_rx)(struct uart_port *port);
 	int (*prepare_rx)(struct uart_port *port);
 	int (*prepare_tx)(struct uart_port *port);
 	int (*prepare_tx)(struct uart_port *port);