[PATCH] USB sierra: Fix build if !CONFIG_PM

From: Ingo Molnar
Date: Wed Sep 23 2009 - 13:19:47 EST


This build failure:

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'

Triggers because the ->auto_pm functionality depends on CONFIG_PM.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
drivers/usb/serial/sierra.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 68fa0e4..b089a70 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -912,6 +912,8 @@ static void sierra_release(struct usb_serial *serial)
}
}

+#ifdef CONFIG_PM
+
static void stop_read_write_urbs(struct usb_serial *serial)
{
int i, j;
@@ -989,6 +991,8 @@ static int sierra_resume(struct usb_serial *serial)
return ec ? -EIO : 0;
}

+#endif /* CONFIG_PM */
+
static struct usb_serial_driver sierra_device = {
.driver = {
.owner = THIS_MODULE,
@@ -1009,8 +1013,10 @@ static struct usb_serial_driver sierra_device = {
.tiocmset = sierra_tiocmset,
.attach = sierra_startup,
.release = sierra_release,
+#ifdef CONFIG_PM
.suspend = sierra_suspend,
.resume = sierra_resume,
+#endif
.read_int_callback = sierra_instat_callback,
};

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/