omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIME
authorShubhrajyoti D <shubhrajyoti@ti.com>
Mon, 16 Jan 2012 10:22:37 +0000 (15:52 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Jan 2012 22:11:06 +0000 (14:11 -0800)
The function serial_omap_restore_context is called only from
serial_omap_runtime_resume which depends on CONFIG_PM_RUNTIME. Make
serial_omap_restore_context also compile conditionally.

if CONFIG_PM_RUNTIME is not defined below warn may be seen.

  LD      net/xfrm/built-in.o
drivers/tty/serial/omap-serial.c:1524: warning: 'serial_omap_restore_context' defined but not used
  CC      drivers/tty/vt/selection.o

Acked-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/omap-serial.c

index 33e3360023b38229ec9bd0f173c2f57d4b73d8ce..1c2426931484fa271e0acc8f935f947ec5df97ad 100644 (file)
@@ -1521,6 +1521,7 @@ static void serial_omap_mdr1_errataset(struct uart_omap_port *up, u8 mdr1)
        }
 }
 
+#ifdef CONFIG_PM_RUNTIME
 static void serial_omap_restore_context(struct uart_omap_port *up)
 {
        if (up->errata & UART_ERRATA_i202_MDR1_ACCESS)
@@ -1550,7 +1551,6 @@ static void serial_omap_restore_context(struct uart_omap_port *up)
                serial_out(up, UART_OMAP_MDR1, up->mdr1);
 }
 
-#ifdef CONFIG_PM_RUNTIME
 static int serial_omap_runtime_suspend(struct device *dev)
 {
        struct uart_omap_port *up = dev_get_drvdata(dev);