Skip to content

Commit c53aab2

Browse files
geertugregkh
authored andcommitted
serial: 8250: omap: Move uart_write() inside PM section
If CONFIG_PM is not set (e.g. m68k/allmodconfig): drivers/tty/serial/8250/8250_omap.c:169:13: error: ‘uart_write’ defined but not used [-Werror=unused-function] 169 | static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val) | ^~~~~~~~~~ Fix tis by moving uart_write() inside the existing section protected by #ifdef CONFIG_PM. Reported-by: [email protected] Link: http://kisskb.ellerman.id.au/kisskb/buildresult/14925095/ Fixes: 398cecc ("serial: 8250: omap: Fix imprecise external abort for omap_8250_pm()") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d2d4bd2 commit c53aab2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/tty/serial/8250/8250_omap.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ static u32 uart_read(struct omap8250_priv *priv, u32 reg)
166166
return readl(priv->membase + (reg << OMAP_UART_REGSHIFT));
167167
}
168168

169-
static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
170-
{
171-
writel(val, priv->membase + (reg << OMAP_UART_REGSHIFT));
172-
}
173-
174169
/*
175170
* Called on runtime PM resume path from omap8250_restore_regs(), and
176171
* omap8250_set_mctrl().
@@ -1666,6 +1661,11 @@ static int omap8250_lost_context(struct uart_8250_port *up)
16661661
return 0;
16671662
}
16681663

1664+
static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
1665+
{
1666+
writel(val, priv->membase + (reg << OMAP_UART_REGSHIFT));
1667+
}
1668+
16691669
/* TODO: in future, this should happen via API in drivers/reset/ */
16701670
static int omap8250_soft_reset(struct device *dev)
16711671
{

0 commit comments

Comments
 (0)