提交 8fdbeb26 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

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: NOliver Neukum <oneukum@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 797ef137
......@@ -888,7 +888,13 @@ static int acm_tty_ioctl(struct tty_struct *tty,
rv = set_serial_info(acm, (struct serial_struct __user *) arg);
break;
case TIOCMIWAIT:
rv = usb_autopm_get_interface(acm->control);
if (rv < 0) {
rv = -EIO;
break;
}
rv = wait_serial_change(acm, arg);
usb_autopm_put_interface(acm->control);
break;
case TIOCGICOUNT:
rv = get_serial_usage(acm, (struct serial_icounter_struct __user *) arg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册