Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Alchemy: Fix GCC 4.6.0 build error.

CC arch/mips/alchemy/devboards/db1x00/board_setup.o
arch/mips/alchemy/devboards/db1x00/board_setup.c: In function 'board_setup':
arch/mips/alchemy/devboards/db1x00/board_setup.c:130:6: error: variable 'pin_func' set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+33 -28
+33 -28
arch/mips/alchemy/devboards/db1x00/board_setup.c
··· 127 127 void __init board_setup(void) 128 128 { 129 129 unsigned long bcsr1, bcsr2; 130 - u32 pin_func; 131 130 132 131 bcsr1 = DB1000_BCSR_PHYS_ADDR; 133 132 bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS; 134 - 135 - pin_func = 0; 136 133 137 134 #ifdef CONFIG_MIPS_DB1000 138 135 printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n"); ··· 161 164 /* Not valid for Au1550 */ 162 165 #if defined(CONFIG_IRDA) && \ 163 166 (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) 164 - /* Set IRFIRSEL instead of GPIO15 */ 165 - pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF; 166 - au_writel(pin_func, SYS_PINFUNC); 167 - /* Power off until the driver is in use */ 168 - bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK, 169 - BCSR_RESETS_IRDA_MODE_OFF); 167 + { 168 + u32 pin_func; 169 + 170 + /* Set IRFIRSEL instead of GPIO15 */ 171 + pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF; 172 + au_writel(pin_func, SYS_PINFUNC); 173 + /* Power off until the driver is in use */ 174 + bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK, 175 + BCSR_RESETS_IRDA_MODE_OFF); 176 + } 170 177 #endif 171 178 bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */ 172 179 ··· 178 177 alchemy_gpio1_input_enable(); 179 178 180 179 #ifdef CONFIG_MIPS_MIRAGE 181 - /* GPIO[20] is output */ 182 - alchemy_gpio_direction_output(20, 0); 180 + { 181 + u32 pin_func; 183 182 184 - /* Set GPIO[210:208] instead of SSI_0 */ 185 - pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; 183 + /* GPIO[20] is output */ 184 + alchemy_gpio_direction_output(20, 0); 186 185 187 - /* Set GPIO[215:211] for LEDs */ 188 - pin_func |= 5 << 2; 186 + /* Set GPIO[210:208] instead of SSI_0 */ 187 + pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; 189 188 190 - /* Set GPIO[214:213] for more LEDs */ 191 - pin_func |= 5 << 12; 189 + /* Set GPIO[215:211] for LEDs */ 190 + pin_func |= 5 << 2; 192 191 193 - /* Set GPIO[207:200] instead of PCMCIA/LCD */ 194 - pin_func |= SYS_PF_LCD | SYS_PF_PC; 195 - au_writel(pin_func, SYS_PINFUNC); 192 + /* Set GPIO[214:213] for more LEDs */ 193 + pin_func |= 5 << 12; 196 194 197 - /* 198 - * Enable speaker amplifier. This should 199 - * be part of the audio driver. 200 - */ 201 - alchemy_gpio_direction_output(209, 1); 195 + /* Set GPIO[207:200] instead of PCMCIA/LCD */ 196 + pin_func |= SYS_PF_LCD | SYS_PF_PC; 197 + au_writel(pin_func, SYS_PINFUNC); 202 198 203 - pm_power_off = mirage_power_off; 204 - _machine_halt = mirage_power_off; 205 - _machine_restart = (void(*)(char *))mips_softreset; 199 + /* 200 + * Enable speaker amplifier. This should 201 + * be part of the audio driver. 202 + */ 203 + alchemy_gpio_direction_output(209, 1); 204 + 205 + pm_power_off = mirage_power_off; 206 + _machine_halt = mirage_power_off; 207 + _machine_restart = (void(*)(char *))mips_softreset; 208 + } 206 209 #endif 207 210 208 211 #ifdef CONFIG_MIPS_BOSPORUS