aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-02-08 09:27:07 -0500
committerMarcel Holtmann <marcel@holtmann.org>2010-02-27 08:05:38 -0500
commitc13854cef4751000b968d4e8ac95796562d5b96f (patch)
tree0955205615783cfdf112c9bbf264ef1fe57409ed /net
parent10f7891f998e84acfa31ac9c5a0fea052c39ecb8 (diff)
Bluetooth: Convert controller hdev->type to hdev->bus
The hdev->type is misnamed and should be actually hdev->bus instead. So convert it now. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c8
-rw-r--r--net/bluetooth/hci_sysfs.c16
2 files changed, 12 insertions, 12 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 94ba34982021..4b62ed01ddc6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -797,7 +797,7 @@ int hci_get_dev_info(void __user *arg)
797 797
798 strcpy(di.name, hdev->name); 798 strcpy(di.name, hdev->name);
799 di.bdaddr = hdev->bdaddr; 799 di.bdaddr = hdev->bdaddr;
800 di.type = hdev->type; 800 di.type = hdev->bus;
801 di.flags = hdev->flags; 801 di.flags = hdev->flags;
802 di.pkt_type = hdev->pkt_type; 802 di.pkt_type = hdev->pkt_type;
803 di.acl_mtu = hdev->acl_mtu; 803 di.acl_mtu = hdev->acl_mtu;
@@ -869,8 +869,8 @@ int hci_register_dev(struct hci_dev *hdev)
869 struct list_head *head = &hci_dev_list, *p; 869 struct list_head *head = &hci_dev_list, *p;
870 int i, id = 0; 870 int i, id = 0;
871 871
872 BT_DBG("%p name %s type %d owner %p", hdev, hdev->name, 872 BT_DBG("%p name %s bus %d owner %p", hdev, hdev->name,
873 hdev->type, hdev->owner); 873 hdev->bus, hdev->owner);
874 874
875 if (!hdev->open || !hdev->close || !hdev->destruct) 875 if (!hdev->open || !hdev->close || !hdev->destruct)
876 return -EINVAL; 876 return -EINVAL;
@@ -946,7 +946,7 @@ int hci_unregister_dev(struct hci_dev *hdev)
946{ 946{
947 int i; 947 int i;
948 948
949 BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); 949 BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
950 950
951 write_lock_bh(&hci_dev_list_lock); 951 write_lock_bh(&hci_dev_list_lock);
952 list_del(&hdev->list); 952 list_del(&hdev->list);
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 2bc6f6a8de68..9b5f376813b7 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -166,9 +166,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
166 queue_work(bt_workq, &conn->work_del); 166 queue_work(bt_workq, &conn->work_del);
167} 167}
168 168
169static inline char *host_typetostr(int type) 169static inline char *host_bustostr(int bus)
170{ 170{
171 switch (type) { 171 switch (bus) {
172 case HCI_VIRTUAL: 172 case HCI_VIRTUAL:
173 return "VIRTUAL"; 173 return "VIRTUAL";
174 case HCI_USB: 174 case HCI_USB:
@@ -188,10 +188,10 @@ static inline char *host_typetostr(int type)
188 } 188 }
189} 189}
190 190
191static ssize_t show_type(struct device *dev, struct device_attribute *attr, char *buf) 191static ssize_t show_bus(struct device *dev, struct device_attribute *attr, char *buf)
192{ 192{
193 struct hci_dev *hdev = dev_get_drvdata(dev); 193 struct hci_dev *hdev = dev_get_drvdata(dev);
194 return sprintf(buf, "%s\n", host_typetostr(hdev->type)); 194 return sprintf(buf, "%s\n", host_bustostr(hdev->bus));
195} 195}
196 196
197static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) 197static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf)
@@ -355,7 +355,7 @@ static ssize_t store_sniff_min_interval(struct device *dev, struct device_attrib
355 return count; 355 return count;
356} 356}
357 357
358static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); 358static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
359static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); 359static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
360static DEVICE_ATTR(class, S_IRUGO, show_class, NULL); 360static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
361static DEVICE_ATTR(address, S_IRUGO, show_address, NULL); 361static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
@@ -373,7 +373,7 @@ static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR,
373 show_sniff_min_interval, store_sniff_min_interval); 373 show_sniff_min_interval, store_sniff_min_interval);
374 374
375static struct attribute *bt_host_attrs[] = { 375static struct attribute *bt_host_attrs[] = {
376 &dev_attr_type.attr, 376 &dev_attr_bus.attr,
377 &dev_attr_name.attr, 377 &dev_attr_name.attr,
378 &dev_attr_class.attr, 378 &dev_attr_class.attr,
379 &dev_attr_address.attr, 379 &dev_attr_address.attr,
@@ -414,7 +414,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
414 struct device *dev = &hdev->dev; 414 struct device *dev = &hdev->dev;
415 int err; 415 int err;
416 416
417 BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); 417 BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
418 418
419 dev->type = &bt_host; 419 dev->type = &bt_host;
420 dev->class = bt_class; 420 dev->class = bt_class;
@@ -433,7 +433,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
433 433
434void hci_unregister_sysfs(struct hci_dev *hdev) 434void hci_unregister_sysfs(struct hci_dev *hdev)
435{ 435{
436 BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); 436 BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
437 437
438 device_del(&hdev->dev); 438 device_del(&hdev->dev);
439} 439}