From a61ae81a1907af1987ad4c77300508327bc48b23 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 30 Oct 2015 20:33:25 -0700 Subject: mtd: nand: drop unnecessary partition parser data All of these drivers set up a parser data struct just to communicate DT partition data. This field has been deprecated and is instead supported by telling nand_scan_ident() about the 'flash_node'. This patch: * sets chip->flash_node for those drivers that didn't already (but used OF partitioning) * drops the parser data * switches to the simpler mtd_device_register() where possible, now that we've eliminated one of the auxiliary parameters Now that we've assigned chip->flash_node for these drivers, we can probably rely on nand_dt_init() to do more of the DT parsing for us, but for now, I don't want to fiddle with each of these drivers. The parsing is done in duplicate for now on some drivers. I don't think this should break things. (Famous last words.) (Rolled in some changes by Boris Brezillon) Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon --- drivers/mtd/nand/brcmnand/brcmnand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/mtd/nand/brcmnand') diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c index 7bd4102fde42..a37659de025c 100644 --- a/drivers/mtd/nand/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/brcmnand/brcmnand.c @@ -1914,7 +1914,6 @@ static int brcmnand_init_cs(struct brcmnand_host *host) struct nand_chip *chip; int ret; u16 cfg_offs; - struct mtd_part_parser_data ppdata = { .of_node = dn }; ret = of_property_read_u32(dn, "reg", &host->cs); if (ret) { @@ -1993,7 +1992,7 @@ static int brcmnand_init_cs(struct brcmnand_host *host) if (nand_scan_tail(mtd)) return -ENXIO; - return mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); + return mtd_device_register(mtd, NULL, 0); } static void brcmnand_save_restore_cs_config(struct brcmnand_host *host, -- cgit v1.2.3-55-g7522