]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Convert controller hdev->type to hdev->bus
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Feb 2010 14:27:07 +0000 (15:27 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 27 Feb 2010 13:05:38 +0000 (14:05 +0100)
The hdev->type is misnamed and should be actually hdev->bus instead. So
convert it now.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 files changed:
drivers/bluetooth/bfusb.c
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bpa10x.c
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/btmrvl_main.c
drivers/bluetooth/btsdio.c
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/btusb.c
drivers/bluetooth/dtl1_cs.c
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_vhci.c
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sysfs.c

index 2a00707aba3bb697493f7fabaeba939a388d092e..005919ab043c16bb4e699b4f58ee5a4fdbd94c6e 100644 (file)
@@ -703,7 +703,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
 
        data->hdev = hdev;
 
-       hdev->type = HCI_USB;
+       hdev->bus = HCI_USB;
        hdev->driver_data = data;
        SET_HCIDEV_DEV(hdev, &intf->dev);
 
index c2cf81144715b92fee345a2e8ecd8bf09b753131..d9bf87ca9e8337423e15e384f83bfcef4d25c70d 100644 (file)
@@ -736,7 +736,7 @@ static int bluecard_open(bluecard_info_t *info)
 
        info->hdev = hdev;
 
-       hdev->type = HCI_PCCARD;
+       hdev->bus = HCI_PCCARD;
        hdev->driver_data = info;
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
index c115285867c3010495b74da4b7eccfd910e518cb..d945cd12433a709c1c002533e418a2771988005d 100644 (file)
@@ -469,7 +469,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
                return -ENOMEM;
        }
 
-       hdev->type = HCI_USB;
+       hdev->bus = HCI_USB;
        hdev->driver_data = data;
 
        data->hdev = hdev;
index 9f5926aaf57f1d02386cc3737abf2dda6c6fa528..027cb8bf650fe44bc9641c8e40e16279e1db4c79 100644 (file)
@@ -582,7 +582,7 @@ static int bt3c_open(bt3c_info_t *info)
 
        info->hdev = hdev;
 
-       hdev->type = HCI_PCCARD;
+       hdev->bus = HCI_PCCARD;
        hdev->driver_data = info;
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
index f97771ce432ce1308044df91c3f381564cc2d3be..53a43adf2e21b3d342e9b2bb885716cdb3b810f2 100644 (file)
@@ -563,7 +563,7 @@ struct btmrvl_private *btmrvl_add_card(void *card)
 
        priv->btmrvl_dev.tx_dnld_rdy = true;
 
-       hdev->type = HCI_SDIO;
+       hdev->bus = HCI_SDIO;
        hdev->open = btmrvl_open;
        hdev->close = btmrvl_close;
        hdev->flush = btmrvl_flush;
index 7e298275c8f663b45fc04f57e5499c9f372b62d5..76e5127884f05bc948c3a6d2b306a07483dbd033 100644 (file)
@@ -326,7 +326,7 @@ static int btsdio_probe(struct sdio_func *func,
                return -ENOMEM;
        }
 
-       hdev->type = HCI_SDIO;
+       hdev->bus = HCI_SDIO;
        hdev->driver_data = data;
 
        data->hdev = hdev;
index 91c52309980427027ca756ec4bf9ea07fbc87022..60c0953d7d003b39e66a22c484213f9f096ac766 100644 (file)
@@ -500,7 +500,7 @@ static int btuart_open(btuart_info_t *info)
 
        info->hdev = hdev;
 
-       hdev->type = HCI_PCCARD;
+       hdev->bus = HCI_PCCARD;
        hdev->driver_data = info;
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
index a699f09ddf7cac819eba8a13514688895abf0af6..5d9cc53bd64315cdc1995af32f4895eecdf20fd6 100644 (file)
@@ -939,7 +939,7 @@ static int btusb_probe(struct usb_interface *intf,
                return -ENOMEM;
        }
 
-       hdev->type = HCI_USB;
+       hdev->bus = HCI_USB;
        hdev->driver_data = data;
 
        data->hdev = hdev;
index 697591941e17de3bfd0bb13573c6d3afa7ec6250..17788317c51a1ec3e07d603af881c740c51659b9 100644 (file)
@@ -485,7 +485,7 @@ static int dtl1_open(dtl1_info_t *info)
 
        info->hdev = hdev;
 
-       hdev->type = HCI_PCCARD;
+       hdev->bus = HCI_PCCARD;
        hdev->driver_data = info;
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
index aa0919386b8ce5e2176a60e13076089be96cd485..76a1abb8f2142772bd1993bf99d5771dcd1d980a 100644 (file)
@@ -383,7 +383,7 @@ static int hci_uart_register_dev(struct hci_uart *hu)
 
        hu->hdev = hdev;
 
-       hdev->type = HCI_UART;
+       hdev->bus = HCI_UART;
        hdev->driver_data = hu;
 
        hdev->open  = hci_uart_open;
index 7595274103fd61025f1a54f8e88092d97013ea8b..bb0aefdb4267c47c88f408033a6998fdd408206a 100644 (file)
@@ -236,7 +236,7 @@ static int vhci_open(struct inode *inode, struct file *file)
 
        data->hdev = hdev;
 
-       hdev->type = HCI_VIRTUAL;
+       hdev->bus = HCI_VIRTUAL;
        hdev->driver_data = data;
 
        hdev->open     = vhci_open_dev;
index ed3aea1605e89b6955e402a8b7a71c97119f42e0..3350a665180fc24e4bb9776e0143aef8435c0220 100644 (file)
@@ -43,7 +43,7 @@
 #define HCI_NOTIFY_CONN_DEL            2
 #define HCI_NOTIFY_VOICE_SETTING       3
 
-/* HCI device types */
+/* HCI bus types */
 #define HCI_VIRTUAL    0
 #define HCI_USB                1
 #define HCI_PCCARD     2
index 7b86094a894b83f43fbd1238143097172bdee7cb..7e65885290d5eb2afa366c11544511901f91a28c 100644 (file)
@@ -70,7 +70,7 @@ struct hci_dev {
        char            name[8];
        unsigned long   flags;
        __u16           id;
-       __u8            type;
+       __u8            bus;
        bdaddr_t        bdaddr;
        __u8            dev_name[248];
        __u8            dev_class[3];
index 94ba3498202164e373437b09e6a41c210bac3a1e..4b62ed01ddc619763bee5c0432b6dd8dd2a50579 100644 (file)
@@ -797,7 +797,7 @@ int hci_get_dev_info(void __user *arg)
 
        strcpy(di.name, hdev->name);
        di.bdaddr   = hdev->bdaddr;
-       di.type     = hdev->type;
+       di.type     = hdev->bus;
        di.flags    = hdev->flags;
        di.pkt_type = hdev->pkt_type;
        di.acl_mtu  = hdev->acl_mtu;
@@ -869,8 +869,8 @@ int hci_register_dev(struct hci_dev *hdev)
        struct list_head *head = &hci_dev_list, *p;
        int i, id = 0;
 
-       BT_DBG("%p name %s type %d owner %p", hdev, hdev->name,
-                                               hdev->type, hdev->owner);
+       BT_DBG("%p name %s bus %d owner %p", hdev, hdev->name,
+                                               hdev->bus, hdev->owner);
 
        if (!hdev->open || !hdev->close || !hdev->destruct)
                return -EINVAL;
@@ -946,7 +946,7 @@ int hci_unregister_dev(struct hci_dev *hdev)
 {
        int i;
 
-       BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);
+       BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
 
        write_lock_bh(&hci_dev_list_lock);
        list_del(&hdev->list);
index 2bc6f6a8de682bec6ae7c43ebcce8d257f9a5632..9b5f376813b77fa2b3734cb03ff5c91a0d5038de 100644 (file)
@@ -166,9 +166,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
        queue_work(bt_workq, &conn->work_del);
 }
 
-static inline char *host_typetostr(int type)
+static inline char *host_bustostr(int bus)
 {
-       switch (type) {
+       switch (bus) {
        case HCI_VIRTUAL:
                return "VIRTUAL";
        case HCI_USB:
@@ -188,10 +188,10 @@ static inline char *host_typetostr(int type)
        }
 }
 
-static ssize_t show_type(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t show_bus(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct hci_dev *hdev = dev_get_drvdata(dev);
-       return sprintf(buf, "%s\n", host_typetostr(hdev->type));
+       return sprintf(buf, "%s\n", host_bustostr(hdev->bus));
 }
 
 static 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
        return count;
 }
 
-static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
+static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
 static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
@@ -373,7 +373,7 @@ static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR,
                                show_sniff_min_interval, store_sniff_min_interval);
 
 static struct attribute *bt_host_attrs[] = {
-       &dev_attr_type.attr,
+       &dev_attr_bus.attr,
        &dev_attr_name.attr,
        &dev_attr_class.attr,
        &dev_attr_address.attr,
@@ -414,7 +414,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
        struct device *dev = &hdev->dev;
        int err;
 
-       BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);
+       BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
 
        dev->type = &bt_host;
        dev->class = bt_class;
@@ -433,7 +433,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
 
 void hci_unregister_sysfs(struct hci_dev *hdev)
 {
-       BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);
+       BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
 
        device_del(&hdev->dev);
 }