diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-11-12 03:13:30 (GMT) |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-20 02:46:29 (GMT) |
commit | b8f70badb8cd7c928f7e076b6143aeb66fe13c8b (patch) | |
tree | 09a34598646ee8dd8c988983e6e1917487bc0665 /drivers/mtd/redboot.c | |
parent | b9eab01125bf3cb6f5fbab1811402d16c9fcf4ec (diff) | |
download | linux-b8f70badb8cd7c928f7e076b6143aeb66fe13c8b.tar.xz |
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/redboot.c')
-rw-r--r-- | drivers/mtd/redboot.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 5da911e..11c3447 100644 --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c @@ -290,28 +290,13 @@ static int parse_redboot_partitions(struct mtd_info *master, } static struct mtd_part_parser redboot_parser = { - .owner = THIS_MODULE, .parse_fn = parse_redboot_partitions, .name = "RedBoot", }; +module_mtd_part_parser(redboot_parser); /* mtd parsers will request the module by parser name */ MODULE_ALIAS("RedBoot"); - -static int __init redboot_parser_init(void) -{ - register_mtd_parser(&redboot_parser); - return 0; -} - -static void __exit redboot_parser_exit(void) -{ - deregister_mtd_parser(&redboot_parser); -} - -module_init(redboot_parser_init); -module_exit(redboot_parser_exit); - MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); MODULE_DESCRIPTION("Parsing code for RedBoot Flash Image System (FIS) tables"); |