| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * -------------------------------------------------------------------- |
|---|
| 3 | 4 | * Driver for ST NFC Transceiver ST95HF |
|---|
| 4 | 5 | * -------------------------------------------------------------------- |
|---|
| 5 | 6 | * 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/>. |
|---|
| 18 | 7 | */ |
|---|
| 19 | 8 | |
|---|
| 20 | 9 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 327 | 316 | &echo_response); |
|---|
| 328 | 317 | if (result) { |
|---|
| 329 | 318 | 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); |
|---|
| 331 | 320 | return result; |
|---|
| 332 | 321 | } |
|---|
| 333 | 322 | |
|---|
| .. | .. |
|---|
| 672 | 661 | result = -ETIMEDOUT; |
|---|
| 673 | 662 | else |
|---|
| 674 | 663 | result = -EIO; |
|---|
| 675 | | - return result; |
|---|
| 664 | + return result; |
|---|
| 676 | 665 | } |
|---|
| 677 | 666 | |
|---|
| 678 | 667 | /* Check for CRC err only if CRC is present in the tag response */ |
|---|
| .. | .. |
|---|
| 781 | 770 | int result = 0; |
|---|
| 782 | 771 | int res_len; |
|---|
| 783 | 772 | static bool wtx; |
|---|
| 784 | | - struct device *dev; |
|---|
| 785 | 773 | struct device *spidevice; |
|---|
| 786 | | - struct nfc_digital_dev *nfcddev; |
|---|
| 787 | 774 | struct sk_buff *skb_resp; |
|---|
| 788 | 775 | struct st95hf_context *stcontext = |
|---|
| 789 | 776 | (struct st95hf_context *)st95hfcontext; |
|---|
| .. | .. |
|---|
| 828 | 815 | goto end; |
|---|
| 829 | 816 | } |
|---|
| 830 | 817 | |
|---|
| 831 | | - dev = &stcontext->nfcdev->dev; |
|---|
| 832 | | - nfcddev = stcontext->ddev; |
|---|
| 833 | 818 | if (skb_resp->data[2] == WTX_REQ_FROM_TAG) { |
|---|
| 834 | 819 | /* Request for new FWT from tag */ |
|---|
| 835 | 820 | result = st95hf_handle_wtx(stcontext, true, skb_resp->data[3]); |
|---|