Few additional cleanup patches
Subsystems (2)
cover Few additional cleanup patches
The following changes since commit 8c2ce1c78ba6cce94d0dfe6c674ea6c0cba56899:
mtd: socrates_nand.c: use mtd_device_parse_register (2011-06-23 10:43:39 +0300)
are available in the git repository at:
git://git.infradead.org/users/dbaryshkov/mtd-cleanup.git mtd-big-cleanup
Dmitry Eremin-Solenikov (5):
mtd/maps: drop edb7312 support
mtd/nand: drop edb7312 support
mtd: hide parse_mtd_partitions
mtd: remove put_partition_parser() from public header
mtd: drop mtd_device_register
drivers/mtd/maps/Kconfig | 7 -- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/edb7312.c | 135 ---------------------------- drivers/mtd/mtdcore.c | 23 ----- drivers/mtd/mtdcore.h | 4 + drivers/mtd/mtdpart.c | 3 +- drivers/mtd/nand/Kconfig | 7 -- drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/edb7312.c | 188 ---------------------------------------- include/linux/mtd/mtd.h | 5 +- include/linux/mtd/partitions.h | 5 - 11 files changed, 8 insertions(+), 371 deletions(-) delete mode 100644 drivers/mtd/maps/edb7312.c delete mode 100644 drivers/mtd/nand/edb7312.c
PATCH 1/5 mtd/maps: drop edb7312 support
EDB7312 isn't supported by mainline kernel, this driver wasn't working before recent fixes, the same functionality can be achieved via physmap, so drop it now. If the board support will ever be submitted to mainline, one either can revert this commit, or use physmap mtd map driver.
--- drivers/mtd/maps/Kconfig | 7 -- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/edb7312.c | 135 -------------------------------------------- 3 files changed, 0 insertions(+), 143 deletions(-) delete mode 100644 drivers/mtd/maps/edb7312.c
drivers/mtd/maps/Kconfig +0 -7
@@ -392,13 +392,6 @@ config MTD_AUTCPU12 This enables access to the NV-RAM on autronix autcpu12 board. If you have such a board, say 'Y'. -config MTD_EDB7312 - tristate "CFI Flash device mapped on EDB7312" - depends on ARCH_EDB7312 && MTD_CFI - help - This enables access to the CFI Flash on the Cogent EDB7312 board. - If you have such a board, say 'Y' here. - config MTD_IMPA7 tristate "JEDEC Flash device mapped on impA7" depends on ARM && MTD_JEDECPROBE
drivers/mtd/maps/Makefile +0 -1
@@ -39,7 +39,6 @@ obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o obj-$(CONFIG_MTD_PCI) += pci.o obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o -obj-$(CONFIG_MTD_EDB7312) += edb7312.o obj-$(CONFIG_MTD_IMPA7) += impa7.o obj-$(CONFIG_MTD_FORTUNET) += fortunet.o obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
drivers/mtd/maps/edb7312.c deleted +0 -135
135 lines not on this page · raw message
Signature · 1 line
1.7.5.3
PATCH 2/5 mtd/nand: drop edb7312 support
In reply to Dmitry Eremin-SolenikovEDB7312 isn't supported by mainline kernel, so drop it now. If the board support will ever be submitted to mainline, one can revert this commit.
--- drivers/mtd/nand/Kconfig | 7 -- drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/edb7312.c | 188 -------------------------------------------- 3 files changed, 0 insertions(+), 196 deletions(-) delete mode 100644 drivers/mtd/nand/edb7312.c
drivers/mtd/nand/Kconfig +0 -7
@@ -83,13 +83,6 @@ config MTD_NAND_DENALI_SCRATCH_REG_ADDR scratch register here to enable this feature. On Intel Moorestown boards, the scratch register is at 0xFF108018. -config MTD_NAND_EDB7312 - tristate "Support for Cirrus Logic EBD7312 evaluation board" - depends on ARCH_EDB7312 - help - This enables the driver for the Cirrus Logic EBD7312 evaluation - board to access the onboard NAND Flash. - config MTD_NAND_H1900 tristate "iPAQ H1900 flash" depends on ARCH_PXA
drivers/mtd/nand/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-$(CONFIG_MTD_NAND_SPIA) += spia.o obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o obj-$(CONFIG_MTD_NAND_DENALI) += denali.o -obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o obj-$(CONFIG_MTD_NAND_PPCHAMELEONEVB) += ppchameleonevb.o
drivers/mtd/nand/edb7312.c deleted +0 -188
188 lines not on this page · raw message
Signature · 1 line
1.7.5.3
PATCH 3/5 mtd: hide parse_mtd_partitions
In reply to Dmitry Eremin-SolenikovThere is no need to export parse_mtd_partitions() now , as it's fully handled by registration functions. So move the definition to private header and remove respective EXPORT_SYMBOL_GPL.
--- drivers/mtd/mtdcore.h | 4 ++++ drivers/mtd/mtdpart.c | 1 - include/linux/mtd/partitions.h | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/mtdcore.h +4 -0
@@ -15,8 +15,12 @@ extern int del_mtd_device(struct mtd_info *mtd);extern int add_mtd_partitions (struct mtd_info *,const struct mtd_partition *,int );extern int del_mtd_partitions (struct mtd_info *); +extern int parse_mtd_partitions (struct mtd_info *master,const char **types, +struct mtd_partition **pparts, +struct mtd_part_parser_data *data);#define mtd_for_each_device (mtd) \ for ((mtd) = __mtd_next_device(0); \ (mtd) != NULL; \ (mtd) = __mtd_next_device(mtd->index + 1)) +
drivers/mtd/mtdpart.c +0 -1
@@ -778,7 +778,6 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types, }return ret; } -EXPORT_SYMBOL_GPL (parse_mtd_partitions);int mtd_is_partition (struct mtd_info *mtd) {
include/linux/mtd/partitions.h +0 -3
@@ -78,9 +78,6 @@ struct mtd_part_parser {extern int register_mtd_parser (struct mtd_part_parser *parser);extern int deregister_mtd_parser (struct mtd_part_parser *parser); -extern int parse_mtd_partitions (struct mtd_info *master,const char **types, -struct mtd_partition **pparts, -struct mtd_part_parser_data *data);#define put_partition_parser (p) do { module_put((p)->owner); } while(0)
Signature · 1 line
1.7.5.3
PATCH 4/5 mtd: remove put_partition_parser() from public header
In reply to Dmitry Eremin-SolenikovThere is no need to pollute public header with a definition private to mtdpart.c. Move it from mtd/partitions.h to mtdpart.c
--- drivers/mtd/mtdpart.c | 2 ++ include/linux/mtd/partitions.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdpart.c +2 -0
@@ -706,6 +706,8 @@ static struct mtd_part_parser *get_partition_parser(const char *name)return ret; } +#define put_partition_parser (p) do { module_put((p)->owner); } while (0) +int register_mtd_parser (struct mtd_part_parser *p) {spin_lock (&part_parser_lock);
include/linux/mtd/partitions.h +0 -2
@@ -79,8 +79,6 @@ struct mtd_part_parser {extern int register_mtd_parser (struct mtd_part_parser *parser);extern int deregister_mtd_parser (struct mtd_part_parser *parser); -#define put_partition_parser (p) do { module_put((p)->owner); } while(0) -int mtd_is_partition (struct mtd_info *mtd);int mtd_add_partition (struct mtd_info *master,char *name,long long offset,long long length);
Signature · 1 line
1.7.5.3
PATCH 5/5 mtd: drop mtd_device_register
In reply to Dmitry Eremin-Solenikovmtd_device_register() is a limited version of mtd_device_parse_register. Replace it with macro calling mtd_device_parse_register().
--- drivers/mtd/mtdcore.c | 23 ----------------------- include/linux/mtd/mtd.h | 5 ++--- 2 files changed, 2 insertions(+), 26 deletions(-)
drivers/mtd/mtdcore.c +0 -23
@@ -429,29 +429,6 @@ out_error: }/** -* mtd_device_register - register an MTD device. -* -* @master: the MTD device to register -* @parts: the partitions to register - only valid if nr_parts > 0 -* @nr_parts: the number of partitions in parts. If zero then the full MTD -* device is registered -* -* Register an MTD device with the system and optionally, a number of -* partitions. If nr_parts is 0 then the whole device is registered, otherwise -* only the partitions are registered. To register both the full device *and* -* the partitions, call mtd_device_register() twice, once with nr_parts == 0 -* and once equal to the number of partitions. -*/ -int mtd_device_register (struct mtd_info *master, -const struct mtd_partition *parts, -int nr_parts) -{ -return parts ?add_mtd_partitions (master, parts, nr_parts) : -add_mtd_device (master); -} -EXPORT_SYMBOL_GPL (mtd_device_register); - -/** * mtd_device_parse_register - parse partitions and register an MTD device. * * @mtd: the MTD device to register
include/linux/mtd/mtd.h +2 -3
@@ -325,14 +325,13 @@ static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)struct mtd_partition ;struct mtd_part_parser_data ; -extern int mtd_device_register (struct mtd_info *master, -const struct mtd_partition *parts, -int nr_parts);extern int mtd_device_parse_register (struct mtd_info *mtd,const char **part_probe_types,struct mtd_part_parser_data *parser_data,const struct mtd_partition *defparts,int defnr_parts); +#define mtd_device_register (master, parts, nr_parts) \ + mtd_device_parse_register(master, NULL, NULL, parts, nr_parts)extern int mtd_device_unregister (struct mtd_info *master);extern struct mtd_info *get_mtd_device (struct mtd_info *mtd,int num);extern int __get_mtd_device (struct mtd_info *mtd);
Signature · 1 line
1.7.5.3
Artem Bityutskiy
AppliedQuoted 7 lines · Dmitry Eremin-Solenikov
The following changes since commit
8c2ce1c78ba6cce94d0dfe6c674ea6c0cba56899:mtd:
socrates_nand.c: usemtd_device_parse_register(2011-06-23 10:43:39 +0300)are available in the git repository at:
git://git.infradead.org/users/dbaryshkov/mtd-cleanup.gitmtd-big-cleanup
Quoted 6 lines
Dmitry Eremin-Solenikov (5):
mtd/maps: drop edb7312 support
mtd/nand: drop edb7312 support
mtd: hideparse_mtd_partitions
mtd: removeput_partition_parser()from public header
mtd: dropmtd_device_register
Pushed to l2-mtd-2.6.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy (Битюцкий Артём)