From: Eric Lapuyade Date: Wed, 30 May 2012 16:13:06 +0000 (+0200) Subject: NFC: update PN544 HCI driver state when opened/closed X-Git-Tag: upstream/snapshot3+hdmi~6997^2~57^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eae202aa2083eb6f7fdb686e2c42d7db4ef63632;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git NFC: update PN544 HCI driver state when opened/closed Signed-off-by: Eric Lapuyade Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/pn544_hci.c b/drivers/nfc/pn544_hci.c index 457eac3..69df6fe 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) r = pn544_hci_enable(info, HCI_MODE); + if (r == 0) + info->state = PN544_ST_READY; + out: mutex_unlock(&info->info_lock); return r; @@ -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); }