aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
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 }