aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:27 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:27 -0400
commit1e874f448365b80e69b8a60b8b575b17f00811f3 (patch)
tree6a79a12ffdcaa12f5f89356527c1ab02014c751b /drivers/ide/ide-cd.c
parent3ceca727fe3a38dd8d7a3adf938fefda83eee8af (diff)
ide: call ide_proc_register_driver() later
Call ide_proc_register_driver() in ide*_setup() (just before ide*_add_settings() call) instead of in ->probe method. Despite being basically a preparation for /proc/ide/hd*/settings rework this is a nice cleanup in itself. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 607af5de16f8..34a1aeaa15dd 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1924,6 +1924,8 @@ static int ide_cdrom_setup(ide_drive_t *drive)
1924 cd->devinfo.handle = NULL; 1924 cd->devinfo.handle = NULL;
1925 return 1; 1925 return 1;
1926 } 1926 }
1927
1928 ide_proc_register_driver(drive, cd->driver);
1927 ide_cdrom_add_settings(drive); 1929 ide_cdrom_add_settings(drive);
1928 return 0; 1930 return 0;
1929} 1931}
@@ -2134,8 +2136,6 @@ static int ide_cd_probe(ide_drive_t *drive)
2134 2136
2135 ide_init_disk(g, drive); 2137 ide_init_disk(g, drive);
2136 2138
2137 ide_proc_register_driver(drive, &ide_cdrom_driver);
2138
2139 kref_init(&info->kref); 2139 kref_init(&info->kref);
2140 2140
2141 info->drive = drive; 2141 info->drive = drive;
@@ -2150,7 +2150,6 @@ static int ide_cd_probe(ide_drive_t *drive)
2150 g->driverfs_dev = &drive->gendev; 2150 g->driverfs_dev = &drive->gendev;
2151 g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE; 2151 g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE;
2152 if (ide_cdrom_setup(drive)) { 2152 if (ide_cdrom_setup(drive)) {
2153 ide_proc_unregister_driver(drive, &ide_cdrom_driver);
2154 ide_cd_release(&info->kref); 2153 ide_cd_release(&info->kref);
2155 goto failed; 2154 goto failed;
2156 } 2155 }