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

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

Bluetooth: Remove HCI-owner field



After unregistering an hci_dev object a bluetooth driver does not have
any callbacks in the hci_dev structure left over. Therefore, there is no
need to keep a reference to the module.

Previously, we needed this to protect the hci-destruct callback.
However, this callback is no longer available so we do not need this
owner field, anymore.  Drivers now call hci_unregister_dev() and they
are done with the object.

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 46e06531
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -705,8 +705,6 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
	hdev->send     = bfusb_send_frame;
	hdev->send     = bfusb_send_frame;
	hdev->ioctl    = bfusb_ioctl;
	hdev->ioctl    = bfusb_ioctl;


	hdev->owner = THIS_MODULE;

	if (hci_register_dev(hdev) < 0) {
	if (hci_register_dev(hdev) < 0) {
		BT_ERR("Can't register HCI device");
		BT_ERR("Can't register HCI device");
		hci_free_dev(hdev);
		hci_free_dev(hdev);
+0 −2
Original line number Original line Diff line number Diff line
@@ -738,8 +738,6 @@ static int bluecard_open(bluecard_info_t *info)
	hdev->send     = bluecard_hci_send_frame;
	hdev->send     = bluecard_hci_send_frame;
	hdev->ioctl    = bluecard_hci_ioctl;
	hdev->ioctl    = bluecard_hci_ioctl;


	hdev->owner = THIS_MODULE;

	id = inb(iobase + 0x30);
	id = inb(iobase + 0x30);


	if ((id & 0x0f) == 0x02)
	if ((id & 0x0f) == 0x02)
+0 −2
Original line number Original line Diff line number Diff line
@@ -470,8 +470,6 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
	hdev->flush    = bpa10x_flush;
	hdev->flush    = bpa10x_flush;
	hdev->send     = bpa10x_send_frame;
	hdev->send     = bpa10x_send_frame;


	hdev->owner = THIS_MODULE;

	set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
	set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);


	err = hci_register_dev(hdev);
	err = hci_register_dev(hdev);
+0 −2
Original line number Original line Diff line number Diff line
@@ -584,8 +584,6 @@ static int bt3c_open(bt3c_info_t *info)
	hdev->send     = bt3c_hci_send_frame;
	hdev->send     = bt3c_hci_send_frame;
	hdev->ioctl    = bt3c_hci_ioctl;
	hdev->ioctl    = bt3c_hci_ioctl;


	hdev->owner = THIS_MODULE;

	/* Load firmware */
	/* Load firmware */
	err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
	err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
	if (err < 0) {
	if (err < 0) {
+0 −1
Original line number Original line Diff line number Diff line
@@ -550,7 +550,6 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
	hdev->flush = btmrvl_flush;
	hdev->flush = btmrvl_flush;
	hdev->send = btmrvl_send_frame;
	hdev->send = btmrvl_send_frame;
	hdev->ioctl = btmrvl_ioctl;
	hdev->ioctl = btmrvl_ioctl;
	hdev->owner = THIS_MODULE;


	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);


Loading