summaryrefslogtreecommitdiff
path: root/net/nfc/core.c
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@openbossa.org>2011-07-01 19:31:36 -0300
committerJohn W. Linville <linville@tuxdriver.com>2011-07-05 15:26:58 -0400
commit23b7869c0fd08d73c9f83a2db88a13312d6198bb (patch)
treebc14ecbeac8998fddf48a52709c65ca5cdbbf6b0 /net/nfc/core.c
parentc7fe3b52c1283b8ba810eb6ecddf1c8a0bcc13ab (diff)
NFC: add the NFC socket raw protocol
This socket protocol is used to perform data exchange with NFC targets. Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/core.c')
-rw-r--r--net/nfc/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index e804dc50f42..b6fd4e1f205 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -432,6 +432,10 @@ static int __init nfc_init(void)
/* the first generation must not be 0 */
nfc_devlist_generation = 1;
+ rc = rawsock_init();
+ if (rc)
+ goto err_rawsock;
+
rc = af_nfc_init();
if (rc)
goto err_af_nfc;
@@ -439,6 +443,8 @@ static int __init nfc_init(void)
return 0;
err_af_nfc:
+ rawsock_exit();
+err_rawsock:
nfc_genl_exit();
err_genl:
class_unregister(&nfc_class);
@@ -448,6 +454,7 @@ err_genl:
static void __exit nfc_exit(void)
{
af_nfc_exit();
+ rawsock_exit();
nfc_genl_exit();
class_unregister(&nfc_class);
}