diff options
author | Eric Paris <eparis@redhat.com> | 2014-03-07 11:41:32 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-03-07 11:41:32 -0500 |
commit | b7d3622a39fde7658170b7f3cf6c6889bb8db30d (patch) | |
tree | 64f4e781ecb2a85d675e234072b988560bcd25f1 /include/linux/mfd/da9052/da9052.h | |
parent | f3411cb2b2e396a41ed3a439863f028db7140a34 (diff) | |
parent | d8ec26d7f8287f5788a494f56e8814210f0e64be (diff) |
Merge tag 'v3.13' into for-3.15
Linux 3.13
Conflicts:
include/net/xfrm.h
Simple merge where v3.13 removed 'extern' from definitions and the audit
tree did s/u32/unsigned int/ to the same definitions.
Diffstat (limited to 'include/linux/mfd/da9052/da9052.h')
-rw-r--r-- | include/linux/mfd/da9052/da9052.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h index 786d02eb79d2..21e21b81cc75 100644 --- a/include/linux/mfd/da9052/da9052.h +++ b/include/linux/mfd/da9052/da9052.h | |||
@@ -148,10 +148,15 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, | |||
148 | unsigned reg_cnt, unsigned char *val) | 148 | unsigned reg_cnt, unsigned char *val) |
149 | { | 149 | { |
150 | int ret; | 150 | int ret; |
151 | unsigned int tmp; | ||
152 | int i; | ||
151 | 153 | ||
152 | ret = regmap_bulk_read(da9052->regmap, reg, val, reg_cnt); | 154 | for (i = 0; i < reg_cnt; i++) { |
153 | if (ret < 0) | 155 | ret = regmap_read(da9052->regmap, reg + i, &tmp); |
154 | return ret; | 156 | val[i] = (unsigned char)tmp; |
157 | if (ret < 0) | ||
158 | return ret; | ||
159 | } | ||
155 | 160 | ||
156 | if (da9052->fix_io) { | 161 | if (da9052->fix_io) { |
157 | ret = da9052->fix_io(da9052, reg); | 162 | ret = da9052->fix_io(da9052, reg); |
@@ -166,10 +171,13 @@ static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, | |||
166 | unsigned reg_cnt, unsigned char *val) | 171 | unsigned reg_cnt, unsigned char *val) |
167 | { | 172 | { |
168 | int ret; | 173 | int ret; |
174 | int i; | ||
169 | 175 | ||
170 | ret = regmap_raw_write(da9052->regmap, reg, val, reg_cnt); | 176 | for (i = 0; i < reg_cnt; i++) { |
171 | if (ret < 0) | 177 | ret = regmap_write(da9052->regmap, reg + i, val[i]); |
172 | return ret; | 178 | if (ret < 0) |
179 | return ret; | ||
180 | } | ||
173 | 181 | ||
174 | if (da9052->fix_io) { | 182 | if (da9052->fix_io) { |
175 | ret = da9052->fix_io(da9052, reg); | 183 | ret = da9052->fix_io(da9052, reg); |