linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-input@vger.kernel.org, padovan@profusion.mobi, jkosina@suse.cz
Subject: Re: [PATCH 1/7] HID: wiimote: Simplify synchronization
Date: Sun, 14 Aug 2011 12:55:36 +0200	[thread overview]
Message-ID: <201108141255.36385.oliver@neukum.org> (raw)
In-Reply-To: <1313242155-3620-2-git-send-email-dh.herrmann@googlemail.com>

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

  reply	other threads:[~2011-08-14 10:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-13 13:29 [PATCH 0/7] New wiimote interface David Herrmann
2011-08-13 13:29 ` [PATCH 1/7] HID: wiimote: Simplify synchronization David Herrmann
2011-08-14 10:55   ` Oliver Neukum [this message]
2011-08-14 11:15     ` David Herrmann
2011-08-13 13:29 ` [PATCH 2/7] HID: wiimote: Correctly call HID open/close callbacks David Herrmann
2011-08-13 13:29 ` [PATCH 3/7] HID: wiimote: Register led class devices David Herrmann
2011-08-13 13:29 ` [PATCH 4/7] HID: wiimote: Support rumble device David Herrmann
2011-08-13 13:29 ` [PATCH 5/7] HID: wiimote: Add force-feedback support David Herrmann
2011-08-13 13:29 ` [PATCH 6/7] HID: wiimote: Add drm request David Herrmann
2011-08-13 13:29 ` [PATCH 7/7] HID: wiimote: Add status and return request handlers David Herrmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108141255.36385.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).