dect
/
linux-2.6
Archived
13
0
Fork 0

mfd: Convert twl6040-core to devm_regmap_init_i2c()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Axel Lin 2012-04-25 10:09:46 +08:00 committed by Samuel Ortiz
parent 0ef4619c74
commit bbf6adc10c
1 changed files with 1 additions and 3 deletions

View File

@ -524,7 +524,7 @@ static int __devinit twl6040_probe(struct i2c_client *client,
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)) {
ret = PTR_ERR(twl6040->regmap);
goto err;
@ -623,7 +623,6 @@ gpio2_err:
gpio_free(twl6040->audpwron);
gpio1_err:
i2c_set_clientdata(client, NULL);
regmap_exit(twl6040->regmap);
err:
return ret;
}
@ -643,7 +642,6 @@ static int __devexit twl6040_remove(struct i2c_client *client)
mfd_remove_devices(&client->dev);
i2c_set_clientdata(client, NULL);
regmap_exit(twl6040->regmap);
return 0;
}