Skip to content

Commit

Permalink
mfd: Convert twl6040-core to devm_regmap_init_i2c()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed May 9, 2012
1 parent 0ef4619 commit bbf6adc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/twl6040-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -623,7 +623,6 @@ static int __devinit twl6040_probe(struct i2c_client *client,
gpio_free(twl6040->audpwron);
gpio1_err:
i2c_set_clientdata(client, NULL);
regmap_exit(twl6040->regmap);
err:
return ret;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit bbf6adc

Please sign in to comment.