PM: Fix misuse of wakeup flag accessors in serial core
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 19 Mar 2008 21:35:13 +0000 (22:35 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 20 Apr 2008 02:10:25 +0000 (19:10 -0700)
This patch (as1059) fixes a mistake in the way the serial core
initializes a device's wakeup settings.  It should use the accessor
routine instead of relying on a macro producing an lvalue.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/serial_core.c

index c32c1ca75f631c09dc5a348d7218f0d9c805e481..a9ca03ead3e5dc0337b9b7a1eecdf8bb4ce1569a 100644 (file)
@@ -2422,7 +2422,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
         */
        tty_dev = tty_register_device(drv->tty_driver, port->line, port->dev);
        if (likely(!IS_ERR(tty_dev))) {
-               device_can_wakeup(tty_dev) = 1;
+               device_init_wakeup(tty_dev, 1);
                device_set_wakeup_enable(tty_dev, 0);
        } else
                printk(KERN_ERR "Cannot register tty device on line %d\n",