mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-20 11:34:02 +08:00
mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-6-zhengdejin5@gmail.com
This commit is contained in:
parent
27b08bf3c3
commit
b1f9604f4d
@ -67,18 +67,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int __init mtdblock_init(void)
|
||||
{
|
||||
return register_mtd_blktrans(&mtdblock_tr);
|
||||
}
|
||||
|
||||
static void __exit mtdblock_exit(void)
|
||||
{
|
||||
deregister_mtd_blktrans(&mtdblock_tr);
|
||||
}
|
||||
|
||||
module_init(mtdblock_init);
|
||||
module_exit(mtdblock_exit);
|
||||
module_mtd_blktrans(mtdblock_tr);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
|
||||
|
Loading…
Reference in New Issue
Block a user