Commit d121b66d authored by Brian Norris's avatar Brian Norris

mtd: brcmnand: drop brcmnand_host::of_node field

We don't actually need to stash a copy of this device_node indefinitely;
we only need it in brcmnand_init_cs().
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: default avatarScott Branden <sbranden@broadcom.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 74e98be4
...@@ -176,7 +176,6 @@ struct brcmnand_cfg { ...@@ -176,7 +176,6 @@ struct brcmnand_cfg {
struct brcmnand_host { struct brcmnand_host {
struct list_head node; struct list_head node;
struct device_node *of_node;
struct nand_chip chip; struct nand_chip chip;
struct mtd_info mtd; struct mtd_info mtd;
...@@ -1902,10 +1901,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host) ...@@ -1902,10 +1901,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host)
return 0; return 0;
} }
static int brcmnand_init_cs(struct brcmnand_host *host) static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
{ {
struct brcmnand_controller *ctrl = host->ctrl; struct brcmnand_controller *ctrl = host->ctrl;
struct device_node *dn = host->of_node;
struct platform_device *pdev = host->pdev; struct platform_device *pdev = host->pdev;
struct mtd_info *mtd; struct mtd_info *mtd;
struct nand_chip *chip; struct nand_chip *chip;
...@@ -2239,9 +2237,8 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) ...@@ -2239,9 +2237,8 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
} }
host->pdev = pdev; host->pdev = pdev;
host->ctrl = ctrl; host->ctrl = ctrl;
host->of_node = child;
ret = brcmnand_init_cs(host); ret = brcmnand_init_cs(host, child);
if (ret) { if (ret) {
devm_kfree(dev, host); devm_kfree(dev, host);
continue; /* Try all chip-selects */ continue; /* Try all chip-selects */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment