mtd: brcmnand: do not make local variable static
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 17 May 2015 15:41:01 +0000 (17:41 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 18 May 2015 18:02:49 +0000 (11:02 -0700)
Remove static in front of ctrl. This variable should not be shared
between different instances of brcmnand_probe(), it should be local to
this function and stored on the stack.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/brcmnand/brcmnand.c

index bae30ab8f12f2656ef076aaf61b8f0f958cba18e..a48ad49c7acc4cf5b8af6aab0483aab0d5756cf8 100644 (file)
@@ -2069,7 +2069,7 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
 {
        struct device *dev = &pdev->dev;
        struct device_node *dn = dev->of_node, *child;
-       static struct brcmnand_controller *ctrl;
+       struct brcmnand_controller *ctrl;
        struct resource *res;
        int ret;