aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-10-30 23:33:25 -0400
committerBrian Norris <computersforpeace@gmail.com>2015-11-11 16:58:45 -0500
commita61ae81a1907af1987ad4c77300508327bc48b23 (patch)
treed773d64c44c5fbfcc5eae47bca3c5f519c98833e /drivers/mtd/nand/gpmi-nand/gpmi-nand.c
parent9c7d787508be6d68a6ec66de3c3466b24e820c71 (diff)
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 <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/gpmi-nand/gpmi-nand.c')
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 2064adac1d17..5a9b6966e97c 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1888,7 +1888,6 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
1888{ 1888{
1889 struct mtd_info *mtd = &this->mtd; 1889 struct mtd_info *mtd = &this->mtd;
1890 struct nand_chip *chip = &this->nand; 1890 struct nand_chip *chip = &this->nand;
1891 struct mtd_part_parser_data ppdata = {};
1892 int ret; 1891 int ret;
1893 1892
1894 /* init current chip */ 1893 /* init current chip */
@@ -1901,6 +1900,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
1901 1900
1902 /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */ 1901 /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
1903 chip->priv = this; 1902 chip->priv = this;
1903 nand_set_flash_node(chip, this->pdev->dev.of_node);
1904 chip->select_chip = gpmi_select_chip; 1904 chip->select_chip = gpmi_select_chip;
1905 chip->cmd_ctrl = gpmi_cmd_ctrl; 1905 chip->cmd_ctrl = gpmi_cmd_ctrl;
1906 chip->dev_ready = gpmi_dev_ready; 1906 chip->dev_ready = gpmi_dev_ready;
@@ -1954,8 +1954,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
1954 if (ret) 1954 if (ret)
1955 goto err_out; 1955 goto err_out;
1956 1956
1957 ppdata.of_node = this->pdev->dev.of_node; 1957 ret = mtd_device_register(mtd, NULL, 0);
1958 ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);
1959 if (ret) 1958 if (ret)
1960 goto err_out; 1959 goto err_out;
1961 return 0; 1960 return 0;