Re: [PATCH 1/5] Bluetooth: Remove obsolete hci-destruct callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

> The destruct-callback is used by *all* drivers to remove their platform
> data only. However, all drivers call hci_unregister_dev() before this
> callback is executed. Therefore, there is no reason to keep platform
> data alive after the driver was unregistered. Hence, we can free platform data
> directly and then remove the hci-destruct callback entirely.
> 
> Some drivers already depend on this behaviour, since they erroneously
> already free the data after calling hci_free_dev(). This patch makes all
> drivers behave that way and removes the callback entirely.

it is important to not end up with a race condition between sysfs and
hci_dev here. For example a cat /sys/class/bluetooth/hci0/name could
still have sysfs file open and we need to keep the memory around until
it gets destructed.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux