f6f90a81651184bc34ca686a0d1b52ebf31fbfa1
[openwrt/staging/ansuel.git] /
1 From: Florian Fainelli <f.fainelli@gmail.com>
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
6 In order to key off the brcmnand_probe() code in subsequent changes
7 depending upon ctrl->soc, assign that variable as early as possible,
8 instead of much later when we have checked that it is non-NULL.
9
10 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
11 ---
12 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 3 +--
13 1 file changed, 1 insertion(+), 2 deletions(-)
14
15 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
16 +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
17 @@ -3059,6 +3059,7 @@ int brcmnand_probe(struct platform_devic
18
19 dev_set_drvdata(dev, ctrl);
20 ctrl->dev = dev;
21 + ctrl->soc = soc;
22
23 /* Enable the static key if the soc provides I/O operations indicating
24 * that a non-memory mapped IO access path must be used
25 @@ -3209,8 +3210,6 @@ int brcmnand_probe(struct platform_devic
26 * interesting ways
27 */
28 if (soc) {
29 - ctrl->soc = soc;
30 -
31 ret = devm_request_irq(dev, ctrl->irq, brcmnand_irq, 0,
32 DRV_NAME, ctrl);
33