Skip to contentSkip to conversation

Few additional cleanup patches

PATCH Applied Dmitry Eremin-Solenikov 2 participants 7 messages Jun 23, 2011 – Jun 24, 2011

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/5 mtd/maps: drop edb7312 support

In reply to Dmitry Eremin-Solenikov

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
index 46eca3b..891a9e6 100644
@@ -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
index d6379fe..45dcb8b 100644
@@ -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
#3 lore raw

PATCH 3/5 mtd: hide parse_mtd_partitions

In reply to Dmitry Eremin-Solenikov

There 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
index 0ed6126..7e7d1a3b 100644
@@ -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
index 9e8ee05..6997c6c 100644
@@ -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
index a8a961a..c98d6b8 100644
@@ -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
#2 lore raw

PATCH 2/5 mtd/nand: drop edb7312 support

In reply to Dmitry Eremin-Solenikov

EDB7312 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
index 4c34252..17235d0 100644
@@ -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
index 5745d83..c9334e9 100644
@@ -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
#4 lore raw

PATCH 4/5 mtd: remove put_partition_parser() from public header

In reply to Dmitry Eremin-Solenikov

There 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
index 6997c6c..c90b7ba 100644
@@ -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
index c98d6b8..2475228 100644
@@ -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
#5 lore raw

PATCH 5/5 mtd: drop mtd_device_register

In reply to Dmitry Eremin-Solenikov

mtd_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
index e186399..f9cc2d2 100644
@@ -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
index b2b454b..67774f9 100644
@@ -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
#0 lore raw

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
#6 lore raw
Quoted 7 lines · Dmitry Eremin-Solenikov

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

Quoted 6 lines

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

Pushed to l2-mtd-2.6.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Битюцкий Артём)