diff options
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 4 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index cfcfd5ab06ce..c6aaa6dc7564 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -1067,6 +1067,8 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message) | |||
1067 | struct usb_serial_port *port; | 1067 | struct usb_serial_port *port; |
1068 | int i, r = 0; | 1068 | int i, r = 0; |
1069 | 1069 | ||
1070 | serial->suspending = 1; | ||
1071 | |||
1070 | for (i = 0; i < serial->num_ports; ++i) { | 1072 | for (i = 0; i < serial->num_ports; ++i) { |
1071 | port = serial->port[i]; | 1073 | port = serial->port[i]; |
1072 | if (port) | 1074 | if (port) |
@@ -1084,8 +1086,10 @@ int usb_serial_resume(struct usb_interface *intf) | |||
1084 | { | 1086 | { |
1085 | struct usb_serial *serial = usb_get_intfdata(intf); | 1087 | struct usb_serial *serial = usb_get_intfdata(intf); |
1086 | 1088 | ||
1089 | serial->suspending = 0; | ||
1087 | if (serial->type->resume) | 1090 | if (serial->type->resume) |
1088 | return serial->type->resume(serial); | 1091 | return serial->type->resume(serial); |
1092 | |||
1089 | return 0; | 1093 | return 0; |
1090 | } | 1094 | } |
1091 | EXPORT_SYMBOL(usb_serial_resume); | 1095 | EXPORT_SYMBOL(usb_serial_resume); |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 0b8617a9176d..b95842542590 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -130,7 +130,8 @@ struct usb_serial { | |||
130 | struct usb_device *dev; | 130 | struct usb_device *dev; |
131 | struct usb_serial_driver *type; | 131 | struct usb_serial_driver *type; |
132 | struct usb_interface *interface; | 132 | struct usb_interface *interface; |
133 | unsigned char disconnected; | 133 | unsigned char disconnected:1; |
134 | unsigned char suspending:1; | ||
134 | unsigned char minor; | 135 | unsigned char minor; |
135 | unsigned char num_ports; | 136 | unsigned char num_ports; |
136 | unsigned char num_port_pointers; | 137 | unsigned char num_port_pointers; |