cdc_acm: add reset_resume method
Add reset resume logic to the cdc acm driver Signed-off-by: Francesco Lavra <francescolavra@interfree.it> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
af2ac1a091
commit
a91b0c5022
@@ -1460,6 +1460,23 @@ err_out:
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int acm_reset_resume(struct usb_interface *intf)
|
||||||
|
{
|
||||||
|
struct acm *acm = usb_get_intfdata(intf);
|
||||||
|
struct tty_struct *tty;
|
||||||
|
|
||||||
|
mutex_lock(&acm->mutex);
|
||||||
|
if (acm->port.count) {
|
||||||
|
tty = tty_port_tty_get(&acm->port);
|
||||||
|
if (tty) {
|
||||||
|
tty_hangup(tty);
|
||||||
|
tty_kref_put(tty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mutex_unlock(&acm->mutex);
|
||||||
|
return acm_resume(intf);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
#define NOKIA_PCSUITE_ACM_INFO(x) \
|
#define NOKIA_PCSUITE_ACM_INFO(x) \
|
||||||
@@ -1602,6 +1619,7 @@ static struct usb_driver acm_driver = {
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.suspend = acm_suspend,
|
.suspend = acm_suspend,
|
||||||
.resume = acm_resume,
|
.resume = acm_resume,
|
||||||
|
.reset_resume = acm_reset_resume,
|
||||||
#endif
|
#endif
|
||||||
.id_table = acm_ids,
|
.id_table = acm_ids,
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
Reference in New Issue
Block a user