Re: [PATCH] staging: btmtk_usb: cancel work when disconnect called

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

 



I am wrong hdev->close call will do cancel_work_sync, Please ignore this patch!

very sorry,

On Sat, May 25, 2013 at 11:13 PM, Devendra Naga <devendra.aaru@xxxxxxxxx> wrote:
> when disconnect calls (driver unloads) the work that is scheduled
> is still be present in kernel global workqueue, calling cancel_
> work_sync makes it remove from the global workqueue.
>
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
> ---
>  drivers/staging/btmtk_usb/btmtk_usb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/btmtk_usb/btmtk_usb.c b/drivers/staging/btmtk_usb/btmtk_usb.c
> index ab57a4b..bf7f812 100644
> --- a/drivers/staging/btmtk_usb/btmtk_usb.c
> +++ b/drivers/staging/btmtk_usb/btmtk_usb.c
> @@ -1630,6 +1630,7 @@ static void btmtk_usb_disconnect(struct usb_interface *intf)
>                 return;
>
>         hdev = data->hdev;
> +       cancel_work_sync(&data->work);
>         usb_set_intfdata(data->intf, NULL);
>
>         if (data->isoc)
> --
> 1.7.11.7
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux