diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/tape_block.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index f061b2527b44..83cea9a55e2f 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -48,14 +48,14 @@ | |||
48 | static DEFINE_MUTEX(tape_block_mutex); | 48 | static DEFINE_MUTEX(tape_block_mutex); |
49 | static int tapeblock_open(struct block_device *, fmode_t); | 49 | static int tapeblock_open(struct block_device *, fmode_t); |
50 | static int tapeblock_release(struct gendisk *, fmode_t); | 50 | static int tapeblock_release(struct gendisk *, fmode_t); |
51 | static int tapeblock_medium_changed(struct gendisk *); | 51 | static unsigned int tapeblock_check_events(struct gendisk *, unsigned int); |
52 | static int tapeblock_revalidate_disk(struct gendisk *); | 52 | static int tapeblock_revalidate_disk(struct gendisk *); |
53 | 53 | ||
54 | static const struct block_device_operations tapeblock_fops = { | 54 | static const struct block_device_operations tapeblock_fops = { |
55 | .owner = THIS_MODULE, | 55 | .owner = THIS_MODULE, |
56 | .open = tapeblock_open, | 56 | .open = tapeblock_open, |
57 | .release = tapeblock_release, | 57 | .release = tapeblock_release, |
58 | .media_changed = tapeblock_medium_changed, | 58 | .check_events = tapeblock_check_events, |
59 | .revalidate_disk = tapeblock_revalidate_disk, | 59 | .revalidate_disk = tapeblock_revalidate_disk, |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -236,6 +236,7 @@ tapeblock_setup_device(struct tape_device * device) | |||
236 | disk->major = tapeblock_major; | 236 | disk->major = tapeblock_major; |
237 | disk->first_minor = device->first_minor; | 237 | disk->first_minor = device->first_minor; |
238 | disk->fops = &tapeblock_fops; | 238 | disk->fops = &tapeblock_fops; |
239 | disk->events = DISK_EVENT_MEDIA_CHANGE; | ||
239 | disk->private_data = tape_get_device(device); | 240 | disk->private_data = tape_get_device(device); |
240 | disk->queue = blkdat->request_queue; | 241 | disk->queue = blkdat->request_queue; |
241 | set_capacity(disk, 0); | 242 | set_capacity(disk, 0); |
@@ -339,8 +340,8 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
339 | return 0; | 340 | return 0; |
340 | } | 341 | } |
341 | 342 | ||
342 | static int | 343 | static unsigned int |
343 | tapeblock_medium_changed(struct gendisk *disk) | 344 | tapeblock_check_events(struct gendisk *disk, unsigned int clearing) |
344 | { | 345 | { |
345 | struct tape_device *device; | 346 | struct tape_device *device; |
346 | 347 | ||
@@ -348,7 +349,7 @@ tapeblock_medium_changed(struct gendisk *disk) | |||
348 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", | 349 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", |
349 | device, device->blk_data.medium_changed); | 350 | device, device->blk_data.medium_changed); |
350 | 351 | ||
351 | return device->blk_data.medium_changed; | 352 | return device->blk_data.medium_changed ? DISK_EVENT_MEDIA_CHANGE : 0; |
352 | } | 353 | } |
353 | 354 | ||
354 | /* | 355 | /* |