Bluetooth: Make hci-destruct callback optional
Several drivers already provide an empty callback so we can actually make this optional and then remove all those empty callbacks in the drivers. This callback isn't needed at all by most drivers as they can remove their allocated structures on device disconnect and not on hci destruction. 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>
This commit is contained in:
committed by
Johan Hedberg
parent
5a0b8159e1
commit
010666a126
@@ -1551,7 +1551,7 @@ int hci_register_dev(struct hci_dev *hdev)
|
||||
BT_DBG("%p name %s bus %d owner %p", hdev, hdev->name,
|
||||
hdev->bus, hdev->owner);
|
||||
|
||||
if (!hdev->open || !hdev->close || !hdev->destruct)
|
||||
if (!hdev->open || !hdev->close)
|
||||
return -EINVAL;
|
||||
|
||||
/* Do not allow HCI_AMP devices to register at index 0,
|
||||
|
Reference in New Issue
Block a user