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>
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 874e60f..f41983e 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2514,6 +2514,7 @@
tape->best_dsc_rw_freq * 1000 / HZ,
drive->using_dma ? ", DMA":"");
+ ide_proc_register_driver(drive, tape->driver);
idetape_add_settings(drive);
}
@@ -2669,8 +2670,6 @@
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &idetape_driver);
-
kref_init(&tape->kref);
tape->drive = drive;