Commit 20deab8b authored by Li Zetao's avatar Li Zetao Committed by Greg Kroah-Hartman

usb: core: Use module_led_trigger macro to simplify the code

Use the module_led_trigger macro to simplify the code, which is the
same as declaring with module_init() and module_exit().
Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230815074648.1015175-1-lizetao1@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1fa206bb
......@@ -350,18 +350,7 @@ static struct led_trigger usbport_led_trigger = {
.deactivate = usbport_trig_deactivate,
};
static int __init usbport_trig_init(void)
{
return led_trigger_register(&usbport_led_trigger);
}
static void __exit usbport_trig_exit(void)
{
led_trigger_unregister(&usbport_led_trigger);
}
module_init(usbport_trig_init);
module_exit(usbport_trig_exit);
module_led_trigger(usbport_led_trigger);
MODULE_AUTHOR("Rafał Miłecki <rafal@milecki.pl>");
MODULE_DESCRIPTION("USB port trigger");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment