Skip to contentSkip to conversation

Input: adxl34x - clean up a data type in adxl34x_probe()

PATCH Applied Dan Carpenter 3 participants 3 messages Oct 26, 2020 – Oct 27, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: adxl34x - clean up a data type in adxl34x_probe()

The "revid" is used to store negative error codes so it should be an int type.

Fixes e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers")
---
 drivers/input/misc/adxl34x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/adxl34x.c +1 -1
index 5fe92d4ba3f0..4cc4e8ff42b3 100644
@@ -696,7 +696,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
 	struct input_dev *input_dev;
 	const struct adxl34x_platform_data *pdata;
 	int err, range, i;
-	unsigned char revid;
+	int revid;
 
 	if (!irq) {
 		dev_err(dev, "no IRQ?\n");
Signature · 1 line
2.28.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Dan Carpenter <[email protected]>
Sent: Montag, 26. Oktober 2020 08:28
To: Hennerich, Michael <[email protected]>
Cc: Dmitry Torokhov <[email protected]>; linux- [email protected]; [email protected]
Subject: [PATCH] Input: adxl34x - clean up a data type in adxl34x_probe()

Quoted 5 lines

The "revid" is used to store negative error codes so it should be an int type.

Fixes e27c729219ad ("Input: add driver for ADXL345/346 Digital

Accelerometers")

Quoted 20 lines
---
 drivers/input/misc/adxl34x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/adxl34x.c index renamed from drivers/input/misc/adxl34x.c +0 -0

5fe92d4ba3f0..4cc4e8ff42b3 100644

drivers/input/misc/adxl34x.c +1 -1
@@ -696,7 +696,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int
 irq,
 	struct input_dev *input_dev;
 	const struct adxl34x_platform_data *pdata;
 	int err, range, i;
-	unsigned char revid;
+	int revid;
 
 	if (!irq) {

dev_err(dev, "no IRQ?\n");
--
2.28.0