Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242263
b: refs/heads/master
c: 507daea
h: refs/heads/master
i:
  242261: a4701c2
  242259: be9811b
  242255: 9ad85d6
v: v3
  • Loading branch information
Tejun Heo committed Mar 9, 2011
1 parent ba0e9fd commit 9c24eb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: b1b56b93f331bd61492fdb99e7986f7a528ca730
refs/heads/master: 507daea2276677785ba8096d90b9e8049632fc46
8 changes: 5 additions & 3 deletions trunk/drivers/block/DAC960.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,14 @@ static int DAC960_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}

static int DAC960_media_changed(struct gendisk *disk)
static unsigned int DAC960_check_events(struct gendisk *disk,
unsigned int clearing)
{
DAC960_Controller_T *p = disk->queue->queuedata;
int drive_nr = (long)disk->private_data;

if (!p->LogicalDriveInitiallyAccessible[drive_nr])
return 1;
return DISK_EVENT_MEDIA_CHANGE;
return 0;
}

Expand All @@ -163,7 +164,7 @@ static const struct block_device_operations DAC960_BlockDeviceOperations = {
.owner = THIS_MODULE,
.open = DAC960_open,
.getgeo = DAC960_getgeo,
.media_changed = DAC960_media_changed,
.check_events = DAC960_check_events,
.revalidate_disk = DAC960_revalidate_disk,
};

Expand Down Expand Up @@ -2546,6 +2547,7 @@ static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
disk->major = MajorNumber;
disk->first_minor = n << DAC960_MaxPartitionsBits;
disk->fops = &DAC960_BlockDeviceOperations;
disk->events = DISK_EVENT_MEDIA_CHANGE;
}
/*
Indicate the Block Device Registration completed successfully,
Expand Down

0 comments on commit 9c24eb3

Please sign in to comment.