Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294140
b: refs/heads/master
c: 4191f19
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and Mark Brown committed Jan 30, 2012
1 parent e721928 commit bc687cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: c212acccc368a087a53559aac2b7d3be941b1252
refs/heads/master: 4191f19792bf91267835eb090d970e9cd6277a65
7 changes: 5 additions & 2 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ bool regmap_readable(struct regmap *map, unsigned int reg)
if (map->max_register && reg > map->max_register)
return false;

if (map->format.format_write)
return false;

if (map->readable_reg)
return map->readable_reg(map->dev, reg);

Expand All @@ -44,7 +47,7 @@ bool regmap_readable(struct regmap *map, unsigned int reg)

bool regmap_volatile(struct regmap *map, unsigned int reg)
{
if (map->max_register && reg > map->max_register)
if (!regmap_readable(map, reg))
return false;

if (map->volatile_reg)
Expand All @@ -55,7 +58,7 @@ bool regmap_volatile(struct regmap *map, unsigned int reg)

bool regmap_precious(struct regmap *map, unsigned int reg)
{
if (map->max_register && reg > map->max_register)
if (!regmap_readable(map, reg))
return false;

if (map->precious_reg)
Expand Down

0 comments on commit bc687cf

Please sign in to comment.