NFC: add NFC socket family

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Aloisio Almeida Jr
2011-07-01 19:31:35 -03:00
committed by John W. Linville
parent 4d12b8b129
commit c7fe3b52c1
7 changed files with 129 additions and 5 deletions

View File

@@ -432,8 +432,14 @@ static int __init nfc_init(void)
/* the first generation must not be 0 */
nfc_devlist_generation = 1;
rc = af_nfc_init();
if (rc)
goto err_af_nfc;
return 0;
err_af_nfc:
nfc_genl_exit();
err_genl:
class_unregister(&nfc_class);
return rc;
@@ -441,6 +447,7 @@ err_genl:
static void __exit nfc_exit(void)
{
af_nfc_exit();
nfc_genl_exit();
class_unregister(&nfc_class);
}