Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242267
b: refs/heads/master
c: f47350f
h: refs/heads/master
i:
  242265: c0879c0
  242263: 9c24eb3
v: v3
  • Loading branch information
Tejun Heo committed Mar 9, 2011
1 parent f6abfd5 commit 98fcd51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a200911ada2d5b955c2c6daa22364c6de83c52c
refs/heads/master: f47350fdecb7ce9fe715e2df4431c4b51c4ef46b
11 changes: 7 additions & 4 deletions trunk/drivers/message/i2o/i2o_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,20 +695,22 @@ static int i2o_block_ioctl(struct block_device *bdev, fmode_t mode,
};

/**
* i2o_block_media_changed - Have we seen a media change?
* i2o_block_check_events - Have we seen a media change?
* @disk: gendisk which should be verified
* @clearing: events being cleared
*
* Verifies if the media has changed.
*
* Returns 1 if the media was changed or 0 otherwise.
*/
static int i2o_block_media_changed(struct gendisk *disk)
static unsigned int i2o_block_check_events(struct gendisk *disk,
unsigned int clearing)
{
struct i2o_block_device *p = disk->private_data;

if (p->media_change_flag) {
p->media_change_flag = 0;
return 1;
return DISK_EVENT_MEDIA_CHANGE;
}
return 0;
}
Expand Down Expand Up @@ -950,7 +952,7 @@ static const struct block_device_operations i2o_block_fops = {
.ioctl = i2o_block_ioctl,
.compat_ioctl = i2o_block_ioctl,
.getgeo = i2o_block_getgeo,
.media_changed = i2o_block_media_changed
.check_events = i2o_block_check_events,
};

/**
Expand Down Expand Up @@ -1002,6 +1004,7 @@ static struct i2o_block_device *i2o_block_device_alloc(void)
gd->major = I2O_MAJOR;
gd->queue = queue;
gd->fops = &i2o_block_fops;
gd->events = DISK_EVENT_MEDIA_CHANGE;
gd->private_data = dev;

dev->gd = gd;
Expand Down

0 comments on commit 98fcd51

Please sign in to comment.