提交 9a190c85 编写于 作者: H Hans de Goede 提交者: Mauro Carvalho Chehab

[media] gscpa: Clear usb_err before calling sd methods from suspend/resume

Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 a3d6e8cc
......@@ -2392,6 +2392,7 @@ int gspca_suspend(struct usb_interface *intf, pm_message_t message)
return 0;
mutex_lock(&gspca_dev->usb_lock);
gspca_dev->frozen = 1; /* avoid urb error messages */
gspca_dev->usb_err = 0;
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
......@@ -2411,6 +2412,7 @@ int gspca_resume(struct usb_interface *intf)
mutex_lock(&gspca_dev->usb_lock);
gspca_dev->frozen = 0;
gspca_dev->usb_err = 0;
gspca_dev->sd_desc->init(gspca_dev);
gspca_input_create_urb(gspca_dev);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册