summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-04 15:55:58 +0000
committerWolfgang Denk <wd@denx.de>2011-11-07 22:16:52 +0100
commit8b337be04ec237d062ff2fab929ceea32fa3da83 (patch)
tree7eff1b0c5fcff163cb35ac2fbb63e1ffe7430eed /arch/powerpc
parent918e34674f26ba892b88f2bde621ec36c77dc538 (diff)
downloadu-boot-imx-8b337be04ec237d062ff2fab929ceea32fa3da83.zip
u-boot-imx-8b337be04ec237d062ff2fab929ceea32fa3da83.tar.gz
u-boot-imx-8b337be04ec237d062ff2fab929ceea32fa3da83.tar.bz2
mpc8220/i2c.c: Fix GCC 4.6 build warning
Fix: i2c.c: In function 'wait_for_bb': i2c.c:109:16: warning: variable 'temp' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/mpc8220/i2c.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/cpu/mpc8220/i2c.c b/arch/powerpc/cpu/mpc8220/i2c.c
index 76ecdf1..2f35d20 100644
--- a/arch/powerpc/cpu/mpc8220/i2c.c
+++ b/arch/powerpc/cpu/mpc8220/i2c.c
@@ -105,15 +105,13 @@ static int wait_for_bb (void)
status = mpc_reg_in (&regs->sr);
while (timeout-- && (status & I2C_BB)) {
-#if 1
- volatile int temp;
mpc_reg_out (&regs->cr, I2C_STA, I2C_STA);
- temp = mpc_reg_in (&regs->dr);
+ (void)mpc_reg_in (&regs->dr);
mpc_reg_out (&regs->cr, 0, I2C_STA);
mpc_reg_out (&regs->cr, 0, 0);
mpc_reg_out (&regs->cr, I2C_EN, 0);
-#endif
+
udelay (1000);
status = mpc_reg_in (&regs->sr);
}