[PATCH -next] sierra: fix build when CONFIG_PM=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

Fix build error when CONFIG_PM is not enabled:

drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm'

Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
---
 drivers/usb/serial/sierra.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20090914.orig/drivers/usb/serial/sierra.c
+++ linux-next-20090914/drivers/usb/serial/sierra.c
@@ -928,6 +928,7 @@ static void stop_read_write_urbs(struct 
 	}
 }
 
+#ifdef CONFIG_PM
 static int sierra_suspend(struct usb_serial *serial, pm_message_t message)
 {
 	struct sierra_intf_private *intfdata;
@@ -988,6 +989,7 @@ static int sierra_resume(struct usb_seri
 
 	return ec ? -EIO : 0;
 }
+#endif
 
 static struct usb_serial_driver sierra_device = {
 	.driver = {
@@ -1009,8 +1011,10 @@ static struct usb_serial_driver sierra_d
 	.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,
 };
 




---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux