aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2006-01-06 06:41:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 14:26:10 -0500
commit4031bbe4bbec6c0fe50412ef7fb43a270b0f29f1 (patch)
tree1e1449ba492ab04d8c5fbc75f9761be237bcae72 /drivers/ide/ide-cd.c
parentbbbe3a41f7ee529f7f4fdcc1bc1157234bac0766 (diff)
[PATCH] Add ide_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 9b2ebd219ad0..ef09a7ef2396 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -3256,9 +3256,8 @@ sector_t ide_cdrom_capacity (ide_drive_t *drive)
3256} 3256}
3257#endif 3257#endif
3258 3258
3259static int ide_cd_remove(struct device *dev) 3259static void ide_cd_remove(ide_drive_t *drive)
3260{ 3260{
3261 ide_drive_t *drive = to_ide_device(dev);
3262 struct cdrom_info *info = drive->driver_data; 3261 struct cdrom_info *info = drive->driver_data;
3263 3262
3264 ide_unregister_subdriver(drive, info->driver); 3263 ide_unregister_subdriver(drive, info->driver);
@@ -3266,8 +3265,6 @@ static int ide_cd_remove(struct device *dev)
3266 del_gendisk(info->disk); 3265 del_gendisk(info->disk);
3267 3266
3268 ide_cd_put(info); 3267 ide_cd_put(info);
3269
3270 return 0;
3271} 3268}
3272 3269
3273static void ide_cd_release(struct kref *kref) 3270static void ide_cd_release(struct kref *kref)
@@ -3291,7 +3288,7 @@ static void ide_cd_release(struct kref *kref)
3291 kfree(info); 3288 kfree(info);
3292} 3289}
3293 3290
3294static int ide_cd_probe(struct device *); 3291static int ide_cd_probe(ide_drive_t *);
3295 3292
3296#ifdef CONFIG_PROC_FS 3293#ifdef CONFIG_PROC_FS
3297static int proc_idecd_read_capacity 3294static int proc_idecd_read_capacity
@@ -3317,9 +3314,9 @@ static ide_driver_t ide_cdrom_driver = {
3317 .owner = THIS_MODULE, 3314 .owner = THIS_MODULE,
3318 .name = "ide-cdrom", 3315 .name = "ide-cdrom",
3319 .bus = &ide_bus_type, 3316 .bus = &ide_bus_type,
3320 .probe = ide_cd_probe,
3321 .remove = ide_cd_remove,
3322 }, 3317 },
3318 .probe = ide_cd_probe,
3319 .remove = ide_cd_remove,
3323 .version = IDECD_VERSION, 3320 .version = IDECD_VERSION,
3324 .media = ide_cdrom, 3321 .media = ide_cdrom,
3325 .supports_dsc_overlap = 1, 3322 .supports_dsc_overlap = 1,
@@ -3413,9 +3410,8 @@ static char *ignore = NULL;
3413module_param(ignore, charp, 0400); 3410module_param(ignore, charp, 0400);
3414MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); 3411MODULE_DESCRIPTION("ATAPI CD-ROM Driver");
3415 3412
3416static int ide_cd_probe(struct device *dev) 3413static int ide_cd_probe(ide_drive_t *drive)
3417{ 3414{
3418 ide_drive_t *drive = to_ide_device(dev);
3419 struct cdrom_info *info; 3415 struct cdrom_info *info;
3420 struct gendisk *g; 3416 struct gendisk *g;
3421 struct request_sense sense; 3417 struct request_sense sense;