Commit 08b8b6c4 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan Committed by Marcel Holtmann

Bluetooth: Move bit-field variable in USB driver to data->flags

did_iso_resume keeps only a bit-field value, so moving that to a proper
flags place.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 5d8868ff
...@@ -149,6 +149,7 @@ static struct usb_device_id blacklist_table[] = { ...@@ -149,6 +149,7 @@ static struct usb_device_id blacklist_table[] = {
#define BTUSB_BULK_RUNNING 1 #define BTUSB_BULK_RUNNING 1
#define BTUSB_ISOC_RUNNING 2 #define BTUSB_ISOC_RUNNING 2
#define BTUSB_SUSPENDING 3 #define BTUSB_SUSPENDING 3
#define BTUSB_DID_ISO_RESUME 4
struct btusb_data { struct btusb_data {
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -182,7 +183,6 @@ struct btusb_data { ...@@ -182,7 +183,6 @@ struct btusb_data {
unsigned int sco_num; unsigned int sco_num;
int isoc_altsetting; int isoc_altsetting;
int suspend_count; int suspend_count;
int did_iso_resume:1;
}; };
static int inc_tx(struct btusb_data *data) static int inc_tx(struct btusb_data *data)
...@@ -810,7 +810,7 @@ static void btusb_work(struct work_struct *work) ...@@ -810,7 +810,7 @@ static void btusb_work(struct work_struct *work)
int err; int err;
if (hdev->conn_hash.sco_num > 0) { 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); err = usb_autopm_get_interface(data->isoc);
if (err < 0) { if (err < 0) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags); clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
...@@ -818,7 +818,7 @@ static void btusb_work(struct work_struct *work) ...@@ -818,7 +818,7 @@ static void btusb_work(struct work_struct *work)
return; return;
} }
data->did_iso_resume = 1; set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
} }
if (data->isoc_altsetting != 2) { if (data->isoc_altsetting != 2) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags); clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
...@@ -839,10 +839,8 @@ static void btusb_work(struct work_struct *work) ...@@ -839,10 +839,8 @@ static void btusb_work(struct work_struct *work)
usb_kill_anchored_urbs(&data->isoc_anchor); usb_kill_anchored_urbs(&data->isoc_anchor);
__set_isoc_interface(hdev, 0); __set_isoc_interface(hdev, 0);
if (data->did_iso_resume) { if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
data->did_iso_resume = 0;
usb_autopm_put_interface(data->isoc); usb_autopm_put_interface(data->isoc);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment