summaryrefslogtreecommitdiff
path: root/drivers/mtd/afs.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-11-11 19:13:30 -0800
committerBrian Norris <computersforpeace@gmail.com>2015-11-19 18:46:29 -0800
commitb8f70badb8cd7c928f7e076b6143aeb66fe13c8b (patch)
tree09a34598646ee8dd8c988983e6e1917487bc0665 /drivers/mtd/afs.c
parentb9eab01125bf3cb6f5fbab1811402d16c9fcf4ec (diff)
mtd: kill off MTD partition parser boilerplate
Most parsers can be handled with our new boilerplate-reducing macro. There are a few that can't be (cmdlineparts and ofpart). Also kill off the owner assignments, since register_mtd_parser() now takes care of that. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/afs.c')
-rw-r--r--drivers/mtd/afs.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index a1eea50ce180..e02dae3b739b 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -256,25 +256,10 @@ static int parse_afs_partitions(struct mtd_info *mtd,
}
static struct mtd_part_parser afs_parser = {
- .owner = THIS_MODULE,
.parse_fn = parse_afs_partitions,
.name = "afs",
};
-
-static int __init afs_parser_init(void)
-{
- register_mtd_parser(&afs_parser);
- return 0;
-}
-
-static void __exit afs_parser_exit(void)
-{
- deregister_mtd_parser(&afs_parser);
-}
-
-module_init(afs_parser_init);
-module_exit(afs_parser_exit);
-
+module_mtd_part_parser(afs_parser);
MODULE_AUTHOR("ARM Ltd");
MODULE_DESCRIPTION("ARM Firmware Suite partition parser");