2
0

100-v5.18-mtd-rawnand-brcmnand-Assign-soc-as-early-as-possible.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Florian Fainelli <[email protected]>
  2. Subject: [PATCH v3 1/9] mtd: rawnand: brcmnand: Assign soc as early as possible
  3. Date: Fri, 07 Jan 2022 10:46:06 -0800
  4. Content-Type: text/plain; charset="utf-8"
  5. In order to key off the brcmnand_probe() code in subsequent changes
  6. depending upon ctrl->soc, assign that variable as early as possible,
  7. instead of much later when we have checked that it is non-NULL.
  8. Signed-off-by: Florian Fainelli <[email protected]>
  9. ---
  10. drivers/mtd/nand/raw/brcmnand/brcmnand.c | 3 +--
  11. 1 file changed, 1 insertion(+), 2 deletions(-)
  12. --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
  13. +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
  14. @@ -3059,6 +3059,7 @@ int brcmnand_probe(struct platform_devic
  15. dev_set_drvdata(dev, ctrl);
  16. ctrl->dev = dev;
  17. + ctrl->soc = soc;
  18. /* Enable the static key if the soc provides I/O operations indicating
  19. * that a non-memory mapped IO access path must be used
  20. @@ -3209,8 +3210,6 @@ int brcmnand_probe(struct platform_devic
  21. * interesting ways
  22. */
  23. if (soc) {
  24. - ctrl->soc = soc;
  25. -
  26. ret = devm_request_irq(dev, ctrl->irq, brcmnand_irq, 0,
  27. DRV_NAME, ctrl);