mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
mfd: tps65911-comparator: Use regmap accessors
Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
a4b9be29f4
commit
da7d203f46
@ -69,7 +69,7 @@ static int comp_threshold_set(struct tps65910 *tps65910, int id, int voltage)
|
||||
return -EINVAL;
|
||||
|
||||
val = index << 1;
|
||||
ret = tps65910_reg_write(tps65910, tps_comp.reg, val);
|
||||
ret = regmap_write(tps65910->regmap, tps_comp.reg, val);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -80,7 +80,7 @@ static int comp_threshold_get(struct tps65910 *tps65910, int id)
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
ret = tps65910_reg_read(tps65910, tps_comp.reg, &val);
|
||||
ret = regmap_read(tps65910->regmap, tps_comp.reg, &val);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user