Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266956
b: refs/heads/master
c: 7330478
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Aug 8, 2011
1 parent e49c349 commit 30d3cae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb2736bbaee0e704a4f33912cf532597b2dc5b33
refs/heads/master: 73304781274200c341996f65220d36b3cda8e217
7 changes: 7 additions & 0 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
void *buf;
int ret = -ENOTSUPP;
size_t len;
int i;

/* Check for unwritable registers before we start */
if (map->writeable_reg)
for (i = 0; i < val_len / map->format.val_bytes; i++)
if (!map->writeable_reg(map->dev, reg + i))
return -EINVAL;

map->format.format_reg(map->work_buf, reg);

Expand Down

0 comments on commit 30d3cae

Please sign in to comment.