drm: merge in Linus mainline
[powerpc.git] / drivers / ide / ide-floppy.c
index e83f54d..9e293c8 100644 (file)
@@ -1925,8 +1925,8 @@ static ide_proc_entry_t idefloppy_proc[] = {
 static int ide_floppy_probe(struct device *);
 
 static ide_driver_t idefloppy_driver = {
-       .owner                  = THIS_MODULE,
        .gen_driver = {
+               .owner          = THIS_MODULE,
                .name           = "ide-floppy",
                .bus            = &ide_bus_type,
                .probe          = ide_floppy_probe,
@@ -2038,11 +2038,9 @@ static int idefloppy_ioctl(struct inode *inode, struct file *file,
        struct ide_floppy_obj *floppy = ide_floppy_g(bdev->bd_disk);
        ide_drive_t *drive = floppy->drive;
        void __user *argp = (void __user *)arg;
-       int err = generic_ide_ioctl(drive, file, bdev, cmd, arg);
+       int err;
        int prevent = (arg) ? 1 : 0;
        idefloppy_pc_t pc;
-       if (err != -EINVAL)
-               return err;
 
        switch (cmd) {
        case CDROMEJECT:
@@ -2094,7 +2092,7 @@ static int idefloppy_ioctl(struct inode *inode, struct file *file,
        case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
                return idefloppy_get_format_progress(drive, argp);
        }
-       return -EINVAL;
+       return generic_ide_ioctl(drive, file, bdev, cmd, arg);
 }
 
 static int idefloppy_media_changed(struct gendisk *disk)
@@ -2193,10 +2191,7 @@ static void __exit idefloppy_exit (void)
        driver_unregister(&idefloppy_driver.gen_driver);
 }
 
-/*
- *     idefloppy_init will register the driver for each floppy.
- */
-static int idefloppy_init (void)
+static int __init idefloppy_init(void)
 {
        printk("ide-floppy driver " IDEFLOPPY_VERSION "\n");
        return driver_register(&idefloppy_driver.gen_driver);