mirror of https://gitee.com/openkylin/linux.git
cdc-acm: fix power management in ioctl
An ioctl that does depends on communication with a device should prevent suspension of teh device. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
797ef13716
commit
8fdbeb26b5
|
@ -888,7 +888,13 @@ static int acm_tty_ioctl(struct tty_struct *tty,
|
||||||
rv = set_serial_info(acm, (struct serial_struct __user *) arg);
|
rv = set_serial_info(acm, (struct serial_struct __user *) arg);
|
||||||
break;
|
break;
|
||||||
case TIOCMIWAIT:
|
case TIOCMIWAIT:
|
||||||
|
rv = usb_autopm_get_interface(acm->control);
|
||||||
|
if (rv < 0) {
|
||||||
|
rv = -EIO;
|
||||||
|
break;
|
||||||
|
}
|
||||||
rv = wait_serial_change(acm, arg);
|
rv = wait_serial_change(acm, arg);
|
||||||
|
usb_autopm_put_interface(acm->control);
|
||||||
break;
|
break;
|
||||||
case TIOCGICOUNT:
|
case TIOCGICOUNT:
|
||||||
rv = get_serial_usage(acm, (struct serial_icounter_struct __user *) arg);
|
rv = get_serial_usage(acm, (struct serial_icounter_struct __user *) arg);
|
||||||
|
|
Loading…
Reference in New Issue