serial: omap: make sure to suspend device before remove
authorFelipe Balbi <balbi@ti.com>
Thu, 6 Sep 2012 12:45:29 +0000 (15:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Sep 2012 16:17:01 +0000 (09:17 -0700)
before removing the driver, let's make sure
to force device into a suspended state in order
to conserve power.

Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c

index c19d340f6ba87cbfb85a58d6780a27218a460beb..0ceca4457d3bdcb42a88a19eb131d9bf4d675330 100644 (file)
@@ -1369,6 +1369,7 @@ static int serial_omap_remove(struct platform_device *dev)
 {
        struct uart_omap_port *up = platform_get_drvdata(dev);
 
+       pm_runtime_put_sync(up->dev);
        pm_runtime_disable(up->dev);
        uart_remove_one_port(&serial_omap_reg, &up->port);
        pm_qos_remove_request(&up->pm_qos_request);