kernel: update to kernel version 2.6.32.32
[openwrt.git] / target / linux / etrax / patches-2.6.32 / 600-create-device-serial.patch
1 --- a/drivers/serial/crisv10.c
2 +++ b/drivers/serial/crisv10.c
3 @@ -32,6 +32,7 @@ static char *serial_version = "$Revision
4 #include <linux/module.h>
5 #include <linux/uaccess.h>
6 #include <linux/io.h>
7 +#include <linux/device.h>
8
9 #include <asm/irq.h>
10 #include <asm/dma.h>
11 @@ -4415,6 +4416,8 @@ static const struct tty_operations rs_op
12 #endif
13 };
14
15 +static struct class *rs_class;
16 +
17 static int __init rs_init(void)
18 {
19 int i;
20 @@ -4548,6 +4551,24 @@ static int __init rs_init(void)
21 #endif
22 #endif /* CONFIG_SVINTO_SIM */
23
24 + rs_class = class_create(THIS_MODULE, "rs_tty");
25 +#ifdef CONFIG_ETRAX_SERIAL_PORT0
26 + device_create(rs_class, NULL,
27 + MKDEV(TTY_MAJOR, 64), NULL, "ttyS0");
28 +#endif
29 +#ifdef CONFIG_ETRAX_SERIAL_PORT1
30 + device_create(rs_class, NULL,
31 + MKDEV(TTY_MAJOR, 65), NULL, "ttyS1");
32 +#endif
33 +#ifdef CONFIG_ETRAX_SERIAL_PORT2
34 + device_create(rs_class, NULL,
35 + MKDEV(TTY_MAJOR, 66), NULL, "ttyS2");
36 +#endif
37 +#ifdef CONFIG_ETRAX_SERIAL_PORT3
38 + device_create(rs_class, NULL,
39 + MKDEV(TTY_MAJOR, 67), NULL, "ttyS3");
40 +#endif
41 +
42 return 0;
43 }
44
This page took 0.051965 seconds and 5 git commands to generate.