mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
bf18c7118c
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> |
||
---|---|---|
.. | ||
ath3k.c | ||
bcm203x.c | ||
bfusb.c | ||
bluecard_cs.c | ||
bpa10x.c | ||
bt3c_cs.c | ||
btmrvl_debugfs.c | ||
btmrvl_drv.h | ||
btmrvl_main.c | ||
btmrvl_sdio.c | ||
btmrvl_sdio.h | ||
btsdio.c | ||
btuart_cs.c | ||
btusb.c | ||
btwilink.c | ||
dtl1_cs.c | ||
hci_ath.c | ||
hci_bcsp.c | ||
hci_h4.c | ||
hci_ldisc.c | ||
hci_ll.c | ||
hci_uart.h | ||
hci_vhci.c | ||
Kconfig | ||
Makefile |