1 --- a/arch/cris/arch-v10/drivers/gpio.c
2 +++ b/arch/cris/arch-v10/drivers/gpio.c
4 #include <linux/poll.h>
5 #include <linux/init.h>
6 #include <linux/interrupt.h>
7 +#include <linux/device.h>
9 #include <asm/etraxgpio.h>
10 #include <arch/svinto.h>
11 @@ -771,6 +772,8 @@ static void ioif_watcher(const unsigned
13 /* main driver initialization routine, called from mem.c */
15 +static struct class *gp_class;
17 static int __init gpio_init(void)
20 @@ -784,6 +787,8 @@ static int __init gpio_init(void)
24 + gp_class = class_create(THIS_MODULE, "gpio_etrax");
27 #if defined (CONFIG_ETRAX_CSP0_LEDS) || defined (CONFIG_ETRAX_PA_LEDS) || defined (CONFIG_ETRAX_PB_LEDS)
28 CRIS_LED_NETWORK_SET(0);
29 @@ -796,6 +801,8 @@ static int __init gpio_init(void)
33 + device_create(gp_class, NULL,
34 + MKDEV(GPIO_MAJOR, 2), NULL, "leds");
36 /* The I/O interface allocation watcher will be called when
38 @@ -822,6 +829,12 @@ static int __init gpio_init(void)
40 printk(KERN_CRIT "err: PA irq for gpio\n");
42 + device_create(gp_class, NULL,
43 + MKDEV(GPIO_MAJOR, 0), NULL, "gpioa");
44 + device_create(gp_class, NULL,
45 + MKDEV(GPIO_MAJOR, 1), NULL, "gpiob");
46 + device_create(gp_class, NULL,
47 + MKDEV(GPIO_MAJOR, 3), NULL, "gpiog");