Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / cdrom / mcdx.c
index 07bbd24..a0b580c 100644 (file)
@@ -51,7 +51,7 @@
  */
 
 
-#if RCS
+#ifdef RCS
 static const char *mcdx_c_version
     = "$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $";
 #endif
@@ -706,7 +706,7 @@ static int mcdx_open(struct cdrom_device_info *cdi, int purpose)
                xtrace(OPENCLOSE, "open() init irq generation\n");
                if (-1 == mcdx_config(stuffp, 1))
                        return -EIO;
-#if FALLBACK
+#ifdef FALLBACK
                /* Set the read speed */
                xwarn("AAA %x AAA\n", stuffp->readcmd);
                if (stuffp->readerrs)
@@ -1085,7 +1085,7 @@ static int __init mcdx_init_drive(int drive)
 
        xtrace(INIT, "kmalloc space for stuffpt's\n");
        xtrace(MALLOC, "init() malloc %d bytes\n", size);
-       if (!(stuffp = kmalloc(size, GFP_KERNEL))) {
+       if (!(stuffp = kzalloc(size, GFP_KERNEL))) {
                xwarn("init() malloc failed\n");
                return 1;
        }
@@ -1101,8 +1101,6 @@ static int __init mcdx_init_drive(int drive)
               sizeof(*stuffp), stuffp);
 
        /* set default values */
-       memset(stuffp, 0, sizeof(*stuffp));
-
        stuffp->present = 0;    /* this should be 0 already */
        stuffp->toc = NULL;     /* this should be NULL already */
 
@@ -1216,7 +1214,7 @@ static int __init mcdx_init_drive(int drive)
        }
 
 
-#if WE_KNOW_WHY
+#ifdef WE_KNOW_WHY
        /* irq 11 -> channel register */
        outb(0x50, stuffp->wreg_chn);
 #endif
@@ -1294,7 +1292,7 @@ static int mcdx_transfer(struct s_drive_stuff *stuffp,
 
        ans = mcdx_xfer(stuffp, p, sector, nr_sectors);
        return ans;
-#if FALLBACK
+#ifdef FALLBACK
        if (-1 == ans)
                stuffp->readerrs++;
        else