NFC: Fixed nfc core and hci unregistration and cleanup
When an adapter is removed, it will unregister itself from hci and/or nfc core. In order to do that safely, work tasks must first be canceled and prevented to be scheduled again, before the hci or nfc device can be destroyed. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:

committed by
Samuel Ortiz

parent
5f4d6214ef
commit
f0c9103813
@@ -87,6 +87,8 @@ struct nfc_hci_dev {
|
||||
|
||||
u32 max_data_link_payload;
|
||||
|
||||
bool shutting_down;
|
||||
|
||||
struct mutex msg_tx_mutex;
|
||||
|
||||
struct list_head msg_tx_queue;
|
||||
|
@@ -115,6 +115,8 @@ struct nfc_dev {
|
||||
struct timer_list check_pres_timer;
|
||||
struct work_struct check_pres_work;
|
||||
|
||||
bool shutting_down;
|
||||
|
||||
struct nfc_ops *ops;
|
||||
};
|
||||
#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev)
|
||||
|
Reference in New Issue
Block a user