finish modularization of ofpart parser
Subsystems (2)
cover finish modularization of ofpart parser
To fix building of kernel if MTD is selected as a module and OF_PARTS is selected, finish modularization of ofpart MTD partition parser.
The following changes since commit 81e49819e7d6c11c91702d6b4d9fc71255614488:
mtd: spelling, capitalization, uniformity (2011-06-24 22:58:01 +0300)
are available in the git repository at:
git://git.infradead.org/users/dbaryshkov/mtd-cleanup.git mtd-big-cleanup
Dmitry Eremin-Solenikov (2):
mtd: make ofpart buildable as a separate module mtd/ofpart: add ofoldpart alias
drivers/mtd/Kconfig | 3 ++- drivers/mtd/Makefile | 2 +- drivers/mtd/ofpart.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 1/2 mtd: make ofpart buildable as a separate module
As ofpart now uses a standard mtd partitions parser interface, make it buildable as a separate module. Also provide MODULE_DESCRIPTION and MODULE_AUTHOR for this module.
--- drivers/mtd/Kconfig | 3 ++- drivers/mtd/Makefile | 2 +- drivers/mtd/ofpart.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/mtd/Kconfig +2 -1
@@ -137,7 +137,8 @@ config MTD_AFS_PARTS 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example. config MTD_OF_PARTS - def_bool y + tristate "OpenFirmware partitioning information support" + default Y depends on OF help This provides a partition parsing function which derives
drivers/mtd/Makefile +1 -1
@@ -5,8 +5,8 @@ # Core functionality. obj-$(CONFIG_MTD) += mtd.o mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o -mtd-$(CONFIG_MTD_OF_PARTS) += ofpart.o +obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
drivers/mtd/ofpart.c +2 -0
@@ -174,3 +174,5 @@ out:module_init (ofpart_parser_init);MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree" ); +MODULE_AUTHOR ("Vitaly Wool, David Gibson" );
Signature · 6 lines
1.7.5.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/2] mtd: make ofpart buildable as a separate module
Quoted 5 lines · On Mon, 27 Jun 2011 01:02:59 +0400 Dmitry Eremin-Solenikov wrote:
As ofpart now uses a standard mtd partitions parser interface, make it buildable as a separate module. Also provide
MODULE_DESCRIPTIONandMODULE_AUTHORfor this module.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
Thanks.
Quoted 40 lines
--- drivers/mtd/Kconfig | 3 ++- drivers/mtd/Makefile | 2 +- drivers/mtd/ofpart.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-)drivers/mtd/Kconfig +2
-1@@ -137,7 +137,8 @@ config MTD_AFS_PARTS 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example. config MTD_OF_PARTS - def_bool y + tristate "OpenFirmware partitioning information support" + default Y depends on OF help This provides a partition parsing function which derivesdrivers/mtd/Makefile +1
-1@@ -5,8 +5,8 @@ # Core functionality. obj-$(CONFIG_MTD) += mtd.o mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o -mtd-$(CONFIG_MTD_OF_PARTS) += ofpart.o +obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.odrivers/mtd/ofpart.c +0
-0
drivers/mtd/ofpart.c out: · line 178
Quoted 5 lines
drivers/mtd/ofpart.c +2
-0@@ -174,3 +174,5 @@ out:module_init (ofpart_parser_init);MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree" ); +MODULE_AUTHOR ("Vitaly Wool, David Gibson" );
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/2] mtd: make ofpart buildable as a separate module
In reply to Dmitry Eremin-SolenikovQuoted 5 lines · Dmitry Eremin-Solenikov
As ofpart now uses a standard mtd partitions parser interface, make it buildable as a separate module. Also provide
MODULE_DESCRIPTIONandMODULE_AUTHORfor this module.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
Pushed this one to l2-mtd-2.6.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH 2/2 mtd/ofpart: add ofoldpart alias
In reply to Dmitry Eremin-Solenikovofpart.ko also provides ofoldpart MTD parser. Add respective MODULE_ALIAS("ofoldpart"); declaration.
--- drivers/mtd/ofpart.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mtd/ofpart.c +1 -0
@@ -176,3 +176,4 @@ module_init(ofpart_parser_init);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree" );MODULE_AUTHOR ("Vitaly Wool, David Gibson" ); +MODULE_ALIAS ("ofoldpart" );
Signature · 6 lines
1.7.5.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
Quoted 4 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
Is MODULE_ALIAS actually necessary for what is essentially a library module? I though MODULE_ALIAS was only needed to trigger loading a module for specific hardware. In this case, the module should be autoloaded when another module needs it. I may be misinformed though, my module-foo is a little rusty.
g.
Quoted 17 lines
---
drivers/mtd/ofpart.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/mtd/ofpart.c +1
-1@@ -176,3 +176,4 @@ module_init(ofpart_parser_init); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Parser for MTD partitioning information in device tree"); MODULE_AUTHOR("Vitaly Wool, David Gibson"); +MODULE_ALIAS ("ofoldpart" ); --1.7.5.4
Signature · 6 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
In reply to Dmitry Eremin-SolenikovQuoted 3 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.
Why we need the alias?
Signature · 2 lines
Best Regards, Artem Bityutskiy
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
Quoted 6 lines · Artem Bityutskiy
Quoted 3 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.Why we need the alias?
Please check the parse_mtd_partitions code. If requested parser isn't registered, it tries to load corresponding module. So, this alias is necessary in the semi-bogus case when one will have the list of parsers containing ofoldpart, but not ofpart partition parser.
Signature · 6 lines
With best wishes Dmitry ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
Quoted 6 lines · Dmitry Eremin-Solenikov
Quoted 5 lines · Artem Bityutskiy
Quoted 3 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.
Quoted 6 lines
Quoted 1 line
Why we need the alias?
Please check the
parse_mtd_partitionscode. If requested parser isn't registered, it tries to load corresponding module. So, this alias is necessary in the semi-bogus case when one will have the list of parsers containing ofoldpart, but not ofpart partition parser.
Fair enough, but would you please prepend MODULE_ALIAS with a comment like this which explains why we need the alias?
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH 2/2 mtd/ofpart: add ofoldpart alias
ofpart.ko also provides ofoldpart MTD parser. Add respective MODULE_ALIAS("ofoldpart"); declaration.
--- drivers/mtd/ofpart.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/ofpart.c +3 -0
@@ -176,3 +176,6 @@ module_init(ofpart_parser_init);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree" );MODULE_AUTHOR ("Vitaly Wool, David Gibson" ); +/* Required so that this module will be picked up ofoldpart +* MTD partition information parser */ +MODULE_ALIAS ("ofoldpart" );
Signature · 6 lines
1.7.5.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
Quoted 13 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>--- drivers/mtd/ofpart.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/mtd/ofpart.c +0
-0
drivers/mtd/ofpart.c module_init(ofpart_parser_init); · line 181
Quoted 6 lines
drivers/mtd/ofpart.c +3
-0@@ -176,3 +176,6 @@ module_init(ofpart_parser_init);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree" );MODULE_AUTHOR ("Vitaly Wool, David Gibson" ); +/* Required so that this module will be picked up ofoldpart +* MTD partition information parser */ +MODULE_ALIAS ("ofoldpart" );
Well, the codyng style documents how multi-line comments should look like... And this comment is less readable than your previous explanation... But I've fixed this myself and pushed to my tree, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
Re: [PATCH 2/2] mtd/ofpart: add ofoldpart alias
Quoted 9 lines · Artem Bityutskiy
Quoted 8 lines · Dmitry Eremin-Solenikov
ofpart.ko also provides ofoldpart MTD parser. Add respective
MODULE_ALIAS("ofoldpart"); declaration.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>--- drivers/mtd/ofpart.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 16 lines
drivers/mtd/ofpart.c module_init(ofpart_parser_init); · line 181
Quoted 12 lines
drivers/mtd/ofpart.c +3
-0@@ -176,3 +176,6 @@ module_init(ofpart_parser_init);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Parser for MTD partitioning information in device tree");MODULE_AUTHOR ("Vitaly Wool, David Gibson" ); +/* Required so that this module will be picked up ofoldpart +* MTD partition information parser */ +MODULE_ALIAS ("ofoldpart" );Well, the codyng style documents how multi-line comments should look like... And this comment is less readable than your previous explanation... But I've fixed this myself and pushed to my tree, thanks!
It seems I've got "All work and no play makes Jack a dull boy" sindrom...
Signature · 6 lines
With best wishes Dmitry ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/