Skip to content

Commit

Permalink
NFC: update PN544 HCI driver state when opened/closed
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Eric Lapuyade authored and John W. Linville committed Jul 9, 2012
1 parent 3651626 commit eae202a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/nfc/pn544_hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ static int pn544_hci_open(struct nfc_shdlc *shdlc)

r = pn544_hci_enable(info, HCI_MODE);

if (r == 0)
info->state = PN544_ST_READY;

out:
mutex_unlock(&info->info_lock);
return r;
Expand All @@ -393,6 +396,8 @@ static void pn544_hci_close(struct nfc_shdlc *shdlc)

pn544_hci_disable(info);

info->state = PN544_ST_COLD;

out:
mutex_unlock(&info->info_lock);
}
Expand Down

0 comments on commit eae202a

Please sign in to comment.