diff options
author | Tejun Heo <tj@kernel.org> | 2011-03-09 13:54:27 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-03-09 13:54:27 -0500 |
commit | 5b03a1b140e13a28ff6be1526892a9dc538ddef6 (patch) | |
tree | 63d6acaaf4d3c7855cbe4a76dca73f66cda72c31 /drivers/ide/ide-cd.h | |
parent | 69e02c59a7d962dced8047401b81a8d897e1702e (diff) |
ide: Convert to bdops->check_events()
Convert ->media_changed() to the new ->check_events() method. The
conversion is mostly mechanical. The only notable change is that
cdrom now doesn't generate any event if @slot_nr isn't CDSL_CURRENT.
It used to return -EINVAL which would be treated as media changed. As
media changer isn't supported anyway, this doesn't make any
difference.
This makes ide emit the standard disk events and allows kernel event
polling. Currently, only MEDIA_CHANGE event is implemented. Adding
support for EJECT_REQUEST shouldn't be difficult; however, given that
ide driver is already deprecated, it probably is best to leave it
alone.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-ide@vger.kernel.org
Diffstat (limited to 'drivers/ide/ide-cd.h')
-rw-r--r-- | drivers/ide/ide-cd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h index 93a3cf1b0f3f..1efc936f5b66 100644 --- a/drivers/ide/ide-cd.h +++ b/drivers/ide/ide-cd.h | |||
@@ -111,7 +111,8 @@ int cdrom_check_status(ide_drive_t *, struct request_sense *); | |||
111 | int ide_cdrom_open_real(struct cdrom_device_info *, int); | 111 | int ide_cdrom_open_real(struct cdrom_device_info *, int); |
112 | void ide_cdrom_release_real(struct cdrom_device_info *); | 112 | void ide_cdrom_release_real(struct cdrom_device_info *); |
113 | int ide_cdrom_drive_status(struct cdrom_device_info *, int); | 113 | int ide_cdrom_drive_status(struct cdrom_device_info *, int); |
114 | int ide_cdrom_check_media_change_real(struct cdrom_device_info *, int); | 114 | unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *, |
115 | unsigned int clearing, int slot_nr); | ||
115 | int ide_cdrom_tray_move(struct cdrom_device_info *, int); | 116 | int ide_cdrom_tray_move(struct cdrom_device_info *, int); |
116 | int ide_cdrom_lock_door(struct cdrom_device_info *, int); | 117 | int ide_cdrom_lock_door(struct cdrom_device_info *, int); |
117 | int ide_cdrom_select_speed(struct cdrom_device_info *, int); | 118 | int ide_cdrom_select_speed(struct cdrom_device_info *, int); |