aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-11-08 09:50:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 08:50:46 -0500
commit65dabaf532ba632d3660fc7943f3fe47c7c56dc0 (patch)
tree52ca9284be523e79cc13a9cee886d1fb1c386dc9
parent9de4153dbb2416817d341f57e7b194df5111f075 (diff)
serial: pxa2xx: mark PM functions as __maybe_unused
The fresh new serial driver for pxa produces warnings when CONFIG_PM_SLEEP is disabled: drivers/tty/serial/8250/8250_pxa.c:50:12: error: 'serial_pxa_resume' defined but not used [-Werror=unused-function] drivers/tty/serial/8250/8250_pxa.c:41:12: error: 'serial_pxa_suspend' defined but not used [-Werror=unused-function] This removes the #ifdef around the two functions and instead marks both as __maybe_unused, which is more robust and avoids the warning. Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_pxa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c
index 4622bb02d407..4d68731af534 100644
--- a/drivers/tty/serial/8250/8250_pxa.c
+++ b/drivers/tty/serial/8250/8250_pxa.c
@@ -37,8 +37,7 @@ struct pxa8250_data {
37 struct clk *clk; 37 struct clk *clk;
38}; 38};
39 39
40#ifdef CONFIG_PM 40static int __maybe_unused serial_pxa_suspend(struct device *dev)
41static int serial_pxa_suspend(struct device *dev)
42{ 41{
43 struct pxa8250_data *data = dev_get_drvdata(dev); 42 struct pxa8250_data *data = dev_get_drvdata(dev);
44 43
@@ -47,7 +46,7 @@ static int serial_pxa_suspend(struct device *dev)
47 return 0; 46 return 0;
48} 47}
49 48
50static int serial_pxa_resume(struct device *dev) 49static int __maybe_unused serial_pxa_resume(struct device *dev)
51{ 50{
52 struct pxa8250_data *data = dev_get_drvdata(dev); 51 struct pxa8250_data *data = dev_get_drvdata(dev);
53 52
@@ -55,7 +54,6 @@ static int serial_pxa_resume(struct device *dev)
55 54
56 return 0; 55 return 0;
57} 56}
58#endif
59 57
60static const struct dev_pm_ops serial_pxa_pm_ops = { 58static const struct dev_pm_ops serial_pxa_pm_ops = {
61 SET_SYSTEM_SLEEP_PM_OPS(serial_pxa_suspend, serial_pxa_resume) 59 SET_SYSTEM_SLEEP_PM_OPS(serial_pxa_suspend, serial_pxa_resume)