summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2003-04-20 00:50:20 -0700
committerChristoph Hellwig <hch@lst.de>2003-04-20 00:50:20 -0700
commit6b75d22fef4f5d8c3e6b6adfc95643f0d896a1bd (patch)
treeeb4803c218d7b65203e5cdf0a7c282a8227ddd42
parente5627bdffcbd3f0836fa7c05281dc65145bfafbf (diff)
[PATCH] remove a tiny bit of kdev_t abuse from the floppy driver
-rw-r--r--drivers/block/floppy.c5
-rw-r--r--drivers/block/floppy98.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index c2387a7be5f4..4f6c5966b9b8 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -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);
diff --git a/drivers/block/floppy98.c b/drivers/block/floppy98.c
index c3322cb2d8c2..8dc1de8b46d9 100644
--- a/drivers/block/floppy98.c
+++ b/drivers/block/floppy98.c
@@ -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);