summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-25 10:01:55 +0800
committerSimone Willett <swillett@nvidia.com>2012-06-03 08:08:25 -0700
commit70b58068435b0801e4c15742c7c758c3cb9b6e52 (patch)
treef2e47f9657bffd6321a0313fa0c2dd25c7b75164 /drivers
parent068ea29689e8de70af6a3e7271375058351f7d5f (diff)
mfd: Convert rc5t583 to devm_regmap_init_i2c()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> (cherry picked from commit f8dddc0cfe9f56ed74fd5efde8d0754f5fb73a3f) Change-Id: I72d44f59c79abbbdac95398a5d4da2bedf19d8f1 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105880 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/rc5t583.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c
index 1cb4c356afd5..cdc1df7fa0e9 100644
--- a/drivers/mfd/rc5t583.c
+++ b/drivers/mfd/rc5t583.c
@@ -268,7 +268,7 @@ static int __devinit rc5t583_i2c_probe(struct i2c_client *i2c,
rc5t583->dev = &i2c->dev;
i2c_set_clientdata(i2c, rc5t583);
- rc5t583->regmap = regmap_init_i2c(i2c, &rc5t583_regmap_config);
+ rc5t583->regmap = devm_regmap_init_i2c(i2c, &rc5t583_regmap_config);
if (IS_ERR(rc5t583->regmap)) {
ret = PTR_ERR(rc5t583->regmap);
dev_err(&i2c->dev, "regmap initialization failed: %d\n", ret);
@@ -277,7 +277,7 @@ static int __devinit rc5t583_i2c_probe(struct i2c_client *i2c,
ret = rc5t583_clear_ext_power_req(rc5t583, pdata);
if (ret < 0)
- goto err_irq_init;
+ return ret;
if (i2c->irq) {
ret = rc5t583_irq_init(rc5t583, i2c->irq, pdata->irq_base);
@@ -300,8 +300,6 @@ static int __devinit rc5t583_i2c_probe(struct i2c_client *i2c,
err_add_devs:
if (irq_init_success)
rc5t583_irq_exit(rc5t583);
-err_irq_init:
- regmap_exit(rc5t583->regmap);
return ret;
}
@@ -311,7 +309,6 @@ static int __devexit rc5t583_i2c_remove(struct i2c_client *i2c)
mfd_remove_devices(rc5t583->dev);
rc5t583_irq_exit(rc5t583);
- regmap_exit(rc5t583->regmap);
return 0;
}