Skip to contentSkip to conversation

mfd: syscon: Remove "base" field from private driver data

PATCH In review Alexander Shiyan 2 participants 2 messages Jul 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: syscon: Remove "base" field from private driver data

This patch removes "base" field from private driver data. No reason to store this variable.

---
 drivers/mfd/syscon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mfd/syscon.c +4 -4
index 1a31512..27db1f9 100644
@@ -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");
Signature · 1 line
1.8.1.5
#1 lore raw
Quoted 7 lines

This patch removes "base" field from private driver data. No reason to store this variable.

---
 drivers/mfd/syscon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

I've fixed up the commit message to provide more a more meaty description, rather than just repeating the subject line and applied the patch.

Signature · 4 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog