linux/drivers/bluetooth
David Herrmann bf18c7118c Bluetooth: vhci: Free driver_data on file release
This removes the hci-destruct callback and instead frees the private
driver data in the vhci_release file release function. There is no
reason to keep private driver data available if the driver has already
shut down.

After vhci_release is called our module can be unloaded. The only reason
it is kept alive is the hci-core having a module-ref on us because of
our destruct callback. However, this callback only frees
hdev->driver_data. That is, we wait for the hdev-device to get destroyed
to free our internal driver-data. In fact, the hci-core does never touch
hdev->driver_data so it doesn't care if it is NULL. Therefore, we simply
free it when unloading the driver.

Another important fact is that the hdev core does not call any callbacks
other than the destruct-cb after hci_unregister_dev() has been called.
So there is no function of our module that will be called nor does the
hci-core touch hdev->driver_data. Hence, no other code can touch
hdev->driver_data after our cleanup so the destruct callback is
definitely unnecessary here.

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>
2012-02-13 17:01:23 +02:00
..
ath3k.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
bcm203x.c USB: convert drivers/bluetooth/* to use module_usb_driver() 2011-11-18 09:47:34 -08:00
bfusb.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
bluecard_cs.c Bluetooth: bluecard-cs: Remove empty destruct cb 2012-02-13 17:01:22 +02:00
bpa10x.c USB: convert drivers/bluetooth/* to use module_usb_driver() 2011-11-18 09:47:34 -08:00
bt3c_cs.c Bluetooth: bt3c-cs: Remove empty destruct cb 2012-02-13 17:01:23 +02:00
btmrvl_debugfs.c Bluetooth: Do not ignore errors returned from strict_strtol() 2011-06-10 15:04:41 -03:00
btmrvl_drv.h Bluetooth: Use __packed annotation for drivers 2010-07-21 10:39:13 -07:00
btmrvl_main.c Bluetooth: btmrvl: Remove empty destruct cb 2012-02-13 17:01:23 +02:00
btmrvl_sdio.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2011-12-09 14:07:12 -05:00
btmrvl_sdio.h Bluetooth: btmrvl: support Marvell Bluetooth device SD8787 2011-04-13 12:20:05 -03:00
btsdio.c Bluetooth: Support SDIO devices that are AMP controllers 2010-10-12 12:44:51 -03:00
btuart_cs.c Bluetooth: btuart-cs: Remove empty destruct cb 2012-02-13 17:01:23 +02:00
btusb.c Bluetooth: Don't mark non xfer isoc endpoint URBs with URB_ISO_ASAP 2012-02-13 17:01:20 +02:00
btwilink.c Bluetooth: btwilink: Remove empty destruct cb 2012-02-13 17:01:23 +02:00
dtl1_cs.c Bluetooth: dtl1-cs: Remove empty destruct cb 2012-02-13 17:01:23 +02:00
hci_ath.c Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_bcsp.c Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_h4.c Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_ldisc.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
hci_ll.c Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_uart.h Bluetooth: Support for Atheros AR300x serial chip 2010-07-21 10:39:14 -07:00
hci_vhci.c Bluetooth: vhci: Free driver_data on file release 2012-02-13 17:01:23 +02:00
Kconfig Bluetooth: btmrvl: support Marvell Bluetooth device SD8797 2011-11-21 13:52:31 -02:00
Makefile Bluetooth: btwilink driver 2011-02-23 14:39:10 -08:00