Skip to content

Commit

Permalink
tty: serial: msm_serial: Add __maybe_unused to suspend/resume callbacks
Browse files Browse the repository at this point in the history
As stated under "20) Conditional Compilation" in coding-style.rst. We
shall rather use __maybe_unused than preprocessor macros in such cases.

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Pascal Huerst authored and Greg Kroah-Hartman committed May 14, 2018
1 parent 182ead3 commit 2ccdb55
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/tty/serial/msm_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,8 +1812,7 @@ static const struct of_device_id msm_match_table[] = {
};
MODULE_DEVICE_TABLE(of, msm_match_table);

#ifdef CONFIG_PM_SLEEP
static int msm_serial_suspend(struct device *dev)
static int __maybe_unused msm_serial_suspend(struct device *dev)
{
struct msm_port *port = dev_get_drvdata(dev);

Expand All @@ -1822,15 +1821,14 @@ static int msm_serial_suspend(struct device *dev)
return 0;
}

static int msm_serial_resume(struct device *dev)
static int __maybe_unused msm_serial_resume(struct device *dev)
{
struct msm_port *port = dev_get_drvdata(dev);

uart_resume_port(&msm_uart_driver, &port->uart);

return 0;
}
#endif /* CONFIG_PM_SLEEP */

static const struct dev_pm_ops msm_serial_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(msm_serial_suspend, msm_serial_resume)
Expand Down

0 comments on commit 2ccdb55

Please sign in to comment.