summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:27 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:27 +0200
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 6e1a25e61df..5fc4213437a 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) { ; }
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)
@@ -1151,8 +1153,6 @@ static int ide_disk_probe(ide_drive_t *drive)
ide_init_disk(g, drive);
- ide_proc_register_driver(drive, &idedisk_driver);
-
kref_init(&idkp->kref);
idkp->drive = drive;