projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
676970d
)
regmap: Check readable regs in _regmap_read
author
Michal Simek
<michal.simek@xilinx.com>
Mon, 10 Feb 2014 11:59:46 +0000
(12:59 +0100)
committer
Mark Brown
<broonie@linaro.org>
Tue, 11 Feb 2014 16:38:47 +0000
(16:38 +0000)
Check if regs are readable.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/regmap/regmap.c
b/drivers/base/regmap/regmap.c
index 6a19515f8a458b3719fce7325f265a60a4d147a4..b897c1a88b560a8881fd2a88608ba801b0e45988 100644
(file)
--- a/
drivers/base/regmap/regmap.c
+++ b/
drivers/base/regmap/regmap.c
@@
-1736,6
+1736,9
@@
static int _regmap_read(struct regmap *map, unsigned int reg,
if (map->cache_only)
return -EBUSY;
+ if (!regmap_readable(map, reg))
+ return -EIO;
+
ret = map->reg_read(context, reg, val);
if (ret == 0) {
#ifdef LOG_DEVICE