diff options
Diffstat (limited to 'drivers/block/paride/pd.c')
-rw-r--r-- | drivers/block/paride/pd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index c0ee1558b9bb..21dfdb776869 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -794,7 +794,7 @@ static int pd_release(struct gendisk *p, fmode_t mode) | |||
794 | return 0; | 794 | return 0; |
795 | } | 795 | } |
796 | 796 | ||
797 | static int pd_check_media(struct gendisk *p) | 797 | static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing) |
798 | { | 798 | { |
799 | struct pd_unit *disk = p->private_data; | 799 | struct pd_unit *disk = p->private_data; |
800 | int r; | 800 | int r; |
@@ -803,7 +803,7 @@ static int pd_check_media(struct gendisk *p) | |||
803 | pd_special_command(disk, pd_media_check); | 803 | pd_special_command(disk, pd_media_check); |
804 | r = disk->changed; | 804 | r = disk->changed; |
805 | disk->changed = 0; | 805 | disk->changed = 0; |
806 | return r; | 806 | return r ? DISK_EVENT_MEDIA_CHANGE : 0; |
807 | } | 807 | } |
808 | 808 | ||
809 | static int pd_revalidate(struct gendisk *p) | 809 | static int pd_revalidate(struct gendisk *p) |
@@ -822,7 +822,7 @@ static const struct block_device_operations pd_fops = { | |||
822 | .release = pd_release, | 822 | .release = pd_release, |
823 | .ioctl = pd_ioctl, | 823 | .ioctl = pd_ioctl, |
824 | .getgeo = pd_getgeo, | 824 | .getgeo = pd_getgeo, |
825 | .media_changed = pd_check_media, | 825 | .check_events = pd_check_events, |
826 | .revalidate_disk= pd_revalidate | 826 | .revalidate_disk= pd_revalidate |
827 | }; | 827 | }; |
828 | 828 | ||
@@ -837,6 +837,7 @@ static void pd_probe_drive(struct pd_unit *disk) | |||
837 | p->fops = &pd_fops; | 837 | p->fops = &pd_fops; |
838 | p->major = major; | 838 | p->major = major; |
839 | p->first_minor = (disk - pd) << PD_BITS; | 839 | p->first_minor = (disk - pd) << PD_BITS; |
840 | p->events = DISK_EVENT_MEDIA_CHANGE; | ||
840 | disk->gd = p; | 841 | disk->gd = p; |
841 | p->private_data = disk; | 842 | p->private_data = disk; |
842 | p->queue = pd_queue; | 843 | p->queue = pd_queue; |