fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / block / paride / bpck6.c
index 71646db..ad12452 100644 (file)
@@ -31,17 +31,14 @@ static int verbose; /* set this to 1 to see debugging messages and whatnot */
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <asm/io.h>
-
-#if defined(CONFIG_PARPORT_MODULE)||defined(CONFIG_PARPORT)
 #include <linux/parport.h>
-#endif
 
 #include "ppc6lnx.c"
 #include "paride.h"
 
  
 
-#define PPCSTRUCT(pi) ((PPC *)(pi->private))
+#define PPCSTRUCT(pi) ((Interface *)(pi->private))
 
 /****************************************************************/
 /*
@@ -139,11 +136,6 @@ static int bpck6_test_port ( PIA *pi )   /* check for 8-bit port */
        PPCSTRUCT(pi)->ppc_id=pi->unit;
        PPCSTRUCT(pi)->lpt_addr=pi->port;
 
-#ifdef CONFIG_PARPORT_PC_MODULE
-#define CONFIG_PARPORT_PC
-#endif
-
-#ifdef CONFIG_PARPORT_PC
        /* look at the parport device to see if what modes we can use */
        if(((struct pardevice *)(pi->pardev))->port->modes & 
                (PARPORT_MODE_EPP)
@@ -161,11 +153,6 @@ static int bpck6_test_port ( PIA *pi )   /* check for 8-bit port */
        {
                return 1;
        }
-#else
-       /* there is no way of knowing what kind of port we have
-          default to the highest mode possible */
-       return 5;
-#endif
 }
 
 static int bpck6_probe_unit ( PIA *pi )
@@ -224,10 +211,9 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose )
 
 static int bpck6_init_proto(PIA *pi)
 {
-       PPC *p = kmalloc(sizeof(PPC), GFP_KERNEL);
+       Interface *p = kzalloc(sizeof(Interface), GFP_KERNEL);
 
        if (p) {
-               memset(p, 0, sizeof(PPC));
                pi->private = (unsigned long)p;
                return 0;
        }
@@ -266,17 +252,17 @@ static int __init bpck6_init(void)
        printk(KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n");
        if(verbose)
                printk(KERN_DEBUG "bpck6: verbose debug enabled.\n");
-       return pi_register(&bpck6) - 1;  
+       return paride_register(&bpck6);
 }
 
 static void __exit bpck6_exit(void)
 {
-       pi_unregister(&bpck6);
+       paride_unregister(&bpck6);
 }
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Micro Solutions Inc.");
 MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE");
-MODULE_PARM(verbose,"i");
+module_param(verbose, bool, 0644);
 module_init(bpck6_init)
 module_exit(bpck6_exit)