--- zzzz-none-000/linux-3.10.107/drivers/nfc/microread/microread.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/nfc/microread/microread.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,11 +13,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program; if not, see . */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -554,13 +554,14 @@ kfree_skb(skb); if (r) - pr_err("Failed to handle discovered target err=%d", r); + pr_err("Failed to handle discovered target err=%d\n", r); } -static int microread_event_received(struct nfc_hci_dev *hdev, u8 gate, +static int microread_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event, struct sk_buff *skb) { int r; + u8 gate = hdev->pipes[pipe].gate; u8 mode; pr_info("Microread received event 0x%x to gate 0x%x\n", event, gate); @@ -658,13 +659,12 @@ { struct microread_info *info; unsigned long quirks = 0; - u32 protocols, se; + u32 protocols; struct nfc_hci_init_data init_data; int r; info = kzalloc(sizeof(struct microread_info), GFP_KERNEL); if (!info) { - pr_err("Cannot allocate memory for microread_info.\n"); r = -ENOMEM; goto err_info_alloc; } @@ -686,17 +686,15 @@ NFC_PROTO_ISO14443_B_MASK | NFC_PROTO_NFC_DEP_MASK; - se = NFC_SE_UICC | NFC_SE_EMBEDDED; - info->hdev = nfc_hci_allocate_device(µread_hci_ops, &init_data, - quirks, protocols, se, llc_name, + quirks, protocols, llc_name, phy_headroom + MICROREAD_CMDS_HEADROOM, phy_tailroom + MICROREAD_CMD_TAILROOM, phy_payload); if (!info->hdev) { - pr_err("Cannot allocate nfc hdev.\n"); + pr_err("Cannot allocate nfc hdev\n"); r = -ENOMEM; goto err_alloc_hdev; }