diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-07-13 17:24:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-28 17:31:09 -0400 |
commit | 5f4fab91f2b12c12f0506b4da49ed199db8c64ed (patch) | |
tree | cd9227304654c234a814d1163eb46cee9cef65e1 | |
parent | f99aa3f9b67ca8c29dc29ef3fc453f0343206c46 (diff) |
USB: let the option driver compile without CONFIG_PM
This is needed for compilation without CONFIG_PM.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/serial/option.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 77b9563ec43e..7638d2632ff8 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -66,8 +66,10 @@ static int option_tiocmget(struct tty_struct *tty, struct file *file); | |||
66 | static int option_tiocmset(struct tty_struct *tty, struct file *file, | 66 | static int option_tiocmset(struct tty_struct *tty, struct file *file, |
67 | unsigned int set, unsigned int clear); | 67 | unsigned int set, unsigned int clear); |
68 | static int option_send_setup(struct usb_serial_port *port); | 68 | static int option_send_setup(struct usb_serial_port *port); |
69 | #ifdef CONFIG_PM | ||
69 | static int option_suspend(struct usb_serial *serial, pm_message_t message); | 70 | static int option_suspend(struct usb_serial *serial, pm_message_t message); |
70 | static int option_resume(struct usb_serial *serial); | 71 | static int option_resume(struct usb_serial *serial); |
72 | #endif | ||
71 | 73 | ||
72 | /* Vendor and product IDs */ | 74 | /* Vendor and product IDs */ |
73 | #define OPTION_VENDOR_ID 0x0AF0 | 75 | #define OPTION_VENDOR_ID 0x0AF0 |
@@ -555,8 +557,10 @@ static struct usb_driver option_driver = { | |||
555 | .name = "option", | 557 | .name = "option", |
556 | .probe = usb_serial_probe, | 558 | .probe = usb_serial_probe, |
557 | .disconnect = usb_serial_disconnect, | 559 | .disconnect = usb_serial_disconnect, |
560 | #ifdef CONFIG_PM | ||
558 | .suspend = usb_serial_suspend, | 561 | .suspend = usb_serial_suspend, |
559 | .resume = usb_serial_resume, | 562 | .resume = usb_serial_resume, |
563 | #endif | ||
560 | .id_table = option_ids, | 564 | .id_table = option_ids, |
561 | .no_dynamic_id = 1, | 565 | .no_dynamic_id = 1, |
562 | }; | 566 | }; |
@@ -588,8 +592,10 @@ static struct usb_serial_driver option_1port_device = { | |||
588 | .disconnect = option_disconnect, | 592 | .disconnect = option_disconnect, |
589 | .release = option_release, | 593 | .release = option_release, |
590 | .read_int_callback = option_instat_callback, | 594 | .read_int_callback = option_instat_callback, |
595 | #ifdef CONFIG_PM | ||
591 | .suspend = option_suspend, | 596 | .suspend = option_suspend, |
592 | .resume = option_resume, | 597 | .resume = option_resume, |
598 | #endif | ||
593 | }; | 599 | }; |
594 | 600 | ||
595 | static int debug; | 601 | static int debug; |
@@ -1185,6 +1191,7 @@ static void option_release(struct usb_serial *serial) | |||
1185 | } | 1191 | } |
1186 | } | 1192 | } |
1187 | 1193 | ||
1194 | #ifdef CONFIG_PM | ||
1188 | static int option_suspend(struct usb_serial *serial, pm_message_t message) | 1195 | static int option_suspend(struct usb_serial *serial, pm_message_t message) |
1189 | { | 1196 | { |
1190 | dbg("%s entered", __func__); | 1197 | dbg("%s entered", __func__); |
@@ -1243,6 +1250,7 @@ static int option_resume(struct usb_serial *serial) | |||
1243 | } | 1250 | } |
1244 | return 0; | 1251 | return 0; |
1245 | } | 1252 | } |
1253 | #endif | ||
1246 | 1254 | ||
1247 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1255 | MODULE_AUTHOR(DRIVER_AUTHOR); |
1248 | MODULE_DESCRIPTION(DRIVER_DESC); | 1256 | MODULE_DESCRIPTION(DRIVER_DESC); |