diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:27 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:27 -0400 |
commit | 1e874f448365b80e69b8a60b8b575b17f00811f3 (patch) | |
tree | 6a79a12ffdcaa12f5f89356527c1ab02014c751b /drivers/ide/ide-floppy.c | |
parent | 3ceca727fe3a38dd8d7a3adf938fefda83eee8af (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-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index b0f4d8459a9d..597459c81d5f 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -1061,6 +1061,8 @@ static void idefloppy_setup(ide_drive_t *drive, idefloppy_floppy_t *floppy) | |||
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | (void) ide_floppy_get_capacity(drive); | 1063 | (void) ide_floppy_get_capacity(drive); |
1064 | |||
1065 | ide_proc_register_driver(drive, floppy->driver); | ||
1064 | idefloppy_add_settings(drive); | 1066 | idefloppy_add_settings(drive); |
1065 | } | 1067 | } |
1066 | 1068 | ||
@@ -1413,8 +1415,6 @@ static int ide_floppy_probe(ide_drive_t *drive) | |||
1413 | 1415 | ||
1414 | ide_init_disk(g, drive); | 1416 | ide_init_disk(g, drive); |
1415 | 1417 | ||
1416 | ide_proc_register_driver(drive, &idefloppy_driver); | ||
1417 | |||
1418 | kref_init(&floppy->kref); | 1418 | kref_init(&floppy->kref); |
1419 | 1419 | ||
1420 | floppy->drive = drive; | 1420 | floppy->drive = drive; |