aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/vmbus_drv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-12-12 12:29:17 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-12 17:26:50 -0500
commit93e5bd06a95343c701361fa009cdc5a653d6ec8e (patch)
treefe28f7a5ad3c009fbf8e197c94c74b444015630f /drivers/hv/vmbus_drv.c
parent8b8ee6753154dd6cfe397e0d29fe7f90a8adb50b (diff)
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.c11
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:
795 return ret; 795 return ret;
796} 796}
797 797
798static void __exit vmbus_exit(void)
799{
800
801 free_irq(irq, hv_acpi_dev);
802 vmbus_free_channels();
803 bus_unregister(&hv_bus);
804 hv_cleanup();
805 acpi_bus_unregister_driver(&vmbus_acpi_driver);
806}
807
798 808
799MODULE_LICENSE("GPL"); 809MODULE_LICENSE("GPL");
800MODULE_VERSION(HV_DRV_VERSION); 810MODULE_VERSION(HV_DRV_VERSION);
801 811
802subsys_initcall(hv_acpi_init); 812subsys_initcall(hv_acpi_init);
813module_exit(vmbus_exit);