* [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code
@ 2017-03-07 10:13 Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro Andy Shevchenko
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:13 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
We return -ENODEV if ACPI provides a GPIO resource. Looks really wrong.
If it has even been tested?
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 5a82f553906c..737384d287aa 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -514,9 +514,9 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
/* Get EN GPIO from ACPI */
gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 1,
GPIOD_OUT_LOW);
- if (!IS_ERR(gpiod_ena)) {
+ if (IS_ERR(gpiod_ena)) {
nfc_err(dev, "Unable to get ENABLE GPIO\n");
- return -ENODEV;
+ return PTR_ERR(gpiod_ena);
}
phy->gpio_ena = desc_to_gpio(gpiod_ena);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
@ 2017-03-07 10:13 ` Andy Shevchenko
2017-03-07 10:19 ` Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 3/6] NFC: st21nfca: Get rid of platform data Andy Shevchenko
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:13 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
Seems this driver has never been even compile tested.
Fix obvious typo in macro to make it defined.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 737384d287aa..7f68a5fe15d8 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -286,7 +286,7 @@ static int check_crc(u8 *buf, int buflen)
crc = ~crc;
if (buf[buflen - 2] != (crc & 0xff) || buf[buflen - 1] != (crc >> 8)) {
- pr_err(ST21NFCA_HCI_DRIVER_NAME
+ pr_err(ST21NFCA_HCI_I2C_DRIVER_NAME
": CRC error 0x%x != 0x%x 0x%x\n", crc, buf[buflen - 1],
buf[buflen - 2]);
@@ -672,7 +672,7 @@ static int st21nfca_hci_i2c_probe(struct i2c_client *client,
r = devm_request_threaded_irq(&client->dev, client->irq, NULL,
st21nfca_hci_irq_thread_fn,
phy->irq_polarity | IRQF_ONESHOT,
- ST21NFCA_HCI_DRIVER_NAME, phy);
+ ST21NFCA_HCI_I2C_DRIVER_NAME, phy);
if (r < 0) {
nfc_err(&client->dev, "Unable to register IRQ handler\n");
return r;
@@ -701,7 +701,7 @@ static int st21nfca_hci_i2c_remove(struct i2c_client *client)
}
static struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
- {ST21NFCA_HCI_DRIVER_NAME, 0},
+ {ST21NFCA_HCI_I2C_DRIVER_NAME, 0},
{}
};
MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 3/6] NFC: st21nfca: Get rid of platform data
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro Andy Shevchenko
@ 2017-03-07 10:13 ` Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 4/6] NFC: st21nfca: Get rid of "interesting" use of interrupt polarity Andy Shevchenko
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:13 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
Legacy platform data must go away. We are on the safe side here since
there are no users of it in the kernel.
If anyone by any odd reason needs it the GPIO lookup tables and
built-in device properties at your service.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 45 ++--------------------------------
include/linux/platform_data/st21nfca.h | 33 -------------------------
2 files changed, 2 insertions(+), 76 deletions(-)
delete mode 100644 include/linux/platform_data/st21nfca.h
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 7f68a5fe15d8..d9ed6a279283 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -20,7 +20,6 @@
#include <linux/crc-ccitt.h>
#include <linux/module.h>
#include <linux/i2c.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/of_irq.h>
#include <linux/of_gpio.h>
@@ -30,7 +29,7 @@
#include <linux/delay.h>
#include <linux/nfc.h>
#include <linux/firmware.h>
-#include <linux/platform_data/st21nfca.h>
+
#include <asm/unaligned.h>
#include <net/nfc/hci.h>
@@ -577,43 +576,10 @@ static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
return 0;
}
-static int st21nfca_hci_i2c_request_resources(struct i2c_client *client)
-{
- struct st21nfca_nfc_platform_data *pdata;
- struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
- int r;
-
- pdata = client->dev.platform_data;
- if (pdata == NULL) {
- nfc_err(&client->dev, "No platform data\n");
- return -EINVAL;
- }
-
- /* store for later use */
- phy->gpio_ena = pdata->gpio_ena;
- phy->irq_polarity = pdata->irq_polarity;
-
- if (phy->gpio_ena > 0) {
- r = devm_gpio_request_one(&client->dev, phy->gpio_ena,
- GPIOF_OUT_INIT_HIGH,
- ST21NFCA_GPIO_NAME_EN);
- if (r) {
- pr_err("%s : ena gpio_request failed\n", __FILE__);
- return r;
- }
- }
-
- phy->se_status.is_ese_present = pdata->is_ese_present;
- phy->se_status.is_uicc_present = pdata->is_uicc_present;
-
- return 0;
-}
-
static int st21nfca_hci_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct st21nfca_i2c_phy *phy;
- struct st21nfca_nfc_platform_data *pdata;
int r;
dev_dbg(&client->dev, "%s\n", __func__);
@@ -639,19 +605,12 @@ static int st21nfca_hci_i2c_probe(struct i2c_client *client,
mutex_init(&phy->phy_lock);
i2c_set_clientdata(client, phy);
- pdata = client->dev.platform_data;
- if (!pdata && client->dev.of_node) {
+ if (client->dev.of_node) {
r = st21nfca_hci_i2c_of_request_resources(client);
if (r) {
nfc_err(&client->dev, "No platform data\n");
return r;
}
- } else if (pdata) {
- r = st21nfca_hci_i2c_request_resources(client);
- if (r) {
- nfc_err(&client->dev, "Cannot get platform resources\n");
- return r;
- }
} else if (ACPI_HANDLE(&client->dev)) {
r = st21nfca_hci_i2c_acpi_request_resources(client);
if (r) {
diff --git a/include/linux/platform_data/st21nfca.h b/include/linux/platform_data/st21nfca.h
deleted file mode 100644
index cc2bdafb0c69..000000000000
--- a/include/linux/platform_data/st21nfca.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Driver include for the ST21NFCA NFC chip.
- *
- * Copyright (C) 2014 STMicroelectronics SAS. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * 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, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _ST21NFCA_HCI_H_
-#define _ST21NFCA_HCI_H_
-
-#include <linux/i2c.h>
-
-#define ST21NFCA_HCI_DRIVER_NAME "st21nfca_hci"
-
-struct st21nfca_nfc_platform_data {
- unsigned int gpio_ena;
- unsigned int irq_polarity;
- bool is_ese_present;
- bool is_uicc_present;
-};
-
-#endif /* _ST21NFCA_HCI_H_ */
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 4/6] NFC: st21nfca: Get rid of "interesting" use of interrupt polarity
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 3/6] NFC: st21nfca: Get rid of platform data Andy Shevchenko
@ 2017-03-07 10:13 ` Andy Shevchenko
2017-03-07 10:14 ` [PATCH v1 5/6] NFC: st21nfca: Covert to use GPIO descriptor Andy Shevchenko
2017-03-07 10:14 ` [PATCH v1 6/6] NFC: st21nfca: Use unified device property API meaningfully Andy Shevchenko
4 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:13 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
I2C framework followed by IRQ framework does set interrupt polarity
correctly if it's properly specified in firmware (ACPI or DT).
Get rid of the redundant trick when requesting interrupt.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index d9ed6a279283..c98199c2b8a0 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -68,7 +68,6 @@ struct st21nfca_i2c_phy {
struct nfc_hci_dev *hdev;
unsigned int gpio_ena;
- unsigned int irq_polarity;
struct st21nfca_se_status se_status;
@@ -520,8 +519,6 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
phy->gpio_ena = desc_to_gpio(gpiod_ena);
- phy->irq_polarity = irq_get_trigger_type(client->irq);
-
phy->se_status.is_ese_present = false;
phy->se_status.is_uicc_present = false;
@@ -566,8 +563,6 @@ static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
phy->gpio_ena = gpio;
- phy->irq_polarity = irq_get_trigger_type(client->irq);
-
phy->se_status.is_ese_present =
of_property_read_bool(pp, "ese-present");
phy->se_status.is_uicc_present =
@@ -630,7 +625,7 @@ static int st21nfca_hci_i2c_probe(struct i2c_client *client,
r = devm_request_threaded_irq(&client->dev, client->irq, NULL,
st21nfca_hci_irq_thread_fn,
- phy->irq_polarity | IRQF_ONESHOT,
+ IRQF_ONESHOT,
ST21NFCA_HCI_I2C_DRIVER_NAME, phy);
if (r < 0) {
nfc_err(&client->dev, "Unable to register IRQ handler\n");
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 5/6] NFC: st21nfca: Covert to use GPIO descriptor
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
` (2 preceding siblings ...)
2017-03-07 10:13 ` [PATCH v1 4/6] NFC: st21nfca: Get rid of "interesting" use of interrupt polarity Andy Shevchenko
@ 2017-03-07 10:14 ` Andy Shevchenko
2017-03-07 10:14 ` [PATCH v1 6/6] NFC: st21nfca: Use unified device property API meaningfully Andy Shevchenko
4 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:14 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
Since we got rid of platform data, the driver may use GPIO descriptor
directly.
Looking deeply to the use of the GPIO pin it looks like it should be
a fixed voltage regulator rather than custom GPIO handling. But this
is out of scope of the change.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 40 +++++++++++++---------------------------
1 file changed, 13 insertions(+), 27 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index c98199c2b8a0..429ecdfd6e37 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -67,8 +67,7 @@ struct st21nfca_i2c_phy {
struct i2c_client *i2c_dev;
struct nfc_hci_dev *hdev;
- unsigned int gpio_ena;
-
+ struct gpio_desc *gpiod_ena;
struct st21nfca_se_status se_status;
struct sk_buff *pending_skb;
@@ -149,7 +148,7 @@ static int st21nfca_hci_i2c_enable(void *phy_id)
{
struct st21nfca_i2c_phy *phy = phy_id;
- gpio_set_value(phy->gpio_ena, 1);
+ gpiod_set_value(phy->gpiod_ena, 1);
phy->powered = 1;
phy->run_mode = ST21NFCA_HCI_MODE;
@@ -162,7 +161,7 @@ static void st21nfca_hci_i2c_disable(void *phy_id)
{
struct st21nfca_i2c_phy *phy = phy_id;
- gpio_set_value(phy->gpio_ena, 0);
+ gpiod_set_value(phy->gpiod_ena, 0);
phy->powered = 0;
}
@@ -505,20 +504,17 @@ static struct nfc_phy_ops i2c_phy_ops = {
static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
{
struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
- struct gpio_desc *gpiod_ena;
struct device *dev = &client->dev;
u8 tmp;
/* Get EN GPIO from ACPI */
- gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 1,
- GPIOD_OUT_LOW);
- if (IS_ERR(gpiod_ena)) {
+ phy->gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 1,
+ GPIOD_OUT_LOW);
+ if (IS_ERR(phy->gpiod_ena)) {
nfc_err(dev, "Unable to get ENABLE GPIO\n");
- return PTR_ERR(gpiod_ena);
+ return PTR_ERR(phy->gpiod_ena);
}
- phy->gpio_ena = desc_to_gpio(gpiod_ena);
-
phy->se_status.is_ese_present = false;
phy->se_status.is_uicc_present = false;
@@ -538,31 +534,21 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
{
struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
+ struct device *dev = &client->dev;
struct device_node *pp;
- int gpio;
- int r;
pp = client->dev.of_node;
if (!pp)
return -ENODEV;
/* Get GPIO from device tree */
- gpio = of_get_named_gpio(pp, "enable-gpios", 0);
- if (gpio < 0) {
- nfc_err(&client->dev, "Failed to retrieve enable-gpios from device tree\n");
- return gpio;
+ phy->gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 0,
+ GPIOD_OUT_HIGH);
+ if (IS_ERR(phy->gpiod_ena)) {
+ nfc_err(dev, "Failed to request enable pin\n");
+ return PTR_ERR(phy->gpiod_ena);
}
- /* GPIO request and configuration */
- r = devm_gpio_request_one(&client->dev, gpio, GPIOF_OUT_INIT_HIGH,
- ST21NFCA_GPIO_NAME_EN);
- if (r) {
- nfc_err(&client->dev, "Failed to request enable pin\n");
- return r;
- }
-
- phy->gpio_ena = gpio;
-
phy->se_status.is_ese_present =
of_property_read_bool(pp, "ese-present");
phy->se_status.is_uicc_present =
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 6/6] NFC: st21nfca: Use unified device property API meaningfully
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
` (3 preceding siblings ...)
2017-03-07 10:14 ` [PATCH v1 5/6] NFC: st21nfca: Covert to use GPIO descriptor Andy Shevchenko
@ 2017-03-07 10:14 ` Andy Shevchenko
4 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:14 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
Cc: Andy Shevchenko
Another place in the code that unveils non-tested at all ACPI case.
Use unified device property API in meaningful way.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/nfc/st21nfca/i2c.c | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 429ecdfd6e37..9a31d3cec92b 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -505,7 +505,6 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
{
struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
struct device *dev = &client->dev;
- u8 tmp;
/* Get EN GPIO from ACPI */
phy->gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 1,
@@ -515,19 +514,6 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
return PTR_ERR(phy->gpiod_ena);
}
- phy->se_status.is_ese_present = false;
- phy->se_status.is_uicc_present = false;
-
- if (device_property_present(dev, "ese-present")) {
- device_property_read_u8(dev, "ese-present", &tmp);
- phy->se_status.is_ese_present = tmp;
- }
-
- if (device_property_present(dev, "uicc-present")) {
- device_property_read_u8(dev, "uicc-present", &tmp);
- phy->se_status.is_uicc_present = tmp;
- }
-
return 0;
}
@@ -535,11 +521,6 @@ static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
{
struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
struct device *dev = &client->dev;
- struct device_node *pp;
-
- pp = client->dev.of_node;
- if (!pp)
- return -ENODEV;
/* Get GPIO from device tree */
phy->gpiod_ena = devm_gpiod_get_index(dev, ST21NFCA_GPIO_NAME_EN, 0,
@@ -549,11 +530,6 @@ static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
return PTR_ERR(phy->gpiod_ena);
}
- phy->se_status.is_ese_present =
- of_property_read_bool(pp, "ese-present");
- phy->se_status.is_uicc_present =
- of_property_read_bool(pp, "uicc-present");
-
return 0;
}
@@ -603,6 +579,11 @@ static int st21nfca_hci_i2c_probe(struct i2c_client *client,
return -ENODEV;
}
+ phy->se_status.is_ese_present =
+ device_property_read_bool(&client->dev, "ese-present");
+ phy->se_status.is_uicc_present =
+ device_property_read_bool(&client->dev, "uicc-present");
+
r = st21nfca_hci_platform_init(phy);
if (r < 0) {
nfc_err(&client->dev, "Unable to reboot st21nfca\n");
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro
2017-03-07 10:13 ` [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro Andy Shevchenko
@ 2017-03-07 10:19 ` Andy Shevchenko
0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-03-07 10:19 UTC (permalink / raw)
To: Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
linux-wireless, Christophe Ricard
On Tue, 2017-03-07 at 12:13 +0200, Andy Shevchenko wrote:
> Seems this driver has never been even compile tested.
>
> Fix obvious typo in macro to make it defined.
Ah, now I got it. It's defined in removed platform data file :-(.
I will fix this in v2.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/nfc/st21nfca/i2c.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
> index 737384d287aa..7f68a5fe15d8 100644
> --- a/drivers/nfc/st21nfca/i2c.c
> +++ b/drivers/nfc/st21nfca/i2c.c
> @@ -286,7 +286,7 @@ static int check_crc(u8 *buf, int buflen)
> crc = ~crc;
>
> if (buf[buflen - 2] != (crc & 0xff) || buf[buflen - 1] !=
> (crc >> 8)) {
> - pr_err(ST21NFCA_HCI_DRIVER_NAME
> + pr_err(ST21NFCA_HCI_I2C_DRIVER_NAME
> ": CRC error 0x%x != 0x%x 0x%x\n", crc,
> buf[buflen - 1],
> buf[buflen - 2]);
>
> @@ -672,7 +672,7 @@ static int st21nfca_hci_i2c_probe(struct
> i2c_client *client,
> r = devm_request_threaded_irq(&client->dev, client->irq,
> NULL,
> st21nfca_hci_irq_thread_fn,
> phy->irq_polarity | IRQF_ONESHOT,
> - ST21NFCA_HCI_DRIVER_NAME, phy);
> + ST21NFCA_HCI_I2C_DRIVER_NAME, phy);
> if (r < 0) {
> nfc_err(&client->dev, "Unable to register IRQ
> handler\n");
> return r;
> @@ -701,7 +701,7 @@ static int st21nfca_hci_i2c_remove(struct
> i2c_client *client)
> }
>
> static struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
> - {ST21NFCA_HCI_DRIVER_NAME, 0},
> + {ST21NFCA_HCI_I2C_DRIVER_NAME, 0},
> {}
> };
> MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table);
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-07 10:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 10:13 [PATCH v1 1/6] NFC: st21nfca: Fix obvious typo when check error code Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 2/6] NFC: st21nfca: Fix typo in copy pasted macro Andy Shevchenko
2017-03-07 10:19 ` Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 3/6] NFC: st21nfca: Get rid of platform data Andy Shevchenko
2017-03-07 10:13 ` [PATCH v1 4/6] NFC: st21nfca: Get rid of "interesting" use of interrupt polarity Andy Shevchenko
2017-03-07 10:14 ` [PATCH v1 5/6] NFC: st21nfca: Covert to use GPIO descriptor Andy Shevchenko
2017-03-07 10:14 ` [PATCH v1 6/6] NFC: st21nfca: Use unified device property API meaningfully Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).