Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[firefly-linux-kernel-4.4.55.git] / drivers / cdrom / mcdx.c
index b89420e6d7047ce41e7c252363e07e8b4de43904..788c7a0b2fe301600f4a5c6106e12fdb95592007 100644 (file)
@@ -74,7 +74,6 @@ static const char *mcdx_c_version
 #include <linux/major.h>
 #define MAJOR_NR MITSUMI_X_CDROM_MAJOR
 #include <linux/blkdev.h>
-#include <linux/devfs_fs_kernel.h>
 
 #include "mcdx.h"
 
@@ -1006,7 +1005,7 @@ static int mcdx_talk(struct s_drive_stuff *stuffp,
 
 /* MODULE STUFF ***********************************************************/
 
-int __mcdx_init(void)
+static int __init __mcdx_init(void)
 {
        int i;
        int drives = 0;
@@ -1085,7 +1084,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 +1100,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 */