omap24xx: Add 3.1 patchset.
[openwrt.git] / target / linux / omap24xx / patches-3.1 / 830-omap2-serial-fixes.patch
1 Index: linux-3.1-rc4/arch/arm/mach-omap2/serial.c
2 ===================================================================
3 --- linux-3.1-rc4.orig/arch/arm/mach-omap2/serial.c     2011-10-27 16:38:20.000000000 +0200
4 +++ linux-3.1-rc4/arch/arm/mach-omap2/serial.c  2011-10-27 16:53:53.831807619 +0200
5 @@ -660,6 +660,8 @@ static void serial_out_override(struct u
6  }
7  #endif
8  
9 +static struct omap_uart_state statebuf[4];
10 +
11  static int __init omap_serial_early_init(void)
12  {
13         int i = 0;
14 @@ -675,9 +677,9 @@ static int __init omap_serial_early_init
15                 if (!oh)
16                         break;
17  
18 -               uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
19 -               if (WARN_ON(!uart))
20 +               if (WARN_ON(i >= ARRAY_SIZE(statebuf)))
21                         return -ENODEV;
22 +               uart = &statebuf[i];
23  
24                 uart->oh = oh;
25                 uart->num = i++;