]> git.hungrycats.org Git - linux/commitdiff
[PATCH] remove a tiny bit of kdev_t abuse from the floppy driver
authorChristoph Hellwig <hch@lst.de>
Sun, 20 Apr 2003 07:50:20 +0000 (00:50 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 20 Apr 2003 07:50:20 +0000 (00:50 -0700)
drivers/block/floppy.c
drivers/block/floppy98.c

index c2387a7be5f42fa7668a900d814ff9aa36375042..4f6c5966b9b815b7c3c24781e29d4006c96e23c7 100644 (file)
@@ -2263,10 +2263,9 @@ static struct cont_t format_cont={
        bad_flp_intr,
        generic_done };
 
-static int do_format(kdev_t device, struct format_descr *tmp_format_req)
+static int do_format(int drive, struct format_descr *tmp_format_req)
 {
        int ret;
-       int drive=DRIVE(device);
 
        LOCK_FDC(drive,1);
        set_floppy(drive);
@@ -3556,7 +3555,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
                case FDFMTTRK:
                        if (UDRS->fd_ref != 1)
                                return -EBUSY;
-                       return do_format(device, &inparam.f);
+                       return do_format(drive, &inparam.f);
                case FDFMTEND:
                case FDFLUSH:
                        LOCK_FDC(drive,1);
index c3322cb2d8c225bd5feeec04c1333fc982ca1b8a..8dc1de8b46d933c59d20b036dbaee1ebdbea8362 100644 (file)
@@ -2318,10 +2318,9 @@ static struct cont_t format_cont={
        bad_flp_intr,
        generic_done };
 
-static int do_format(kdev_t device, struct format_descr *tmp_format_req)
+static int do_format(int drive, struct format_descr *tmp_format_req)
 {
        int ret;
-       int drive=DRIVE(device);
 
        LOCK_FDC(drive,1);
        set_floppy(drive);
@@ -3635,7 +3634,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
                case FDFMTTRK:
                        if (UDRS->fd_ref != 1)
                                return -EBUSY;
-                       return do_format(device, &inparam.f);
+                       return do_format(drive, &inparam.f);
                case FDFMTEND:
                case FDFLUSH:
                        LOCK_FDC(drive,1);