From cd6045138ed1bb5d8773e940d51c34318eef3ef2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 23 Sep 2009 15:57:43 -0700 Subject: [PATCH] drivers/usb/serial/sierra.c: fix CONFIG_PM=n build drivers/usb/serial/sierra.c: In function 'sierra_suspend': drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm' Repairs commit e6929a9020acbeb04d9a3ad9a88234c15be808fd Author: Oliver Neukum Date: Fri Sep 4 23:19:53 2009 +0200 USB: support for autosuspend in sierra while online Cc: Greg KH Cc: Oliver Neukum Cc: Elina Pasheva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/serial/sierra.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 68fa0e43b78..8c075b2416b 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -912,6 +912,7 @@ static void sierra_release(struct usb_serial *serial) } } +#ifdef CONFIG_PM static void stop_read_write_urbs(struct usb_serial *serial) { int i, j; @@ -988,6 +989,10 @@ static int sierra_resume(struct usb_serial *serial) return ec ? -EIO : 0; } +#else +#define sierra_suspend NULL +#define sierra_resume NULL +#endif static struct usb_serial_driver sierra_device = { .driver = { -- 2.20.1