Input: ads7846: Fix warning about output format
Subsystems (2)
PATCH 1/1 Input: ads7846: Fix warning about output format
This patch fixes a compiler warning about wrong output format.
drivers/input/touchscreen/ads7846.c: In function 'ads7846_probe':drivers/input/touchscreen/ads7846.c:1167: warning: format '%ld' expects type 'long int', but argument 4 has type 'int'
Introduced by commit 067fb2f648543894ce775082c5636f4c32b99e4f ("Input:
ads7846 - return error on regulator_get() failure").
The ERR_PTR returns a long so the variable err needs to be long.
--- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/ads7846.c +2 -2
@@ -885,7 +885,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)struct spi_message *m;struct spi_transfer *x;int vref; -int err; +long err;if (!spi->irq) {dev_dbg (&spi->dev,"no IRQ?\n" );
@@ -1170,7 +1170,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) err =regulator_enable (ts->reg);if (err) { -dev_err (&spi->dev,"unable to enable regulator: %d\n" , err); +dev_err (&spi->dev,"unable to enable regulator: %ld\n" , err); goto err_put_regulator; }
Signature · 1 line
1.7.1
Dmitry Torokhov
maintainerQuoted 10 lines · Thomas Weber
This patch fixes a compiler warning about wrong output format.
drivers/input/touchscreen/ads7846.c: In function 'ads7846_probe':drivers/input/touchscreen/ads7846.c:1167: warning: format '%ld' expects type 'long int', but argument 4 has type 'int'Introduced by commit
067fb2f648543894ce775082c5636f4c32b99e4f("Input:
ads7846 - return error onregulator_get()failure").The
ERR_PTRreturns a long so the variable err needs to be long.
No, int works just as well. I have a patch that simply fixes format specification.
Thanks.
Signature · 1 line
Dmitry