diff options
| author | Eric Lapuyade <eric.lapuyade@linux.intel.com> | 2012-11-26 12:06:27 -0500 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:51:48 -0500 |
| commit | f0c9103813b3045bd5b43220b6a78c9908a45d24 (patch) | |
| tree | 78422096c0728f84a43c057bcf6ffa185bd13190 /include/net/nfc | |
| parent | 5f4d6214ef5e9b1ff6a72ddfa387c1d72adfac98 (diff) | |
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>
Diffstat (limited to 'include/net/nfc')
| -rw-r--r-- | include/net/nfc/hci.h | 2 | ||||
| -rw-r--r-- | include/net/nfc/nfc.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index 671953e11575..e6224571e5e6 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
| @@ -87,6 +87,8 @@ struct nfc_hci_dev { | |||
| 87 | 87 | ||
| 88 | u32 max_data_link_payload; | 88 | u32 max_data_link_payload; |
| 89 | 89 | ||
| 90 | bool shutting_down; | ||
| 91 | |||
| 90 | struct mutex msg_tx_mutex; | 92 | struct mutex msg_tx_mutex; |
| 91 | 93 | ||
| 92 | struct list_head msg_tx_queue; | 94 | struct list_head msg_tx_queue; |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index fce80b2f9be7..1665674e86b2 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
| @@ -115,6 +115,8 @@ struct nfc_dev { | |||
| 115 | struct timer_list check_pres_timer; | 115 | struct timer_list check_pres_timer; |
| 116 | struct work_struct check_pres_work; | 116 | struct work_struct check_pres_work; |
| 117 | 117 | ||
| 118 | bool shutting_down; | ||
| 119 | |||
| 118 | struct nfc_ops *ops; | 120 | struct nfc_ops *ops; |
| 119 | }; | 121 | }; |
| 120 | #define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev) | 122 | #define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev) |
