summaryrefslogtreecommitdiff
path: root/drivers/block/amiflop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/amiflop.c')
-rw-r--r--drivers/block/amiflop.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 9a0e9dc74a8c..e460c9799d9f 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1532,7 +1532,7 @@ static int fd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}
-static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
+static int fd_locked_ioctl(struct block_device *bdev, blk_mode_t mode,
unsigned int cmd, unsigned long param)
{
struct amiga_floppy_struct *p = bdev->bd_disk->private_data;
@@ -1607,7 +1607,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
return 0;
}
-static int fd_ioctl(struct block_device *bdev, fmode_t mode,
+static int fd_ioctl(struct block_device *bdev, blk_mode_t mode,
unsigned int cmd, unsigned long param)
{
int ret;
@@ -1654,7 +1654,7 @@ static void fd_probe(int dev)
* /dev/PS0 etc), and disallows simultaneous access to the same
* drive with different device numbers.
*/
-static int floppy_open(struct gendisk *disk, fmode_t mode)
+static int floppy_open(struct gendisk *disk, blk_mode_t mode)
{
int drive = disk->first_minor & 3;
int system = (disk->first_minor & 4) >> 2;
@@ -1673,10 +1673,9 @@ static int floppy_open(struct gendisk *disk, fmode_t mode)
mutex_unlock(&amiflop_mutex);
return -ENXIO;
}
-
- if (mode & (FMODE_READ|FMODE_WRITE)) {
+ if (mode & (BLK_OPEN_READ | BLK_OPEN_WRITE)) {
disk_check_media_change(disk);
- if (mode & FMODE_WRITE) {
+ if (mode & BLK_OPEN_WRITE) {
int wrprot;
get_fdc(drive);
@@ -1691,7 +1690,6 @@ static int floppy_open(struct gendisk *disk, fmode_t mode)
}
}
}
-
local_irq_save(flags);
fd_ref[drive]++;
fd_device[drive] = system;