diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 8 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 3 |
3 files changed, 5 insertions, 8 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8303f1c9ef54..c52f091ee6de 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -924,7 +924,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
924 | 924 | ||
925 | hci_conn_hash_init(hdev); | 925 | hci_conn_hash_init(hdev); |
926 | 926 | ||
927 | INIT_LIST_HEAD(&hdev->blacklist.list); | 927 | INIT_LIST_HEAD(&hdev->blacklist); |
928 | 928 | ||
929 | memset(&hdev->stat, 0, sizeof(struct hci_dev_stats)); | 929 | memset(&hdev->stat, 0, sizeof(struct hci_dev_stats)); |
930 | 930 | ||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 4f170a595934..83acd164d39e 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -168,9 +168,8 @@ static int hci_sock_release(struct socket *sock) | |||
168 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) | 168 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) |
169 | { | 169 | { |
170 | struct list_head *p; | 170 | struct list_head *p; |
171 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
172 | 171 | ||
173 | list_for_each(p, &blacklist->list) { | 172 | list_for_each(p, &hdev->blacklist) { |
174 | struct bdaddr_list *b; | 173 | struct bdaddr_list *b; |
175 | 174 | ||
176 | b = list_entry(p, struct bdaddr_list, list); | 175 | b = list_entry(p, struct bdaddr_list, list); |
@@ -202,7 +201,7 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg) | |||
202 | 201 | ||
203 | bacpy(&entry->bdaddr, &bdaddr); | 202 | bacpy(&entry->bdaddr, &bdaddr); |
204 | 203 | ||
205 | list_add(&entry->list, &hdev->blacklist.list); | 204 | list_add(&entry->list, &hdev->blacklist); |
206 | 205 | ||
207 | return 0; | 206 | return 0; |
208 | } | 207 | } |
@@ -210,9 +209,8 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg) | |||
210 | int hci_blacklist_clear(struct hci_dev *hdev) | 209 | int hci_blacklist_clear(struct hci_dev *hdev) |
211 | { | 210 | { |
212 | struct list_head *p, *n; | 211 | struct list_head *p, *n; |
213 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
214 | 212 | ||
215 | list_for_each_safe(p, n, &blacklist->list) { | 213 | list_for_each_safe(p, n, &hdev->blacklist) { |
216 | struct bdaddr_list *b; | 214 | struct bdaddr_list *b; |
217 | 215 | ||
218 | b = list_entry(p, struct bdaddr_list, list); | 216 | b = list_entry(p, struct bdaddr_list, list); |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index ce44c47eeac1..8fb967beee80 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -439,12 +439,11 @@ static const struct file_operations inquiry_cache_fops = { | |||
439 | static int blacklist_show(struct seq_file *f, void *p) | 439 | static int blacklist_show(struct seq_file *f, void *p) |
440 | { | 440 | { |
441 | struct hci_dev *hdev = f->private; | 441 | struct hci_dev *hdev = f->private; |
442 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
443 | struct list_head *l; | 442 | struct list_head *l; |
444 | 443 | ||
445 | hci_dev_lock_bh(hdev); | 444 | hci_dev_lock_bh(hdev); |
446 | 445 | ||
447 | list_for_each(l, &blacklist->list) { | 446 | list_for_each(l, &hdev->blacklist) { |
448 | struct bdaddr_list *b; | 447 | struct bdaddr_list *b; |
449 | bdaddr_t bdaddr; | 448 | bdaddr_t bdaddr; |
450 | 449 | ||