All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/3] nfc: s3fwrn5: use signed integer for parsing GPIO numbers
@ 2020-11-26 15:33 ` bongsu.jeon2
  0 siblings, 0 replies; 28+ messages in thread
From: bongsu.jeon2 @ 2020-11-26 15:33 UTC (permalink / raw)
  To: krzk, k.opasiak; +Cc: linux-nfc, netdev, linux-kernel, stable

From: Krzysztof Kozlowski <krzk@kernel.org>

GPIOs - as returned by of_get_named_gpio() and used by the gpiolib - are
signed integers, where negative number indicates error.  The return
value of of_get_named_gpio() should not be assigned to an unsigned int
because in case of !CONFIG_GPIOLIB such number would be a valid GPIO.

Fixes: c04c674fadeb ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/nfc/s3fwrn5/i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 0ffa389..ae26594 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -25,8 +25,8 @@ struct s3fwrn5_i2c_phy {
 	struct i2c_client *i2c_dev;
 	struct nci_dev *ndev;
 
-	unsigned int gpio_en;
-	unsigned int gpio_fw_wake;
+	int gpio_en;
+	int gpio_fw_wake;
 
 	struct mutex mutex;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-11-28 21:55 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 15:33 [PATCH net-next 1/3] nfc: s3fwrn5: use signed integer for parsing GPIO numbers bongsu.jeon2
2020-11-26 15:33 ` bongsu.jeon2
2020-11-26 15:33 ` [linux-nfc] " bongsu.jeon2
2020-11-26 15:33 ` [PATCH net-next 2/3] nfc: s3fwrn5: reduce the EN_WAIT_TIME bongsu.jeon2
2020-11-26 15:33   ` bongsu.jeon2
2020-11-26 15:33   ` [linux-nfc] " bongsu.jeon2
2020-11-26 17:03   ` Krzysztof Kozlowski
2020-11-26 17:03     ` Krzysztof Kozlowski
2020-11-26 17:03     ` [linux-nfc] " Krzysztof Kozlowski
2020-11-26 15:33 ` [PATCH net-next 3/3] nfc: s3fwrn5: extract the common phy blocks bongsu.jeon2
2020-11-26 15:33   ` bongsu.jeon2
2020-11-26 15:33   ` [linux-nfc] " bongsu.jeon2
2020-11-26 17:12   ` Krzysztof Kozlowski
2020-11-26 17:12     ` Krzysztof Kozlowski
2020-11-26 17:12     ` [linux-nfc] " Krzysztof Kozlowski
2020-11-26 23:09     ` Bongsu Jeon
2020-11-26 23:09       ` Bongsu Jeon
2020-11-26 23:09       ` [linux-nfc] " Bongsu Jeon
2020-11-28 11:45       ` Krzysztof Kozlowski
2020-11-28 11:45         ` Krzysztof Kozlowski
2020-11-28 11:45         ` [linux-nfc] " Krzysztof Kozlowski
2020-11-26 17:01 ` [PATCH net-next 1/3] nfc: s3fwrn5: use signed integer for parsing GPIO numbers Krzysztof Kozlowski
2020-11-26 17:01   ` Krzysztof Kozlowski
2020-11-26 17:01   ` [linux-nfc] " Krzysztof Kozlowski
2020-11-26 22:53   ` Bongsu Jeon
2020-11-27  5:41     ` Bongsu Jeon
2020-11-27  5:41       ` Bongsu Jeon
2020-11-27  5:41       ` [linux-nfc] " Bongsu Jeon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.