aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.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-disk.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-disk.c')
-rw-r--r--drivers/ide/ide-disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 6e1a25e61df5..5fc4213437a5 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -782,11 +782,13 @@ static inline void idedisk_add_settings(ide_drive_t *drive) { ; }
782 782
783static void idedisk_setup(ide_drive_t *drive) 783static void idedisk_setup(ide_drive_t *drive)
784{ 784{
785 struct ide_disk_obj *idkp = drive->driver_data;
785 ide_hwif_t *hwif = drive->hwif; 786 ide_hwif_t *hwif = drive->hwif;
786 u16 *id = drive->id; 787 u16 *id = drive->id;
787 char *m = (char *)&id[ATA_ID_PROD]; 788 char *m = (char *)&id[ATA_ID_PROD];
788 unsigned long long capacity; 789 unsigned long long capacity;
789 790
791 ide_proc_register_driver(drive, idkp->driver);
790 idedisk_add_settings(drive); 792 idedisk_add_settings(drive);
791 793
792 if (drive->id_read == 0) 794 if (drive->id_read == 0)
@@ -1151,8 +1153,6 @@ static int ide_disk_probe(ide_drive_t *drive)
1151 1153
1152 ide_init_disk(g, drive); 1154 ide_init_disk(g, drive);
1153 1155
1154 ide_proc_register_driver(drive, &idedisk_driver);
1155
1156 kref_init(&idkp->kref); 1156 kref_init(&idkp->kref);
1157 1157
1158 idkp->drive = drive; 1158 idkp->drive = drive;