mfd: syscon: Remove "base" field from private driver data
authorAlexander Shiyan <shc_work@mail.ru>
Sun, 14 Jul 2013 06:39:42 +0000 (10:39 +0400)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 31 Jul 2013 00:02:58 +0000 (02:02 +0200)
During a move to use managed resources, the .remove function all was
deemed superfluous which subsequently led to its deletion. As there are
no remaining users of the stored 'base' address we only have to use it
locally during probe.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/syscon.c

index 1a31512369f9a4e9ef0b8b7a36853301d0c80a09..27db1f92bb262891d59effede70e149e131c4d37 100644 (file)
@@ -25,7 +25,6 @@
 static struct platform_driver syscon_driver;
 
 struct syscon {
-       void __iomem *base;
        struct regmap *regmap;
 };
 
@@ -129,6 +128,7 @@ static int syscon_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct syscon *syscon;
        struct resource *res;
+       void __iomem *base;
 
        syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL);
        if (!syscon)
@@ -138,12 +138,12 @@ static int syscon_probe(struct platform_device *pdev)
        if (!res)
                return -ENOENT;
 
-       syscon->base = devm_ioremap(dev, res->start, resource_size(res));
-       if (!syscon->base)
+       base = devm_ioremap(dev, res->start, resource_size(res));
+       if (!base)
                return -ENOMEM;
 
        syscon_regmap_config.max_register = res->end - res->start - 3;
-       syscon->regmap = devm_regmap_init_mmio(dev, syscon->base,
+       syscon->regmap = devm_regmap_init_mmio(dev, base,
                                        &syscon_regmap_config);
        if (IS_ERR(syscon->regmap)) {
                dev_err(dev, "regmap init failed\n");
This page took 0.026425 seconds and 5 git commands to generate.