8efda1080957801514a6802ee7252a790e254423
[openwrt/staging/svanheule.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 @@ -2949,6 +2949,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 @@ -3089,8 +3090,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