diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-09 21:58:34 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 17:01:38 +0200 |
commit | 2dd106887d6503819f2cedc408497023547439bb (patch) | |
tree | 376decf2b0c78a54c58493b92ab6f5c0b1951d7a /net | |
parent | 3dc07322b1ce3c8477690d54ebbf15a165f43066 (diff) | |
download | blackbird-op-linux-2dd106887d6503819f2cedc408497023547439bb.tar.gz blackbird-op-linux-2dd106887d6503819f2cedc408497023547439bb.zip |
Bluetooth: Use proper datatypes in release-callbacks
This enhances code readability a lot and avoids using void* even though
we know the type of the variable.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 17e6cd48ad4d..bc154298979a 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -79,8 +79,8 @@ static const struct attribute_group *bt_link_groups[] = { static void bt_link_release(struct device *dev) { - void *data = to_hci_conn(dev); - kfree(data); + struct hci_conn *conn = to_hci_conn(dev); + kfree(conn); } static struct device_type bt_link = { @@ -368,8 +368,8 @@ static const struct attribute_group *bt_host_groups[] = { static void bt_host_release(struct device *dev) { - void *data = to_hci_dev(dev); - kfree(data); + struct hci_dev *hdev = to_hci_dev(dev); + kfree(hdev); module_put(THIS_MODULE); } |