diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-11-23 17:23:51 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-24 15:00:53 -0800 |
commit | d8f0a86795c69f5b697f7d9e5274c124da93c92d (patch) | |
tree | f52e3235335dfebb5e6fe6595d1ca8b8bafd7e7b /drivers/nfc | |
parent | 078eb55cdf25e0a621d406c233cc1b4acc31c82f (diff) | |
download | linux-d8f0a86795c69f5b697f7d9e5274c124da93c92d.tar.gz linux-d8f0a86795c69f5b697f7d9e5274c124da93c92d.tar.bz2 linux-d8f0a86795c69f5b697f7d9e5274c124da93c92d.zip |
nfc: s3fwrn5: use signed integer for parsing GPIO numbers
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")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201123162351.209100-1-krzk@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/s3fwrn5/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index dc995286be84..d0a3bd9ff3c3 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -26,8 +26,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; |