Release 4.11 net/bluetooth/hci_sysfs.c
/* Bluetooth HCI driver model support. */
#include <linux/module.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
static struct class *bt_class;
static void bt_link_release(struct device *dev)
{
struct hci_conn *conn = to_hci_conn(dev);
kfree(conn);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 21 | 80.77% | 2 | 50.00% |
David Herrmann | 5 | 19.23% | 2 | 50.00% |
Total | 26 | 100.00% | 4 | 100.00% |
static struct device_type bt_link = {
.name = "link",
.release = bt_link_release,
};
/*
* The rfcomm tty device will possibly retain even when conn
* is down, and sysfs doesn't support move zombie device,
* so we should move the device before conn device is destroyed.
*/
static int __match_tty(struct device *dev, void *data)
{
return !strncmp(dev_name(dev), "rfcomm", 6);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Gustavo Fernando Padovan | 23 | 79.31% | 1 | 50.00% |
Marcel Holtmann | 6 | 20.69% | 1 | 50.00% |
Total | 29 | 100.00% | 2 | 100.00% |
void hci_conn_init_sysfs(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
BT_DBG("conn %p", conn);
conn->dev.type = &bt_link;
conn->dev.class = bt_class;
conn->dev.parent = &hdev->dev;
device_initialize(&conn->dev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Gustavo Fernando Padovan | 54 | 87.10% | 1 | 33.33% |
Marcel Holtmann | 8 | 12.90% | 2 | 66.67% |
Total | 62 | 100.00% | 3 | 100.00% |
void hci_conn_add_sysfs(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
BT_DBG("conn %p", conn);
dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
if (device_add(&conn->dev) < 0) {
BT_ERR("Failed to register connection device");
return;
}
hci_dev_hold(hdev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 53 | 76.81% | 4 | 80.00% |
Gustavo Fernando Padovan | 16 | 23.19% | 1 | 20.00% |
Total | 69 | 100.00% | 5 | 100.00% |
void hci_conn_del_sysfs(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
if (!device_is_registered(&conn->dev))
return;
while (1) {
struct device *dev;
dev = device_find_child(&conn->dev, NULL, __match_tty);
if (!dev)
break;
device_move(dev, NULL, DPM_ORDER_DEV_LAST);
put_device(dev);
}
device_del(&conn->dev);
hci_dev_put(hdev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 84 | 94.38% | 3 | 60.00% |
Gustavo Fernando Padovan | 3 | 3.37% | 1 | 20.00% |
Cornelia Huck | 2 | 2.25% | 1 | 20.00% |
Total | 89 | 100.00% | 5 | 100.00% |
static void bt_host_release(struct device *dev)
{
struct hci_dev *hdev = to_hci_dev(dev);
kfree(hdev);
module_put(THIS_MODULE);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 18 | 58.06% | 4 | 50.00% |
David Herrmann | 10 | 32.26% | 3 | 37.50% |
Dave Young | 3 | 9.68% | 1 | 12.50% |
Total | 31 | 100.00% | 8 | 100.00% |
static struct device_type bt_host = {
.name = "host",
.release = bt_host_release,
};
void hci_init_sysfs(struct hci_dev *hdev)
{
struct device *dev = &hdev->dev;
dev->type = &bt_host;
dev->class = bt_class;
__module_get(THIS_MODULE);
device_initialize(dev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David Herrmann | 43 | 100.00% | 2 | 100.00% |
Total | 43 | 100.00% | 2 | 100.00% |
int __init bt_sysfs_init(void)
{
bt_class = class_create(THIS_MODULE, "bluetooth");
return PTR_ERR_OR_ZERO(bt_class);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 15 | 65.22% | 4 | 66.67% |
Maksim Krasnyanskiy | 7 | 30.43% | 1 | 16.67% |
Rusty Russell | 1 | 4.35% | 1 | 16.67% |
Total | 23 | 100.00% | 6 | 100.00% |
void bt_sysfs_cleanup(void)
{
class_destroy(bt_class);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Maksim Krasnyanskiy | 6 | 50.00% | 1 | 25.00% |
Marcel Holtmann | 3 | 25.00% | 2 | 50.00% |
Dave Young | 3 | 25.00% | 1 | 25.00% |
Total | 12 | 100.00% | 4 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Marcel Holtmann | 249 | 57.24% | 14 | 56.00% |
Gustavo Fernando Padovan | 97 | 22.30% | 1 | 4.00% |
David Herrmann | 58 | 13.33% | 5 | 20.00% |
Maksim Krasnyanskiy | 19 | 4.37% | 1 | 4.00% |
Dave Young | 6 | 1.38% | 1 | 4.00% |
Paul Gortmaker | 3 | 0.69% | 1 | 4.00% |
Cornelia Huck | 2 | 0.46% | 1 | 4.00% |
Rusty Russell | 1 | 0.23% | 1 | 4.00% |
Total | 435 | 100.00% | 25 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.