Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dd10688 authored by David Herrmann's avatar David Herrmann Committed by Johan Hedberg
Browse files

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: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 3dc07322
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);
}