summaryrefslogtreecommitdiffstats
path: root/net/nfc/hci/llc.c
diff options
context:
space:
mode:
authorEric Lapuyade2012-09-13 17:11:37 +0200
committerSamuel Ortiz2012-09-25 00:17:25 +0200
commit4a61cd6687fc6348d08724676d34e38160d6cf9b (patch)
tree9bfcd0af9ad2e7c085c0542f2565467659823789 /net/nfc/hci/llc.c
parentNFC: Add a nop (passthrough) llc module to llc core (diff)
downloadkernel-qcow2-linux-4a61cd6687fc6348d08724676d34e38160d6cf9b.tar.gz
kernel-qcow2-linux-4a61cd6687fc6348d08724676d34e38160d6cf9b.tar.xz
kernel-qcow2-linux-4a61cd6687fc6348d08724676d34e38160d6cf9b.zip
NFC: Add an shdlc llc module to llc core
This is used by HCI drivers such as the one for the pn544 which require communications between HCI and the chip to use shdlc. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/hci/llc.c')
-rw-r--r--net/nfc/hci/llc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/net/nfc/hci/llc.c b/net/nfc/hci/llc.c
index 32002e5339c0..bd11b0f7658a 100644
--- a/net/nfc/hci/llc.c
+++ b/net/nfc/hci/llc.c
@@ -26,9 +26,23 @@ static struct list_head llc_engines;
int nfc_llc_init(void)
{
+ int r;
+
INIT_LIST_HEAD(&llc_engines);
- return nfc_llc_nop_register();
+ r = nfc_llc_nop_register();
+ if (r)
+ goto exit;
+
+ r = nfc_llc_shdlc_register();
+ if (r)
+ goto exit;
+
+ return 0;
+
+exit:
+ nfc_llc_exit();
+ return r;
}
EXPORT_SYMBOL(nfc_llc_init);