mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
serial: 8250: omap: convert to modern PM ops
The new uart_write() function is only called from suspend/resume code, causing
a build warning when those are left out:
drivers/tty/serial/8250/8250_omap.c:169:13: error: 'uart_write' defined but not used [-Werror=unused-function]
Remove the #ifdefs and use the modern pm_ops/pm_sleep_ops and their wrappers
to let the compiler see where it's used but still drop the dead code.
Fixes: 398cecc248
("serial: 8250: omap: Fix imprecise external abort for omap_8250_pm()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20230517202012.634386-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c53aab2076
commit
ae62c49c0c
1 changed files with 5 additions and 12 deletions
|
@ -1595,7 +1595,6 @@ static int omap8250_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
|
||||||
static int omap8250_prepare(struct device *dev)
|
static int omap8250_prepare(struct device *dev)
|
||||||
{
|
{
|
||||||
struct omap8250_priv *priv = dev_get_drvdata(dev);
|
struct omap8250_priv *priv = dev_get_drvdata(dev);
|
||||||
|
@ -1640,12 +1639,7 @@ static int omap8250_resume(struct device *dev)
|
||||||
serial8250_resume_port(priv->line);
|
serial8250_resume_port(priv->line);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define omap8250_prepare NULL
|
|
||||||
#define omap8250_complete NULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
static int omap8250_lost_context(struct uart_8250_port *up)
|
static int omap8250_lost_context(struct uart_8250_port *up)
|
||||||
{
|
{
|
||||||
u32 val;
|
u32 val;
|
||||||
|
@ -1773,7 +1767,6 @@ static int omap8250_runtime_resume(struct device *dev)
|
||||||
schedule_work(&priv->qos_work);
|
schedule_work(&priv->qos_work);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP
|
#ifdef CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP
|
||||||
static int __init omap8250_console_fixup(void)
|
static int __init omap8250_console_fixup(void)
|
||||||
|
@ -1816,17 +1809,17 @@ console_initcall(omap8250_console_fixup);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct dev_pm_ops omap8250_dev_pm_ops = {
|
static const struct dev_pm_ops omap8250_dev_pm_ops = {
|
||||||
SET_SYSTEM_SLEEP_PM_OPS(omap8250_suspend, omap8250_resume)
|
SYSTEM_SLEEP_PM_OPS(omap8250_suspend, omap8250_resume)
|
||||||
SET_RUNTIME_PM_OPS(omap8250_runtime_suspend,
|
RUNTIME_PM_OPS(omap8250_runtime_suspend,
|
||||||
omap8250_runtime_resume, NULL)
|
omap8250_runtime_resume, NULL)
|
||||||
.prepare = omap8250_prepare,
|
.prepare = pm_sleep_ptr(omap8250_prepare),
|
||||||
.complete = omap8250_complete,
|
.complete = pm_sleep_ptr(omap8250_complete),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_driver omap8250_platform_driver = {
|
static struct platform_driver omap8250_platform_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "omap8250",
|
.name = "omap8250",
|
||||||
.pm = &omap8250_dev_pm_ops,
|
.pm = pm_ptr(&omap8250_dev_pm_ops),
|
||||||
.of_match_table = omap8250_dt_ids,
|
.of_match_table = omap8250_dt_ids,
|
||||||
},
|
},
|
||||||
.probe = omap8250_probe,
|
.probe = omap8250_probe,
|
||||||
|
|
Loading…
Reference in a new issue