From 2956532625cf8414ad3efb37598ba34db08d67ec Mon Sep 17 00:00:00 2001 From: John Rigby Date: Mon, 20 Dec 2010 18:27:51 -0700 Subject: Move DECLARE_GLOBAL_DATA_PTR to file scope It can be optimised out by the compiler otherwise resulting in obscure errors like a board not booting. This has been documented in README since 2006 when these were first fixed up for GCC 4.x. Signed-off-by: John Rigby Fix some additional places. Signed-off-by: Wolfgang Denk Acked-By: Albert ARIBAUD --- drivers/i2c/omap24xx_i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/i2c/omap24xx_i2c.c') diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index fab49fd969..215be3419d 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -27,6 +27,8 @@ #include "omap24xx_i2c.h" +DECLARE_GLOBAL_DATA_PTR; + #define I2C_TIMEOUT 1000 static void wait_for_bb (void); @@ -40,7 +42,6 @@ static unsigned int current_bus; void i2c_init (int speed, int slaveadd) { - DECLARE_GLOBAL_DATA_PTR; int psc, fsscll, fssclh; int hsscll = 0, hssclh = 0; u32 scll, sclh; -- cgit v1.2.1