aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-07-16 16:20:33 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:12 -0400
commit08b8b6c454092ae19cea82787b86ee9596ae1951 (patch)
treec9bdcdad73fa5e282c35deba581da523bfba6330 /drivers/bluetooth
parent5d8868ff3d11e3fc5a5c07477f281a16c71714a3 (diff)
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: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btusb.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 6fcb97124be8..d22ce3cc611e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -149,6 +149,7 @@ static struct usb_device_id blacklist_table[] = {
149#define BTUSB_BULK_RUNNING 1 149#define BTUSB_BULK_RUNNING 1
150#define BTUSB_ISOC_RUNNING 2 150#define BTUSB_ISOC_RUNNING 2
151#define BTUSB_SUSPENDING 3 151#define BTUSB_SUSPENDING 3
152#define BTUSB_DID_ISO_RESUME 4
152 153
153struct btusb_data { 154struct btusb_data {
154 struct hci_dev *hdev; 155 struct hci_dev *hdev;
@@ -182,7 +183,6 @@ struct btusb_data {
182 unsigned int sco_num; 183 unsigned int sco_num;
183 int isoc_altsetting; 184 int isoc_altsetting;
184 int suspend_count; 185 int suspend_count;
185 int did_iso_resume:1;
186}; 186};
187 187
188static int inc_tx(struct btusb_data *data) 188static int inc_tx(struct btusb_data *data)
@@ -810,7 +810,7 @@ static void btusb_work(struct work_struct *work)
810 int err; 810 int err;
811 811
812 if (hdev->conn_hash.sco_num > 0) { 812 if (hdev->conn_hash.sco_num > 0) {
813 if (!data->did_iso_resume) { 813 if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
814 err = usb_autopm_get_interface(data->isoc); 814 err = usb_autopm_get_interface(data->isoc);
815 if (err < 0) { 815 if (err < 0) {
816 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 816 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
@@ -818,7 +818,7 @@ static void btusb_work(struct work_struct *work)
818 return; 818 return;
819 } 819 }
820 820
821 data->did_iso_resume = 1; 821 set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
822 } 822 }
823 if (data->isoc_altsetting != 2) { 823 if (data->isoc_altsetting != 2) {
824 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 824 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
@@ -839,10 +839,8 @@ static void btusb_work(struct work_struct *work)
839 usb_kill_anchored_urbs(&data->isoc_anchor); 839 usb_kill_anchored_urbs(&data->isoc_anchor);
840 840
841 __set_isoc_interface(hdev, 0); 841 __set_isoc_interface(hdev, 0);
842 if (data->did_iso_resume) { 842 if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
843 data->did_iso_resume = 0;
844 usb_autopm_put_interface(data->isoc); 843 usb_autopm_put_interface(data->isoc);
845 }
846 } 844 }
847} 845}
848 846