]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ps2esdi broken
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 11 Sep 2003 00:02:21 +0000 (17:02 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 11 Sep 2003 00:02:21 +0000 (17:02 -0700)
The PS/2 ESDI driver has some problems: a couple of typos on the modular
side and misuse of module_init():

drivers/block/Kconfig
drivers/block/ps2esdi.c

index 0d59682dd61861ee07273a69d45551af7a65e57b..1627ddc9513e9003fc004d370df67f40be41a231 100644 (file)
@@ -44,7 +44,7 @@ config BLK_DEV_SWIM_IOP
 
 config BLK_DEV_PS2
        tristate "PS/2 ESDI hard disk support"
-       depends on MCA
+       depends on MCA && MCA_LEGACY
        help
          Say Y here if you have a PS/2 machine with a MCA bus and an ESDI
          hard disk.
index 90ae6c2eeb588f3816b1ab19bba9859fe7278bf4..0cce1ea6fb368f2001ae3380dd8c66f305958acf 100644 (file)
@@ -62,8 +62,6 @@
 
 static void reset_ctrl(void);
 
-int ps2esdi_init(void);
-
 static int ps2esdi_geninit(void);
 
 static void do_ps2esdi_request(request_queue_t * q);
@@ -141,7 +139,7 @@ static struct block_device_operations ps2esdi_fops =
 static struct gendisk *ps2esdi_gendisk[2];
 
 /* initialization routine called by ll_rw_blk.c   */
-int __init ps2esdi_init(void)
+static int __init ps2esdi_init(void)
 {
 
        int error = 0;
@@ -169,9 +167,11 @@ int __init ps2esdi_init(void)
        return 0;
 }                              /* ps2esdi_init */
 
+#ifndef MODULE
+
 module_init(ps2esdi_init);
 
-#ifdef MODULE
+#else
 
 static int cyl[MAX_HD] = {-1,-1};
 static int head[MAX_HD] = {-1, -1};
@@ -187,7 +187,7 @@ int init_module(void) {
        int drive;
 
        for(drive = 0; drive < MAX_HD; drive++) {
-               struct ps2_esdi_i_struct *info = &ps2esdi_info[drive];
+               struct ps2esdi_i_struct *info = &ps2esdi_info[drive];
 
                if (cyl[drive] != -1) {
                        info->cyl = info->lzone = cyl[drive];
@@ -204,6 +204,7 @@ int init_module(void) {
 
 void
 cleanup_module(void) {
+       int i;
        if(ps2esdi_slot) {
                mca_mark_as_unused(ps2esdi_slot);
                mca_set_adapter_procfn(ps2esdi_slot, NULL, NULL);