diff options
-rw-r--r-- | drivers/xen/xenbus/xenbus_dev_backend.c | 13 | ||||
-rw-r--r-- | drivers/xen/xenbus/xenbus_dev_frontend.c | 13 |
2 files changed, 4 insertions, 22 deletions
diff --git a/drivers/xen/xenbus/xenbus_dev_backend.c b/drivers/xen/xenbus/xenbus_dev_backend.c index ee6d9efd7b76..4a41ac9af966 100644 --- a/drivers/xen/xenbus/xenbus_dev_backend.c +++ b/drivers/xen/xenbus/xenbus_dev_backend.c @@ -5,7 +5,7 @@ #include <linux/mm.h> #include <linux/fs.h> #include <linux/miscdevice.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/capability.h> #include <xen/xen.h> @@ -18,8 +18,6 @@ #include "xenbus_comms.h" -MODULE_LICENSE("GPL"); - static int xenbus_backend_open(struct inode *inode, struct file *filp) { if (!capable(CAP_SYS_ADMIN)) @@ -132,11 +130,4 @@ static int __init xenbus_backend_init(void) pr_err("Could not register xenbus backend device\n"); return err; } - -static void __exit xenbus_backend_exit(void) -{ - misc_deregister(&xenbus_backend_dev); -} - -module_init(xenbus_backend_init); -module_exit(xenbus_backend_exit); +device_initcall(xenbus_backend_init); diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 9433e46518c8..8c0a359ab4a8 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -55,7 +55,7 @@ #include <linux/string.h> #include <linux/slab.h> #include <linux/miscdevice.h> -#include <linux/module.h> +#include <linux/init.h> #include "xenbus_comms.h" @@ -63,8 +63,6 @@ #include <xen/xen.h> #include <asm/xen/hypervisor.h> -MODULE_LICENSE("GPL"); - /* * An element of a list of outstanding transactions, for which we're * still waiting a reply. @@ -624,11 +622,4 @@ static int __init xenbus_init(void) pr_err("Could not register xenbus frontend device\n"); return err; } - -static void __exit xenbus_exit(void) -{ - misc_deregister(&xenbus_dev); -} - -module_init(xenbus_init); -module_exit(xenbus_exit); +device_initcall(xenbus_init); |