diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-01-04 07:16:21 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:20 -0500 |
commit | 30883512be0839349d29c7b0bc31016e0498cf8c (patch) | |
tree | e8d34819c884ed81f0bba1ad4f337c47fd15efae /net/bluetooth | |
parent | 4663262c294c71aa1139616ae7f24dd345a69c15 (diff) |
Bluetooth: Rename hdev->inq_cache to hdev->discovery
This struct is used for not just inquiry caching but also for general
device discovery state tracking so it's better to rename it to something
more appropriate.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 12 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 2 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 5dbfb276edf2..55509b0a810a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -357,7 +357,7 @@ struct hci_dev *hci_dev_get(int index) | |||
357 | /* ---- Inquiry support ---- */ | 357 | /* ---- Inquiry support ---- */ |
358 | static void inquiry_cache_flush(struct hci_dev *hdev) | 358 | static void inquiry_cache_flush(struct hci_dev *hdev) |
359 | { | 359 | { |
360 | struct inquiry_cache *cache = &hdev->inq_cache; | 360 | struct discovery_state *cache = &hdev->discovery; |
361 | struct inquiry_entry *p, *n; | 361 | struct inquiry_entry *p, *n; |
362 | 362 | ||
363 | list_for_each_entry_safe(p, n, &cache->all, all) { | 363 | list_for_each_entry_safe(p, n, &cache->all, all) { |
@@ -371,7 +371,7 @@ static void inquiry_cache_flush(struct hci_dev *hdev) | |||
371 | 371 | ||
372 | struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) | 372 | struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) |
373 | { | 373 | { |
374 | struct inquiry_cache *cache = &hdev->inq_cache; | 374 | struct discovery_state *cache = &hdev->discovery; |
375 | struct inquiry_entry *e; | 375 | struct inquiry_entry *e; |
376 | 376 | ||
377 | BT_DBG("cache %p, %s", cache, batostr(bdaddr)); | 377 | BT_DBG("cache %p, %s", cache, batostr(bdaddr)); |
@@ -387,7 +387,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *b | |||
387 | struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, | 387 | struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, |
388 | bdaddr_t *bdaddr) | 388 | bdaddr_t *bdaddr) |
389 | { | 389 | { |
390 | struct inquiry_cache *cache = &hdev->inq_cache; | 390 | struct discovery_state *cache = &hdev->discovery; |
391 | struct inquiry_entry *e; | 391 | struct inquiry_entry *e; |
392 | 392 | ||
393 | BT_DBG("cache %p, %s", cache, batostr(bdaddr)); | 393 | BT_DBG("cache %p, %s", cache, batostr(bdaddr)); |
@@ -403,7 +403,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, | |||
403 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, | 403 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, |
404 | bool name_known) | 404 | bool name_known) |
405 | { | 405 | { |
406 | struct inquiry_cache *cache = &hdev->inq_cache; | 406 | struct discovery_state *cache = &hdev->discovery; |
407 | struct inquiry_entry *ie; | 407 | struct inquiry_entry *ie; |
408 | 408 | ||
409 | BT_DBG("cache %p, %s", cache, batostr(&data->bdaddr)); | 409 | BT_DBG("cache %p, %s", cache, batostr(&data->bdaddr)); |
@@ -445,7 +445,7 @@ update: | |||
445 | 445 | ||
446 | static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf) | 446 | static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf) |
447 | { | 447 | { |
448 | struct inquiry_cache *cache = &hdev->inq_cache; | 448 | struct discovery_state *cache = &hdev->discovery; |
449 | struct inquiry_info *info = (struct inquiry_info *) buf; | 449 | struct inquiry_info *info = (struct inquiry_info *) buf; |
450 | struct inquiry_entry *e; | 450 | struct inquiry_entry *e; |
451 | int copied = 0; | 451 | int copied = 0; |
@@ -1546,7 +1546,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1546 | init_waitqueue_head(&hdev->req_wait_q); | 1546 | init_waitqueue_head(&hdev->req_wait_q); |
1547 | mutex_init(&hdev->req_lock); | 1547 | mutex_init(&hdev->req_lock); |
1548 | 1548 | ||
1549 | inquiry_cache_init(hdev); | 1549 | discovery_init(hdev); |
1550 | 1550 | ||
1551 | hci_conn_hash_init(hdev); | 1551 | hci_conn_hash_init(hdev); |
1552 | 1552 | ||
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 3600d78c2f25..74b49e330a1d 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -383,7 +383,7 @@ static struct device_type bt_host = { | |||
383 | static int inquiry_cache_show(struct seq_file *f, void *p) | 383 | static int inquiry_cache_show(struct seq_file *f, void *p) |
384 | { | 384 | { |
385 | struct hci_dev *hdev = f->private; | 385 | struct hci_dev *hdev = f->private; |
386 | struct inquiry_cache *cache = &hdev->inq_cache; | 386 | struct discovery_state *cache = &hdev->discovery; |
387 | struct inquiry_entry *e; | 387 | struct inquiry_entry *e; |
388 | 388 | ||
389 | hci_dev_lock(hdev); | 389 | hci_dev_lock(hdev); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 39775119585a..894f11bc571d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2000,7 +2000,7 @@ static int confirm_name(struct sock *sk, u16 index, unsigned char *data, | |||
2000 | list_del(&e->list); | 2000 | list_del(&e->list); |
2001 | } else { | 2001 | } else { |
2002 | e->name_state = NAME_NEEDED; | 2002 | e->name_state = NAME_NEEDED; |
2003 | list_move(&e->list, &hdev->inq_cache.resolve); | 2003 | list_move(&e->list, &hdev->discovery.resolve); |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | err = 0; | 2006 | err = 0; |