Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag, den 05.11.2020, 22:17 -0800 schrieb Davidlohr Bueso:
> @@ -1888,16 +1732,8 @@ static void mos7720_release(struct usb_serial *serial)
>                 usb_set_serial_data(serial, NULL);
>                 mos_parport->serial = NULL;
> 
> -               /* if tasklet currently scheduled, wait for it to complete */
> -               tasklet_kill(&mos_parport->urb_tasklet);
> -
> -               /* unlink any urbs sent by the tasklet  */
> -               spin_lock_irqsave(&mos_parport->listlock, flags);
> -               list_for_each_entry(urbtrack,
> -                                   &mos_parport->active_urbs,
> -                                   urblist_entry)
> -                       usb_unlink_urb(urbtrack->urb);
> -               spin_unlock_irqrestore(&mos_parport->listlock, flags);
> +               /* if work is currently scheduled, wait for it to complete */
> +               cancel_work_sync(&mos_parport->work);
>                 parport_del_port(mos_parport->pp);
> 
>                 kref_put(&mos_parport->ref_count, destroy_mos_parport);

Hi,

do you really want to cancel as opposed to wait for work in release()?

	Regards
		Oliver





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux