Skip to content

Commit eae202a

Browse files
Eric Lapuyadelinvjw
authored andcommitted
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>
1 parent 3651626 commit eae202a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/nfc/pn544_hci.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ static int pn544_hci_open(struct nfc_shdlc *shdlc)
377377

378378
r = pn544_hci_enable(info, HCI_MODE);
379379

380+
if (r == 0)
381+
info->state = PN544_ST_READY;
382+
380383
out:
381384
mutex_unlock(&info->info_lock);
382385
return r;
@@ -393,6 +396,8 @@ static void pn544_hci_close(struct nfc_shdlc *shdlc)
393396

394397
pn544_hci_disable(info);
395398

399+
info->state = PN544_ST_COLD;
400+
396401
out:
397402
mutex_unlock(&info->info_lock);
398403
}

0 commit comments

Comments
 (0)