diff options
author | Tejun Heo <htejun@gmail.com> | 2007-01-27 07:47:02 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-01-27 07:47:02 -0500 |
commit | 6855036aa035913bc2bfb31c41576a49f42ecd5f (patch) | |
tree | 7524fa60ef1a36ea6630a9b6613cb7099875569d /drivers/ide | |
parent | 82ab1eeceba6705cd5a8815c48eb03af1dada744 (diff) |
ide: unregister idepnp driver on unload
idepnp driver is registered as a pnp driver on ide init but doesn't
get unregistered on ide unload causing driver list corruption and
eventually oops. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-pnp.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index df7d1504f84e..98410ca044cf 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c | |||
@@ -73,3 +73,8 @@ void __init pnpide_init(void) | |||
73 | { | 73 | { |
74 | pnp_register_driver(&idepnp_driver); | 74 | pnp_register_driver(&idepnp_driver); |
75 | } | 75 | } |
76 | |||
77 | void __exit pnpide_exit(void) | ||
78 | { | ||
79 | pnp_unregister_driver(&idepnp_driver); | ||
80 | } | ||
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 16890769dca6..3b334af0c7b9 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1782,6 +1782,7 @@ done: | |||
1782 | } | 1782 | } |
1783 | 1783 | ||
1784 | extern void pnpide_init(void); | 1784 | extern void pnpide_init(void); |
1785 | extern void pnpide_exit(void); | ||
1785 | extern void h8300_ide_init(void); | 1786 | extern void h8300_ide_init(void); |
1786 | 1787 | ||
1787 | /* | 1788 | /* |
@@ -2094,6 +2095,10 @@ void cleanup_module (void) | |||
2094 | for (index = 0; index < MAX_HWIFS; ++index) | 2095 | for (index = 0; index < MAX_HWIFS; ++index) |
2095 | ide_unregister(index); | 2096 | ide_unregister(index); |
2096 | 2097 | ||
2098 | #ifdef CONFIG_BLK_DEV_IDEPNP | ||
2099 | pnpide_exit(); | ||
2100 | #endif | ||
2101 | |||
2097 | #ifdef CONFIG_PROC_FS | 2102 | #ifdef CONFIG_PROC_FS |
2098 | proc_ide_destroy(); | 2103 | proc_ide_destroy(); |
2099 | #endif | 2104 | #endif |