Commit bbf6adc1 authored by Axel Lin's avatar Axel Lin Committed by Samuel Ortiz

mfd: Convert twl6040-core to devm_regmap_init_i2c()

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 0ef4619c
...@@ -524,7 +524,7 @@ static int __devinit twl6040_probe(struct i2c_client *client, ...@@ -524,7 +524,7 @@ static int __devinit twl6040_probe(struct i2c_client *client,
goto err; goto err;
} }
twl6040->regmap = regmap_init_i2c(client, &twl6040_regmap_config); twl6040->regmap = devm_regmap_init_i2c(client, &twl6040_regmap_config);
if (IS_ERR(twl6040->regmap)) { if (IS_ERR(twl6040->regmap)) {
ret = PTR_ERR(twl6040->regmap); ret = PTR_ERR(twl6040->regmap);
goto err; goto err;
...@@ -623,7 +623,6 @@ static int __devinit twl6040_probe(struct i2c_client *client, ...@@ -623,7 +623,6 @@ static int __devinit twl6040_probe(struct i2c_client *client,
gpio_free(twl6040->audpwron); gpio_free(twl6040->audpwron);
gpio1_err: gpio1_err:
i2c_set_clientdata(client, NULL); i2c_set_clientdata(client, NULL);
regmap_exit(twl6040->regmap);
err: err:
return ret; return ret;
} }
...@@ -643,7 +642,6 @@ static int __devexit twl6040_remove(struct i2c_client *client) ...@@ -643,7 +642,6 @@ static int __devexit twl6040_remove(struct i2c_client *client)
mfd_remove_devices(&client->dev); mfd_remove_devices(&client->dev);
i2c_set_clientdata(client, NULL); i2c_set_clientdata(client, NULL);
regmap_exit(twl6040->regmap);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment