struct usb_serial *serial = usb_get_intfdata(intf);
int i, r = 0;
- serial->suspending = 1;
-
/*
* serial->type->suspend() MUST return 0 in system sleep context,
* otherwise, the resume callback has to recover device from
*/
if (serial->type->suspend) {
r = serial->type->suspend(serial, message);
- if (r < 0) {
- serial->suspending = 0;
+ if (r < 0)
goto err_out;
- }
}
for (i = 0; i < serial->num_ports; ++i)
usb_serial_unpoison_port_urbs(serial);
- serial->suspending = 0;
if (serial->type->resume)
rv = serial->type->resume(serial);
else
usb_serial_unpoison_port_urbs(serial);
- serial->suspending = 0;
if (serial->type->reset_resume) {
rv = serial->type->reset_resume(serial);
} else {
struct usb_serial_driver *type;
struct usb_interface *interface;
unsigned char disconnected:1;
- unsigned char suspending:1;
unsigned char attached:1;
unsigned char minors_reserved:1;
unsigned char num_ports;