mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 08:35:19 -05:00
leds: uleds: Use module_misc_device macro to simplify the code
Use the module_misc_device macro to simplify the code, which is the same as declaring with module_init() and module_exit(). Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230815075944.1089298-3-lizetao1@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
74cd23e87d
commit
a916d720ab
1 changed files with 1 additions and 11 deletions
|
@ -209,17 +209,7 @@ static struct miscdevice uleds_misc = {
|
|||
.name = ULEDS_NAME,
|
||||
};
|
||||
|
||||
static int __init uleds_init(void)
|
||||
{
|
||||
return misc_register(&uleds_misc);
|
||||
}
|
||||
module_init(uleds_init);
|
||||
|
||||
static void __exit uleds_exit(void)
|
||||
{
|
||||
misc_deregister(&uleds_misc);
|
||||
}
|
||||
module_exit(uleds_exit);
|
||||
module_misc_device(uleds_misc);
|
||||
|
||||
MODULE_AUTHOR("David Lechner <david@lechnology.com>");
|
||||
MODULE_DESCRIPTION("Userspace driver for the LED subsystem");
|
||||
|
|
Loading…
Add table
Reference in a new issue