]> Pileus Git - ~andy/linux/blobdiff - drivers/block/floppy.c
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
[~andy/linux] / drivers / block / floppy.c
index 20aea9b511b5f1cdcecb039af23ab8ca80a66fe9..98de8f4186762680a0ea1ccd2d0cf907c1314b40 100644 (file)
@@ -3771,13 +3771,14 @@ out2:
 /*
  * Check if the disk has been changed or if a change has been faked.
  */
-static int check_floppy_change(struct gendisk *disk)
+static unsigned int floppy_check_events(struct gendisk *disk,
+                                       unsigned int clearing)
 {
        int drive = (long)disk->private_data;
 
        if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) ||
            test_bit(FD_VERIFY_BIT, &UDRS->flags))
-               return 1;
+               return DISK_EVENT_MEDIA_CHANGE;
 
        if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) {
                lock_fdc(drive, false);
@@ -3789,7 +3790,7 @@ static int check_floppy_change(struct gendisk *disk)
            test_bit(FD_VERIFY_BIT, &UDRS->flags) ||
            test_bit(drive, &fake_change) ||
            drive_no_geom(drive))
-               return 1;
+               return DISK_EVENT_MEDIA_CHANGE;
        return 0;
 }
 
@@ -3838,7 +3839,6 @@ static int __floppy_read_block_0(struct block_device *bdev)
        bio.bi_end_io = floppy_rb0_complete;
 
        submit_bio(READ, &bio);
-       generic_unplug_device(bdev_get_queue(bdev));
        process_fd_request();
        wait_for_completion(&complete);
 
@@ -3899,7 +3899,7 @@ static const struct block_device_operations floppy_fops = {
        .release                = floppy_release,
        .ioctl                  = fd_ioctl,
        .getgeo                 = fd_getgeo,
-       .media_changed          = check_floppy_change,
+       .check_events           = floppy_check_events,
        .revalidate_disk        = floppy_revalidate,
 };