Commit 1d88f7a0 authored by Axel Lin's avatar Axel Lin Committed by Samuel Ortiz

mfd: Convert tps65090 to devm_regmap_init_i2c()

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 1092e1c7
...@@ -294,8 +294,8 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client, ...@@ -294,8 +294,8 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
} }
} }
tps65090->rmap = regmap_init_i2c(tps65090->client, tps65090->rmap = devm_regmap_init_i2c(tps65090->client,
&tps65090_regmap_config); &tps65090_regmap_config);
if (IS_ERR(tps65090->rmap)) { if (IS_ERR(tps65090->rmap)) {
ret = PTR_ERR(tps65090->rmap); ret = PTR_ERR(tps65090->rmap);
dev_err(&client->dev, "regmap_init failed with err: %d\n", ret); dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
...@@ -307,14 +307,11 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client, ...@@ -307,14 +307,11 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
if (ret) { if (ret) {
dev_err(&client->dev, "add mfd devices failed with err: %d\n", dev_err(&client->dev, "add mfd devices failed with err: %d\n",
ret); ret);
goto err_regmap_exit; goto err_irq_exit;
} }
return 0; return 0;
err_regmap_exit:
regmap_exit(tps65090->rmap);
err_irq_exit: err_irq_exit:
if (client->irq) if (client->irq)
free_irq(client->irq, tps65090); free_irq(client->irq, tps65090);
...@@ -327,7 +324,6 @@ static int __devexit tps65090_i2c_remove(struct i2c_client *client) ...@@ -327,7 +324,6 @@ static int __devexit tps65090_i2c_remove(struct i2c_client *client)
struct tps65090 *tps65090 = i2c_get_clientdata(client); struct tps65090 *tps65090 = i2c_get_clientdata(client);
mfd_remove_devices(tps65090->dev); mfd_remove_devices(tps65090->dev);
regmap_exit(tps65090->rmap);
if (client->irq) if (client->irq)
free_irq(client->irq, tps65090); free_irq(client->irq, tps65090);
......
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