diff options
author | Eric Lapuyade <eric.lapuyade@intel.com> | 2012-05-30 12:13:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:42:12 -0400 |
commit | eae202aa2083eb6f7fdb686e2c42d7db4ef63632 (patch) | |
tree | 436b6259204a196d36ae31d78ce2ebfc89d95f3a /drivers/nfc | |
parent | 36516268fd372294f5f4f26e0538ee70a1b5b9e7 (diff) |
NFC: update PN544 HCI driver state when opened/closed
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn544_hci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nfc/pn544_hci.c b/drivers/nfc/pn544_hci.c index 457eac35dc74..69df6fecb847 100644 --- a/drivers/nfc/pn544_hci.c +++ b/drivers/nfc/pn544_hci.c | |||
@@ -377,6 +377,9 @@ static int pn544_hci_open(struct nfc_shdlc *shdlc) | |||
377 | 377 | ||
378 | r = pn544_hci_enable(info, HCI_MODE); | 378 | r = pn544_hci_enable(info, HCI_MODE); |
379 | 379 | ||
380 | if (r == 0) | ||
381 | info->state = PN544_ST_READY; | ||
382 | |||
380 | out: | 383 | out: |
381 | mutex_unlock(&info->info_lock); | 384 | mutex_unlock(&info->info_lock); |
382 | return r; | 385 | return r; |
@@ -393,6 +396,8 @@ static void pn544_hci_close(struct nfc_shdlc *shdlc) | |||
393 | 396 | ||
394 | pn544_hci_disable(info); | 397 | pn544_hci_disable(info); |
395 | 398 | ||
399 | info->state = PN544_ST_COLD; | ||
400 | |||
396 | out: | 401 | out: |
397 | mutex_unlock(&info->info_lock); | 402 | mutex_unlock(&info->info_lock); |
398 | } | 403 | } |