From: "Gustavo F. Padovan" <gustavo@padovan.org>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Move bit-field var to data->flags
Date: Mon, 19 Jul 2010 15:40:18 -0300 [thread overview]
Message-ID: <20100719184017.GA13327@vigoh> (raw)
In-Reply-To: <AANLkTilHzxBXd2KemlUhfJPnqVjDS5eIbkC_JWc-aKwm@mail.gmail.com>
Hi Anderson,
* Anderson Lizardo <anderson.lizardo@openbossa.org> [2010-07-19 13:19:52 -0400]:
> Hi Gustavo,
>
> On Fri, Jul 16, 2010 at 4:20 PM, Gustavo F. Padovan <gustavo@padovan.org> wrote:
> > @@ -810,7 +810,7 @@ static void btusb_work(struct work_struct *work)
> > int err;
> >
> > if (hdev->conn_hash.sco_num > 0) {
> > - if (!data->did_iso_resume) {
> > + if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
> > err = usb_autopm_get_interface(data->isoc);
> > if (err < 0) {
> > clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
> > @@ -818,7 +818,7 @@ static void btusb_work(struct work_struct *work)
> > return;
> > }
> >
> > - data->did_iso_resume = 1;
> > + set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
> > }
> > if (data->isoc_altsetting != 2) {
> > clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
>
> Just wondering ... could test_and_set_bit() be used here (instead of
> test_bit() + set_bit()) ?
No, because usb_autopm_get_interface() can return a error. In that case
we shall not set the bit.
--
Gustavo F. Padovan
http://padovan.org
next prev parent reply other threads:[~2010-07-19 18:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 20:20 [PATCH] Bluetooth: Move bit-field var to data->flags Gustavo F. Padovan
2010-07-16 20:54 ` Marcel Holtmann
2010-07-19 17:19 ` Anderson Lizardo
2010-07-19 18:40 ` Gustavo F. Padovan [this message]
2010-07-19 19:03 ` Anderson Lizardo
2010-07-19 19:48 ` Gustavo F. Padovan
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=20100719184017.GA13327@vigoh \
--to=gustavo@padovan.org \
--cc=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/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.