[patch] 2.6.8-rc4-mm1: i2c-keywest.c compile error

Adrian Bunk
2004-08-11T11:35:35Z

On Tue, Aug 10, 2004 at 08:12:55PM -0400, Tom Vier wrote:
>
> drivers/i2c/busses/i2c-keywest.c: In function `__check_probe':
> drivers/i2c/busses/i2c-keywest.c:94: error: `probe' undeclared (first use in this function)
> drivers/i2c/busses/i2c-keywest.c:94: error: (Each undeclared identifier is reported only once
> drivers/i2c/busses/i2c-keywest.c:94: error: for each function it appears in.)
> drivers/i2c/busses/i2c-keywest.c: At top level:
> drivers/i2c/busses/i2c-keywest.c:94: error: `probe' undeclared here (not in a function)
> drivers/i2c/busses/i2c-keywest.c:94: error: initializer element is not constant
> drivers/i2c/busses/i2c-keywest.c:94: error: (near initialization for `__param_probe.arg')
> drivers/i2c/busses/i2c-keywest.c:96: error: `probe' used prior to declaration
> make[3]: *** [drivers/i2c/busses/i2c-keywest.o] Error 1
>...

Thanks for this report.

The (untested) patch below should fix it.

> Tom Vier <tmv@comcast.net>

cu
Adrian

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.8-rc4-mm1-full/drivers/i2c/busses/i2c-keywest.c.old 2004-08-11 13:28:39.000000000 +0200
+++ linux-2.6.8-rc4-mm1-full/drivers/i2c/busses/i2c-keywest.c 2004-08-11 13:28:54.000000000 +0200
@@ -88,13 +88,13 @@
};
#endif /* DEBUG */

+static int probe;
+
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("I2C driver for Apple's Keywest");
MODULE_LICENSE("GPL");
module_param(probe, bool, 0);

-static int probe;
-
#ifdef POLLED_MODE
/* Don't schedule, the g5 fan controller is too
* timing sensitive