Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242266
b: refs/heads/master
c: 3a20091
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Mar 9, 2011
1 parent c0879c0 commit f6abfd5
Show file tree
Hide file tree
Showing 2 changed files with 6 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: aaa7c01546d3dc944f5758f671284177131ccce3
refs/heads/master: 3a200911ada2d5b955c2c6daa22364c6de83c52c
9 changes: 5 additions & 4 deletions trunk/drivers/block/xsysace.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,12 +867,12 @@ static void ace_request(struct request_queue * q)
}
}

static int ace_media_changed(struct gendisk *gd)
static unsigned int ace_check_events(struct gendisk *gd, unsigned int clearing)
{
struct ace_device *ace = gd->private_data;
dev_dbg(ace->dev, "ace_media_changed(): %i\n", ace->media_change);
dev_dbg(ace->dev, "ace_check_events(): %i\n", ace->media_change);

return ace->media_change;
return ace->media_change ? DISK_EVENT_MEDIA_CHANGE : 0;
}

static int ace_revalidate_disk(struct gendisk *gd)
Expand Down Expand Up @@ -953,7 +953,7 @@ static const struct block_device_operations ace_fops = {
.owner = THIS_MODULE,
.open = ace_open,
.release = ace_release,
.media_changed = ace_media_changed,
.check_events = ace_check_events,
.revalidate_disk = ace_revalidate_disk,
.getgeo = ace_getgeo,
};
Expand Down Expand Up @@ -1005,6 +1005,7 @@ static int __devinit ace_setup(struct ace_device *ace)
ace->gd->major = ace_major;
ace->gd->first_minor = ace->id * ACE_NUM_MINORS;
ace->gd->fops = &ace_fops;
ace->gd->events = DISK_EVENT_MEDIA_CHANGE;
ace->gd->queue = ace->queue;
ace->gd->private_data = ace;
snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a');
Expand Down

0 comments on commit f6abfd5

Please sign in to comment.