Commit 6855036a authored by Tejun Heo's avatar Tejun Heo Committed by Bartlomiej Zolnierkiewicz

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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 82ab1eec
...@@ -73,3 +73,8 @@ void __init pnpide_init(void) ...@@ -73,3 +73,8 @@ void __init pnpide_init(void)
{ {
pnp_register_driver(&idepnp_driver); pnp_register_driver(&idepnp_driver);
} }
void __exit pnpide_exit(void)
{
pnp_unregister_driver(&idepnp_driver);
}
...@@ -1782,6 +1782,7 @@ done: ...@@ -1782,6 +1782,7 @@ done:
} }
extern void pnpide_init(void); extern void pnpide_init(void);
extern void pnpide_exit(void);
extern void h8300_ide_init(void); extern void h8300_ide_init(void);
/* /*
...@@ -2094,6 +2095,10 @@ void cleanup_module (void) ...@@ -2094,6 +2095,10 @@ void cleanup_module (void)
for (index = 0; index < MAX_HWIFS; ++index) for (index = 0; index < MAX_HWIFS; ++index)
ide_unregister(index); ide_unregister(index);
#ifdef CONFIG_BLK_DEV_IDEPNP
pnpide_exit();
#endif
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
proc_ide_destroy(); proc_ide_destroy();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment