From eb446ef625bcff969f3e1d3a6874ce9d56113e9b Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Fri, 25 Oct 2019 19:39:29 +0200 Subject: cmd: nand/sf: isolate legacy code The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack. This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c. Signed-off-by: Miquel Raynal [trini: Don't export get_part function now] Signed-off-by: Tom Rini --- include/linux/mtd/mtd.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index e3549f0a46..ceffd994de 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -588,12 +588,6 @@ struct mtd_info *__mtd_next_device(int i); (mtd) != NULL; \ (mtd) = __mtd_next_device(mtd->index + 1)) -int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size, - loff_t *maxsize, int devtype, uint64_t chipsize); -int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off, - loff_t *size, loff_t *maxsize, int devtype, - uint64_t chipsize); - /* drivers/mtd/mtdcore.c */ void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset, const uint64_t length, uint64_t *len_incl_bad, -- cgit