cd->devinfo.handle = NULL;
return 1;
}
+
+ ide_proc_register_driver(drive, cd->driver);
ide_cdrom_add_settings(drive);
return 0;
}
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &ide_cdrom_driver);
-
kref_init(&info->kref);
info->drive = drive;
g->driverfs_dev = &drive->gendev;
g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE;
if (ide_cdrom_setup(drive)) {
- ide_proc_unregister_driver(drive, &ide_cdrom_driver);
ide_cd_release(&info->kref);
goto failed;
}
static void idedisk_setup(ide_drive_t *drive)
{
+ struct ide_disk_obj *idkp = drive->driver_data;
ide_hwif_t *hwif = drive->hwif;
u16 *id = drive->id;
char *m = (char *)&id[ATA_ID_PROD];
unsigned long long capacity;
+ ide_proc_register_driver(drive, idkp->driver);
idedisk_add_settings(drive);
if (drive->id_read == 0)
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &idedisk_driver);
-
kref_init(&idkp->kref);
idkp->drive = drive;
}
(void) ide_floppy_get_capacity(drive);
+
+ ide_proc_register_driver(drive, floppy->driver);
idefloppy_add_settings(drive);
}
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &idefloppy_driver);
-
kref_init(&floppy->kref);
floppy->drive = drive;
tape->best_dsc_rw_freq * 1000 / HZ,
drive->using_dma ? ", DMA":"");
+ ide_proc_register_driver(drive, tape->driver);
idetape_add_settings(drive);
}
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &idetape_driver);
-
kref_init(&tape->kref);
tape->drive = drive;
drive->pc_callback = ide_scsi_callback;
+ ide_proc_register_driver(drive, scsi->driver);
idescsi_add_settings(drive);
}
idescsi->host = host;
idescsi->disk = g;
g->private_data = &idescsi->driver;
- ide_proc_register_driver(drive, &idescsi_driver);
err = 0;
idescsi_setup(drive, idescsi);
g->fops = &idescsi_ops;