ce14834fa71b6312c30462b0473de9be0188540a
[openwrt/staging/pepe2k.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 @@ -3033,6 +3033,7 @@ int brcmnand_probe(struct platform_devic
18
19 dev_set_drvdata(dev, ctrl);
20 ctrl->dev = dev;
21 + ctrl->soc = soc;
22
23 init_completion(&ctrl->done);
24 init_completion(&ctrl->dma_done);
25 @@ -3173,8 +3174,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