diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-06-12 13:55:43 +0530 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-06-13 11:02:21 +0100 |
commit | aaaab4223ebad2470d56d5db2e71c5395d9609b3 (patch) | |
tree | 867e56de8f8a20854c9486a3e1486aa639812ea2 /drivers/mfd | |
parent | 53f325be2f99fb1e5dbbfc1f7707a9a6c97c83c2 (diff) |
mfd: 88pm860x: Use devm_regmap_init_i2c()
devm_regmap_init_i2c() is device managed and makes cleanup simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/88pm860x-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 31ca55548ef..629d6404cab 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -1155,7 +1155,7 @@ static int pm860x_probe(struct i2c_client *client, return -ENOMEM; chip->id = verify_addr(client); - chip->regmap = regmap_init_i2c(client, &pm860x_regmap_config); + chip->regmap = devm_regmap_init_i2c(client, &pm860x_regmap_config); if (IS_ERR(chip->regmap)) { ret = PTR_ERR(chip->regmap); dev_err(&client->dev, "Failed to allocate register map: %d\n", @@ -1203,7 +1203,6 @@ static int pm860x_remove(struct i2c_client *client) regmap_exit(chip->regmap_companion); i2c_unregister_device(chip->companion); } - regmap_exit(chip->regmap); kfree(chip); return 0; } |