ar71xx: fix an unused variable warning
[openwrt.git] / target / linux / omap24xx / patches-2.6.38 / 830-omap2-serial-fixes.patch
1 --- a/arch/arm/mach-omap2/serial.c
2 +++ b/arch/arm/mach-omap2/serial.c
3 @@ -660,6 +660,8 @@ static void serial_out_override(struct u
4 }
5 #endif
6
7 +static struct omap_uart_state statebuf[4];
8 +
9 void __init omap_serial_early_init(void)
10 {
11 int i = 0;
12 @@ -675,9 +677,9 @@ void __init omap_serial_early_init(void)
13 if (!oh)
14 break;
15
16 - uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
17 - if (WARN_ON(!uart))
18 + if (WARN_ON(i >= ARRAY_SIZE(statebuf)))
19 return;
20 + uart = &statebuf[i];
21
22 uart->oh = oh;
23 uart->num = i++;
This page took 0.050395 seconds and 5 git commands to generate.