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>
This commit is contained in:
Родитель
36516268fd
Коммит
eae202aa20
|
@ -377,6 +377,9 @@ static int pn544_hci_open(struct nfc_shdlc *shdlc)
|
||||||
|
|
||||||
r = pn544_hci_enable(info, HCI_MODE);
|
r = pn544_hci_enable(info, HCI_MODE);
|
||||||
|
|
||||||
|
if (r == 0)
|
||||||
|
info->state = PN544_ST_READY;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&info->info_lock);
|
mutex_unlock(&info->info_lock);
|
||||||
return r;
|
return r;
|
||||||
|
@ -393,6 +396,8 @@ static void pn544_hci_close(struct nfc_shdlc *shdlc)
|
||||||
|
|
||||||
pn544_hci_disable(info);
|
pn544_hci_disable(info);
|
||||||
|
|
||||||
|
info->state = PN544_ST_COLD;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&info->info_lock);
|
mutex_unlock(&info->info_lock);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче