aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbin Tonnerre <albin.tonnerre@gmail.com>2009-07-29 18:04:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-29 22:10:37 -0400
commit8da14b5fc32368f582df09fe9c0bec2507868583 (patch)
treef869f45c0a25a73d7a68ba8167218e5cf2d3af4f
parent534acc057b5a08ec33fa57cdd2f5a09ef124e7f2 (diff)
drivers/serial/atmel_serial.c: fix compile when CONFIG_SERIAL_ATMEL=Y and CONFIG_SERIAL_ATMEL_CONSOLE=N
When SERIAL_ATMEL_CONSOLE is disabled, ATMEL_CONSOLE_DEVICE is set to NULL, and trying to access ATMEL_CONSOLE_DEVICE->flags in atmel_serial_probe makes the compile fail. This fixes the issue by only accessing it if CONFIG_SERIAL_ATMEL_CONSOLE is defined Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/serial/atmel_serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 338b15c0a548..607d43a31048 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1551,6 +1551,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
1551 if (ret) 1551 if (ret)
1552 goto err_add_port; 1552 goto err_add_port;
1553 1553
1554#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
1554 if (atmel_is_console_port(&port->uart) 1555 if (atmel_is_console_port(&port->uart)
1555 && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) { 1556 && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
1556 /* 1557 /*
@@ -1559,6 +1560,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
1559 */ 1560 */
1560 clk_disable(port->clk); 1561 clk_disable(port->clk);
1561 } 1562 }
1563#endif
1562 1564
1563 device_init_wakeup(&pdev->dev, 1); 1565 device_init_wakeup(&pdev->dev, 1);
1564 platform_set_drvdata(pdev, port); 1566 platform_set_drvdata(pdev, port);