diff options
author | 2011-12-12 09:29:17 -0800 | |
---|---|---|
committer | 2011-12-12 14:26:50 -0800 | |
commit | 93e5bd06a95343c701361fa009cdc5a653d6ec8e (patch) | |
tree | fe28f7a5ad3c009fbf8e197c94c74b444015630f /drivers/hv/vmbus_drv.c | |
parent | Drivers: hv: Fix a memory leak (diff) | |
download | linux-93e5bd06a95343c701361fa009cdc5a653d6ec8e.tar.gz linux-93e5bd06a95343c701361fa009cdc5a653d6ec8e.tar.bz2 linux-93e5bd06a95343c701361fa009cdc5a653d6ec8e.zip |
Drivers: hv: Make the vmbus driver unloadable
It turns out that the vmbus driver can be made unloadable. Make it
unloadable.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hv/vmbus_drv.c')
-rw-r--r-- | drivers/hv/vmbus_drv.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 40956d1c6608..c3875f72b5bf 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -795,8 +795,19 @@ cleanup: return ret; } +static void __exit vmbus_exit(void) +{ + + free_irq(irq, hv_acpi_dev); + vmbus_free_channels(); + bus_unregister(&hv_bus); + hv_cleanup(); + acpi_bus_unregister_driver(&vmbus_acpi_driver); +} + MODULE_LICENSE("GPL"); MODULE_VERSION(HV_DRV_VERSION); subsys_initcall(hv_acpi_init); +module_exit(vmbus_exit); |