X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwan%2Fcosa.c;h=a4d0452c3c97f392ac8d1605c071d38266e4c223;hb=918425d07b2fe2087ee7dabf90e69a17e914649c;hp=00d0b751e8274cbbf8734f79f0a249132ec81b7b;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 00d0b751e..a4d0452c3 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -93,6 +93,7 @@ #include #include #include +#include #undef COSA_SLOW_IO /* for testing purposes only */ #undef REALLY_SLOW_IO @@ -233,6 +234,9 @@ static int dma[MAX_CARDS+1]; /* IRQ can be safely autoprobed */ static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; +/* for class stuff*/ +static struct class_simple *cosa_class; + #ifdef MODULE MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i"); MODULE_PARM_DESC(io, "The I/O bases of the COSA or SRP cards"); @@ -359,7 +363,7 @@ static void debug_status_out(struct cosa_data *cosa, int status); static int __init cosa_init(void) { - int i; + int i, err = 0; printk(KERN_INFO "cosa v1.08 (c) 1997-2000 Jan Kasprzak \n"); #ifdef CONFIG_SMP @@ -369,12 +373,14 @@ static int __init cosa_init(void) if (register_chrdev(cosa_major, "cosa", &cosa_fops)) { printk(KERN_WARNING "cosa: unable to get major %d\n", cosa_major); - return -EIO; + err = -EIO; + goto out; } } else { if (!(cosa_major=register_chrdev(0, "cosa", &cosa_fops))) { printk(KERN_WARNING "cosa: unable to register chardev\n"); - return -EIO; + err = -EIO; + goto out; } } for (i=0; i