Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308727
b: refs/heads/master
c: 0ef4619
h: refs/heads/master
i:
  308725: 244db16
  308723: d43da98
  308719: a57507b
v: v3
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed May 9, 2012
1 parent bbad5a2 commit b9aa910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d88f7a01d9588b3298cfd6a2ec30538e96d166e
refs/heads/master: 0ef4619c74ef1e24e9ee340f95ee922f970cde54
15 changes: 4 additions & 11 deletions trunk/drivers/mfd/tps65217.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int __devinit tps65217_probe(struct i2c_client *client,
return -ENOMEM;

tps->pdata = pdata;
tps->regmap = regmap_init_i2c(client, &tps65217_regmap_config);
tps->regmap = devm_regmap_init_i2c(client, &tps65217_regmap_config);
if (IS_ERR(tps->regmap)) {
ret = PTR_ERR(tps->regmap);
dev_err(tps->dev, "Failed to allocate register map: %d\n",
Expand All @@ -163,9 +163,9 @@ static int __devinit tps65217_probe(struct i2c_client *client,

ret = tps65217_reg_read(tps, TPS65217_REG_CHIPID, &version);
if (ret < 0) {
dev_err(tps->dev, "Failed to read revision"
" register: %d\n", ret);
goto err_regmap;
dev_err(tps->dev, "Failed to read revision register: %d\n",
ret);
return ret;
}

dev_info(tps->dev, "TPS65217 ID %#x version 1.%d\n",
Expand All @@ -190,11 +190,6 @@ static int __devinit tps65217_probe(struct i2c_client *client,
}

return 0;

err_regmap:
regmap_exit(tps->regmap);

return ret;
}

static int __devexit tps65217_remove(struct i2c_client *client)
Expand All @@ -205,8 +200,6 @@ static int __devexit tps65217_remove(struct i2c_client *client)
for (i = 0; i < TPS65217_NUM_REGULATOR; i++)
platform_device_unregister(tps->regulator_pdev[i]);

regmap_exit(tps->regmap);

return 0;
}

Expand Down

0 comments on commit b9aa910

Please sign in to comment.