hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/nfc/st95hf/core.c
....@@ -1,20 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * --------------------------------------------------------------------
34 * Driver for ST NFC Transceiver ST95HF
45 * --------------------------------------------------------------------
56 * Copyright (C) 2015 STMicroelectronics Pvt. Ltd. All rights reserved.
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms and conditions of the GNU General Public License,
9
- * version 2, as published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
187 */
198
209 #include <linux/err.h>
....@@ -327,7 +316,7 @@
327316 &echo_response);
328317 if (result) {
329318 dev_err(&st95context->spicontext.spidev->dev,
330
- "err: echo response receieve error = 0x%x\n", result);
319
+ "err: echo response receive error = 0x%x\n", result);
331320 return result;
332321 }
333322
....@@ -672,7 +661,7 @@
672661 result = -ETIMEDOUT;
673662 else
674663 result = -EIO;
675
- return result;
664
+ return result;
676665 }
677666
678667 /* Check for CRC err only if CRC is present in the tag response */
....@@ -781,9 +770,7 @@
781770 int result = 0;
782771 int res_len;
783772 static bool wtx;
784
- struct device *dev;
785773 struct device *spidevice;
786
- struct nfc_digital_dev *nfcddev;
787774 struct sk_buff *skb_resp;
788775 struct st95hf_context *stcontext =
789776 (struct st95hf_context *)st95hfcontext;
....@@ -828,8 +815,6 @@
828815 goto end;
829816 }
830817
831
- dev = &stcontext->nfcdev->dev;
832
- nfcddev = stcontext->ddev;
833818 if (skb_resp->data[2] == WTX_REQ_FROM_TAG) {
834819 /* Request for new FWT from tag */
835820 result = st95hf_handle_wtx(stcontext, true, skb_resp->data[3]);