diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-17 12:03:21 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-18 14:07:54 -0500 |
commit | 09fd0de5bd8f8ef3317e5365f92f1a13dcd89aa9 (patch) | |
tree | e29f1e4fc4555eefb5a39dfd1e230afcf28da999 /net/bluetooth/hci_sysfs.c | |
parent | b78752cc71d86998d3b77d873c61d6ffdb7a2142 (diff) |
Bluetooth: Replace spin_lock by mutex in hci_dev
Now we run everything in HCI in process context, so it's a better idea use
mutex instead spin_lock. The macro remains hci_dev_lock() (and I got rid
of hci_dev_lock_bh()), of course.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index f8e6aa386cef..c3c1ec871d46 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -402,7 +402,7 @@ static int inquiry_cache_show(struct seq_file *f, void *p) | |||
402 | struct inquiry_cache *cache = &hdev->inq_cache; | 402 | struct inquiry_cache *cache = &hdev->inq_cache; |
403 | struct inquiry_entry *e; | 403 | struct inquiry_entry *e; |
404 | 404 | ||
405 | hci_dev_lock_bh(hdev); | 405 | hci_dev_lock(hdev); |
406 | 406 | ||
407 | for (e = cache->list; e; e = e->next) { | 407 | for (e = cache->list; e; e = e->next) { |
408 | struct inquiry_data *data = &e->data; | 408 | struct inquiry_data *data = &e->data; |
@@ -415,7 +415,7 @@ static int inquiry_cache_show(struct seq_file *f, void *p) | |||
415 | data->rssi, data->ssp_mode, e->timestamp); | 415 | data->rssi, data->ssp_mode, e->timestamp); |
416 | } | 416 | } |
417 | 417 | ||
418 | hci_dev_unlock_bh(hdev); | 418 | hci_dev_unlock(hdev); |
419 | 419 | ||
420 | return 0; | 420 | return 0; |
421 | } | 421 | } |
@@ -437,12 +437,12 @@ static int blacklist_show(struct seq_file *f, void *p) | |||
437 | struct hci_dev *hdev = f->private; | 437 | struct hci_dev *hdev = f->private; |
438 | struct bdaddr_list *b; | 438 | struct bdaddr_list *b; |
439 | 439 | ||
440 | hci_dev_lock_bh(hdev); | 440 | hci_dev_lock(hdev); |
441 | 441 | ||
442 | list_for_each_entry(b, &hdev->blacklist, list) | 442 | list_for_each_entry(b, &hdev->blacklist, list) |
443 | seq_printf(f, "%s\n", batostr(&b->bdaddr)); | 443 | seq_printf(f, "%s\n", batostr(&b->bdaddr)); |
444 | 444 | ||
445 | hci_dev_unlock_bh(hdev); | 445 | hci_dev_unlock(hdev); |
446 | 446 | ||
447 | return 0; | 447 | return 0; |
448 | } | 448 | } |
@@ -481,12 +481,12 @@ static int uuids_show(struct seq_file *f, void *p) | |||
481 | struct hci_dev *hdev = f->private; | 481 | struct hci_dev *hdev = f->private; |
482 | struct bt_uuid *uuid; | 482 | struct bt_uuid *uuid; |
483 | 483 | ||
484 | hci_dev_lock_bh(hdev); | 484 | hci_dev_lock(hdev); |
485 | 485 | ||
486 | list_for_each_entry(uuid, &hdev->uuids, list) | 486 | list_for_each_entry(uuid, &hdev->uuids, list) |
487 | print_bt_uuid(f, uuid->uuid); | 487 | print_bt_uuid(f, uuid->uuid); |
488 | 488 | ||
489 | hci_dev_unlock_bh(hdev); | 489 | hci_dev_unlock(hdev); |
490 | 490 | ||
491 | return 0; | 491 | return 0; |
492 | } | 492 | } |
@@ -507,11 +507,11 @@ static int auto_accept_delay_set(void *data, u64 val) | |||
507 | { | 507 | { |
508 | struct hci_dev *hdev = data; | 508 | struct hci_dev *hdev = data; |
509 | 509 | ||
510 | hci_dev_lock_bh(hdev); | 510 | hci_dev_lock(hdev); |
511 | 511 | ||
512 | hdev->auto_accept_delay = val; | 512 | hdev->auto_accept_delay = val; |
513 | 513 | ||
514 | hci_dev_unlock_bh(hdev); | 514 | hci_dev_unlock(hdev); |
515 | 515 | ||
516 | return 0; | 516 | return 0; |
517 | } | 517 | } |
@@ -520,11 +520,11 @@ static int auto_accept_delay_get(void *data, u64 *val) | |||
520 | { | 520 | { |
521 | struct hci_dev *hdev = data; | 521 | struct hci_dev *hdev = data; |
522 | 522 | ||
523 | hci_dev_lock_bh(hdev); | 523 | hci_dev_lock(hdev); |
524 | 524 | ||
525 | *val = hdev->auto_accept_delay; | 525 | *val = hdev->auto_accept_delay; |
526 | 526 | ||
527 | hci_dev_unlock_bh(hdev); | 527 | hci_dev_unlock(hdev); |
528 | 528 | ||
529 | return 0; | 529 | return 0; |
530 | } | 530 | } |