projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dd8b55
)
mtd: rfd_ftl: Use module_mtd_blktrans to register driver
author
Dejin Zheng
<zhengdejin5@gmail.com>
Sat, 13 Feb 2021 16:46:00 +0000
(
00:46
+0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Thu, 11 Mar 2021 08:37:49 +0000
(09:37 +0100)
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-9-zhengdejin5@gmail.com
drivers/mtd/rfd_ftl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/rfd_ftl.c
b/drivers/mtd/rfd_ftl.c
index 3d1df82fa105f13900750aa3db0a4bfe493c4142..cce3bf6f99b4ad6d5165102ff7209ce4968d2e6c 100644
(file)
--- a/
drivers/mtd/rfd_ftl.c
+++ b/
drivers/mtd/rfd_ftl.c
@@
-794,18
+794,7
@@
static struct mtd_blktrans_ops rfd_ftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_rfd_ftl(void)
-{
- return register_mtd_blktrans(&rfd_ftl_tr);
-}
-
-static void __exit cleanup_rfd_ftl(void)
-{
- deregister_mtd_blktrans(&rfd_ftl_tr);
-}
-
-module_init(init_rfd_ftl);
-module_exit(cleanup_rfd_ftl);
+module_mtd_blktrans(rfd_ftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sean Young <sean@mess.org>");