History

Merge tag 'nfc-next-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

Samuel Ortiz says: ==================== NFC 4.6 pull request This is a very small one this time, with only 5 patches. There are a couple of big items that could not be merged/finished on time. We have: - 2 LLCP fixes for a race and a potential OOM. - 2 cleanups for the pn544 and microread drivers. - 1 Maintainer addition for the s3fwrn5 driver. ====================

David S. Miller committed 10 years ago

Commit f4fa6e62 parents 0109988 079c2656 files · +10 −59Browse files

Unified · Split

6 files
  1. MAINTAINERS +1 −1
  2. drivers/nfc/microread/i2c.c +0 −8
  3. drivers/nfc/pn544/i2c.c +1 −13
  4. include/linux/platform_data/microread.h +0 −35
  5. net/nfc/llcp_commands.c +2 −2
  6. net/nfc/llcp_sock.c +6 −0
MAINTAINERS+1−1
@@ -7666,7 +7666,6 @@ F: net/nfc/ · 7665 unmodified lines
7666F: include/net/nfc/7666F: include/net/nfc/
7667F: include/uapi/linux/nfc.h7667F: include/uapi/linux/nfc.h
7668F: drivers/nfc/7668F: drivers/nfc/
7669F: include/linux/platform_data/microread.h
7670F: include/linux/platform_data/nfcmrvl.h7669F: include/linux/platform_data/nfcmrvl.h
7671F: include/linux/platform_data/nxp-nci.h7670F: include/linux/platform_data/nxp-nci.h
7672F: include/linux/platform_data/pn544.h7671F: include/linux/platform_data/pn544.h
@@ -9509,6 +9508,7 @@ F: drivers/media/i2c/s5k5baf.c · 1836 unmodified lines
9509 9508
9510SAMSUNG S3FWRN5 NFC DRIVER9509SAMSUNG S3FWRN5 NFC DRIVER
9511M: Robert Baldyga <r.baldyga@samsung.com>9510M: Robert Baldyga <r.baldyga@samsung.com>
9511M: Krzysztof Opasiak <k.opasiak@samsung.com>
9512L: linux-nfc@lists.01.org (moderated for non-subscribers)9512L: linux-nfc@lists.01.org (moderated for non-subscribers)
9513S: Supported9513S: Supported
9514F: drivers/nfc/s3fwrn59514F: drivers/nfc/s3fwrn5
drivers/nfc/microread/i2c.c+0−8
@@ -246,18 +246,10 @@ static int microread_i2c_probe(struct i2c_client *client, · 245 unmodified lines
246 const struct i2c_device_id *id)246 const struct i2c_device_id *id)
247{247{
248 struct microread_i2c_phy *phy;248 struct microread_i2c_phy *phy;
249 struct microread_nfc_platform_data *pdata =
250 dev_get_platdata(&client->dev);
251 int r;249 int r;
252 250
253 dev_dbg(&client->dev, "client %p\n", client);251 dev_dbg(&client->dev, "client %p\n", client);
254 252
255 if (!pdata) {
256 nfc_err(&client->dev, "client %p: missing platform data\n",
257 client);
258 return -EINVAL;
259 }
260
261 phy = devm_kzalloc(&client->dev, sizeof(struct microread_i2c_phy),253 phy = devm_kzalloc(&client->dev, sizeof(struct microread_i2c_phy),
262 GFP_KERNEL);254 GFP_KERNEL);
263 if (!phy)255 if (!phy)
drivers/nfc/pn544/i2c.c+1−13
@@ -877,20 +877,8 @@ exit_state_wait_secure_write_answer: · 876 unmodified lines
877static int pn544_hci_i2c_acpi_request_resources(struct i2c_client *client)877static int pn544_hci_i2c_acpi_request_resources(struct i2c_client *client)
878{878{
879 struct pn544_i2c_phy *phy = i2c_get_clientdata(client);879 struct pn544_i2c_phy *phy = i2c_get_clientdata(client);
880 const struct acpi_device_id *id;
881 struct gpio_desc *gpiod_en, *gpiod_fw;880 struct gpio_desc *gpiod_en, *gpiod_fw;
882 struct device *dev;881 struct device *dev = &client->dev;
883
884 if (!client)
885 return -EINVAL;
886
887 dev = &client->dev;
888
889 /* Match the struct device against a given list of ACPI IDs */
890 id = acpi_match_device(dev->driver->acpi_match_table, dev);
891
892 if (!id)
893 return -ENODEV;
894 882
895 /* Get EN GPIO from ACPI */883 /* Get EN GPIO from ACPI */
896 gpiod_en = devm_gpiod_get_index(dev, PN544_GPIO_NAME_EN, 1,884 gpiod_en = devm_gpiod_get_index(dev, PN544_GPIO_NAME_EN, 1,
include/linux/platform_data/microread.h+0−35
@@ -1,35 +0,0 @@
1/*
2 * Driver include for the Inside Secure microread NFC Chip.
3 *
4 * Copyright (C) 2011 Tieto Poland
5 * Copyright (C) 2012 Intel Corporation. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms 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, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _MICROREAD_H
22#define _MICROREAD_H
23
24#include <linux/i2c.h>
25
26#define MICROREAD_DRIVER_NAME "microread"
27
28/* board config platform data for microread */
29struct microread_nfc_platform_data {
30 unsigned int rst_gpio;
31 unsigned int irq_gpio;
32 unsigned int ioh_gpio;
33};
34
35#endif /* _MICROREAD_H */
net/nfc/llcp_commands.c+2−2
@@ -663,7 +663,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock, · 662 unmodified lines
663 return -ENOBUFS;663 return -ENOBUFS;
664 }664 }
665 665
666 msg_data = kzalloc(len, GFP_KERNEL);666 msg_data = kmalloc(len, GFP_USER | __GFP_NOWARN);
667 if (msg_data == NULL)667 if (msg_data == NULL)
668 return -ENOMEM;668 return -ENOMEM;
669 669
@@ -729,7 +729,7 @@ int nfc_llcp_send_ui_frame(struct nfc_llcp_sock *sock, u8 ssap, u8 dsap, · 59 unmodified lines
729 if (local == NULL)729 if (local == NULL)
730 return -ENODEV;730 return -ENODEV;
731 731
732 msg_data = kzalloc(len, GFP_KERNEL);732 msg_data = kmalloc(len, GFP_USER | __GFP_NOWARN);
733 if (msg_data == NULL)733 if (msg_data == NULL)
734 return -ENOMEM;734 return -ENOMEM;
735 735
net/nfc/llcp_sock.c+6−0
@@ -509,6 +509,11 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr, · 508 unmodified lines
509 memset(llcp_addr, 0, sizeof(*llcp_addr));509 memset(llcp_addr, 0, sizeof(*llcp_addr));
510 *len = sizeof(struct sockaddr_nfc_llcp);510 *len = sizeof(struct sockaddr_nfc_llcp);
511 511
512 lock_sock(sk);
513 if (!llcp_sock->dev) {
514 release_sock(sk);
515 return -EBADFD;
516 }
512 llcp_addr->sa_family = AF_NFC;517 llcp_addr->sa_family = AF_NFC;
513 llcp_addr->dev_idx = llcp_sock->dev->idx;518 llcp_addr->dev_idx = llcp_sock->dev->idx;
514 llcp_addr->target_idx = llcp_sock->target_idx;519 llcp_addr->target_idx = llcp_sock->target_idx;
@@ -518,6 +523,7 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr, · 3 unmodified lines
518 llcp_addr->service_name_len = llcp_sock->service_name_len;523 llcp_addr->service_name_len = llcp_sock->service_name_len;
519 memcpy(llcp_addr->service_name, llcp_sock->service_name,524 memcpy(llcp_addr->service_name, llcp_sock->service_name,
520 llcp_addr->service_name_len);525 llcp_addr->service_name_len);
526 release_sock(sk);
521 527
522 return 0;528 return 0;
523}529}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t