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