mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 03:10:52 +07:00
usb: gadget: mass_storage: use module_usb_composite_driver to simplify the code
module_usb_composite_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
55ee1bf91d
commit
46b11a9112
@ -229,18 +229,8 @@ static struct usb_composite_driver msg_driver = {
|
||||
.unbind = msg_unbind,
|
||||
};
|
||||
|
||||
module_usb_composite_driver(msg_driver);
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_AUTHOR("Michal Nazarewicz");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static int __init msg_init(void)
|
||||
{
|
||||
return usb_composite_probe(&msg_driver);
|
||||
}
|
||||
module_init(msg_init);
|
||||
|
||||
static void __exit msg_cleanup(void)
|
||||
{
|
||||
usb_composite_unregister(&msg_driver);
|
||||
}
|
||||
module_exit(msg_cleanup);
|
||||
|
Loading…
Reference in New Issue
Block a user