diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-24 22:09:46 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-09 11:52:15 -0400 |
commit | bbf6adc10cb2d5a1345cc66e61b3891d42a9afbe (patch) | |
tree | 9ad47e599fb6107cf9fdf1a4a711da51293401ac /drivers | |
parent | 0ef4619c74ef1e24e9ee340f95ee922f970cde54 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/twl6040-core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index 2d6bedadca09..493f4a692747 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c | |||
@@ -524,7 +524,7 @@ static int __devinit twl6040_probe(struct i2c_client *client, | |||
524 | goto err; | 524 | goto err; |
525 | } | 525 | } |
526 | 526 | ||
527 | twl6040->regmap = regmap_init_i2c(client, &twl6040_regmap_config); | 527 | twl6040->regmap = devm_regmap_init_i2c(client, &twl6040_regmap_config); |
528 | if (IS_ERR(twl6040->regmap)) { | 528 | if (IS_ERR(twl6040->regmap)) { |
529 | ret = PTR_ERR(twl6040->regmap); | 529 | ret = PTR_ERR(twl6040->regmap); |
530 | goto err; | 530 | goto err; |
@@ -623,7 +623,6 @@ gpio2_err: | |||
623 | gpio_free(twl6040->audpwron); | 623 | gpio_free(twl6040->audpwron); |
624 | gpio1_err: | 624 | gpio1_err: |
625 | i2c_set_clientdata(client, NULL); | 625 | i2c_set_clientdata(client, NULL); |
626 | regmap_exit(twl6040->regmap); | ||
627 | err: | 626 | err: |
628 | return ret; | 627 | return ret; |
629 | } | 628 | } |
@@ -643,7 +642,6 @@ static int __devexit twl6040_remove(struct i2c_client *client) | |||
643 | 642 | ||
644 | mfd_remove_devices(&client->dev); | 643 | mfd_remove_devices(&client->dev); |
645 | i2c_set_clientdata(client, NULL); | 644 | i2c_set_clientdata(client, NULL); |
646 | regmap_exit(twl6040->regmap); | ||
647 | 645 | ||
648 | return 0; | 646 | return 0; |
649 | } | 647 | } |