From: Oliver Neukum <oliver@neukum.org>
To: Ville Syrjala <syrjala@sci.fi>
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
Peter Stokes <linux@dadeos.co.uk>
Subject: Re: [PATCH 2/2] ati_remote2: Add autosuspend support
Date: Tue, 3 Jun 2008 22:11:09 +0200 [thread overview]
Message-ID: <200806032211.10052.oliver@neukum.org> (raw)
In-Reply-To: <1212518747-23000-2-git-send-email-syrjala@sci.fi>
Am Dienstag 03 Juni 2008 20:45:47 schrieb Ville Syrjala:
> +static int ati_remote2_open(struct input_dev *idev)
> +{
> + struct ati_remote2 *ar2 = input_get_drvdata(idev);
> + int r;
> +
> + dev_dbg(&ar2->intf[0]->dev, "%s()\n", __FUNCTION__);
> +
> + r = usb_autopm_get_interface(ar2->intf[0]);
> + if (r) {
> + dev_err(&ar2->intf[0]->dev,
> + "%s(): usb_autopm_get_interface() = %d\n", __FUNCTION__, r);
> + goto fail1;
> + }
> + r = usb_autopm_get_interface(ar2->intf[1]);
> + if (r) {
> + dev_err(&ar2->intf[1]->dev,
> + "%s(): usb_autopm_get_interface() = %d\n", __FUNCTION__, r);
> + goto fail2;
> + }
If you have two interfaces on one device upping the count for one of them
is enough.
> +
> + mutex_lock(&ati_remote2_mutex);
Too late. You can race with disconnect()
And you should set needs_remote_wakeup.
Regards
Oliver
next prev parent reply other threads:[~2008-06-03 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 18:45 [PATCH 1/2] ati_remote2: Add loadable keymap support Ville Syrjala
2008-06-03 18:45 ` [PATCH 2/2] ati_remote2: Add autosuspend support Ville Syrjala
2008-06-03 20:11 ` Oliver Neukum [this message]
[not found] ` <200806032211.10052.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-06-04 8:20 ` Ville Syrjälä
2008-06-04 8:32 ` Oliver Neukum
[not found] ` <200806041032.58237.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-06-17 14:13 ` Dmitry Torokhov
2008-06-17 14:39 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0806171038310.2513-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2008-06-17 15:28 ` Dmitry Torokhov
2008-06-17 17:24 ` Alan Stern
2008-06-17 17:53 ` Dmitry Torokhov
2008-06-17 18:52 ` Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2008-06-25 10:56 [PATCH 0/2] ati_remote2 patches Ville Syrjala
2008-06-25 10:56 ` [PATCH 1/2] ati_remote2: Add loadable keymap support Ville Syrjala
[not found] ` <1214391371-13698-2-git-send-email-syrjala-ORSVBvAovxo@public.gmane.org>
2008-06-25 10:56 ` [PATCH 2/2] ati_remote2: Add autosuspend support Ville Syrjala
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=200806032211.10052.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@dadeos.co.uk \
--cc=syrjala@sci.fi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.