Re: [PATCH 1/7] HID: wiimote: Simplify synchronization

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

 



Am Samstag, 13. August 2011, 15:29:09 schrieb David Herrmann:
> @@ -362,6 +343,15 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev)
>  
>  static void wiimote_destroy(struct wiimote_data *wdata)
>  {
> +       device_remove_file(&wdata->hdev->dev, &dev_attr_led1);
> +       device_remove_file(&wdata->hdev->dev, &dev_attr_led2);
> +       device_remove_file(&wdata->hdev->dev, &dev_attr_led3);
> +       device_remove_file(&wdata->hdev->dev, &dev_attr_led4);
> +
> +       input_unregister_device(wdata->input);
> +       hid_hw_stop(wdata->hdev);
> +
> +       cancel_work_sync(&wdata->worker);
>         kfree(wdata);
>  }

This looks like the work can run on a device whose hardware has already been
stopped. Is this safe?

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux