diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/uhid.c | 13 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 15 | ||||
-rw-r--r-- | drivers/s390/char/sclp_ctl.c | 19 | ||||
-rw-r--r-- | drivers/vhost/test.c | 13 |
4 files changed, 5 insertions, 55 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 99ec3ff7563b..7f8ff39ed44b 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -779,19 +779,8 @@ static struct miscdevice uhid_misc = { .minor = UHID_MINOR, .name = UHID_NAME, }; +module_misc_device(uhid_misc); -static int __init uhid_init(void) -{ - return misc_register(&uhid_misc); -} - -static void __exit uhid_exit(void) -{ - misc_deregister(&uhid_misc); -} - -module_init(uhid_init); -module_exit(uhid_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Herrmann <dh.herrmann@gmail.com>"); MODULE_DESCRIPTION("User-space I/O driver support for HID subsystem"); diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 65ebbd111702..92595b98e7ed 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -1013,23 +1013,12 @@ static struct miscdevice uinput_misc = { .minor = UINPUT_MINOR, .name = UINPUT_NAME, }; +module_misc_device(uinput_misc); + MODULE_ALIAS_MISCDEV(UINPUT_MINOR); MODULE_ALIAS("devname:" UINPUT_NAME); -static int __init uinput_init(void) -{ - return misc_register(&uinput_misc); -} - -static void __exit uinput_exit(void) -{ - misc_deregister(&uinput_misc); -} - MODULE_AUTHOR("Aristeu Sergio Rozanski Filho"); MODULE_DESCRIPTION("User level driver support for input subsystem"); MODULE_LICENSE("GPL"); MODULE_VERSION("0.3"); - -module_init(uinput_init); -module_exit(uinput_exit); diff --git a/drivers/s390/char/sclp_ctl.c b/drivers/s390/char/sclp_ctl.c index ea607a4a1bdd..554eaa1e347d 100644 --- a/drivers/s390/char/sclp_ctl.c +++ b/drivers/s390/char/sclp_ctl.c @@ -126,21 +126,4 @@ static struct miscdevice sclp_ctl_device = { .name = "sclp", .fops = &sclp_ctl_fops, }; - -/* - * Register sclp_ctl misc device - */ -static int __init sclp_ctl_init(void) -{ - return misc_register(&sclp_ctl_device); -} -module_init(sclp_ctl_init); - -/* - * Deregister sclp_ctl misc device - */ -static void __exit sclp_ctl_exit(void) -{ - misc_deregister(&sclp_ctl_device); -} -module_exit(sclp_ctl_exit); +module_misc_device(sclp_ctl_device); diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 388eec4e1a90..70c342c987f7 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -322,18 +322,7 @@ static struct miscdevice vhost_test_misc = { "vhost-test", &vhost_test_fops, }; - -static int vhost_test_init(void) -{ - return misc_register(&vhost_test_misc); -} -module_init(vhost_test_init); - -static void vhost_test_exit(void) -{ - misc_deregister(&vhost_test_misc); -} -module_exit(vhost_test_exit); +module_misc_device(vhost_test_misc); MODULE_VERSION("0.0.1"); MODULE_LICENSE("GPL v2"); |