Re: [PATCH] Bluetooth: Move bit-field var to data->flags

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

 



On Mon, Jul 19, 2010 at 2:40 PM, Gustavo F. Padovan <gustavo@xxxxxxxxxxx> wrote:
>> On Fri, Jul 16, 2010 at 4:20 PM, Gustavo F. Padovan <gustavo@xxxxxxxxxxx> 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.

Ok, but in this case looks like there is a clear_bit() already there.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux