Hi Marcel On Thu, Dec 29, 2011 at 7:04 PM, David Herrmann <dh.herrmann@xxxxxxxxxxxxxx> wrote: > On Thu, Dec 29, 2011 at 6:48 PM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: >> 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. I will resend this as sequential patches which thorough explanations so it might be more clear why this callback is obsolete. Cheers David -- 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