summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-09-04 18:22:07 +0200
committerMark Brown <broonie@kernel.org>2015-09-04 18:22:07 +0200
commitf74741615368af1b8401be4b7a6f0b9ccbc2420a (patch)
tree2fa8ca4b843c405d4a89b48144f2eb661ac1420d /drivers/base
parentMerge remote-tracking branch 'regmap/fix/core' into regmap-linus (diff)
parentregmap: regmap_raw_read return error on !bus->read (diff)
downloadlinux-f74741615368af1b8401be4b7a6f0b9ccbc2420a.tar.xz
linux-f74741615368af1b8401be4b7a6f0b9ccbc2420a.zip
Merge remote-tracking branch 'regmap/fix/raw' into regmap-linus
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 9b4badc2479d..c0aeda553c18 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2184,6 +2184,11 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
if (regmap_volatile_range(map, reg, val_count) || map->cache_bypass ||
map->cache_type == REGCACHE_NONE) {
+ if (!map->bus->read) {
+ ret = -ENOTSUPP;
+ goto out;
+ }
+
/* Physical block read if there's no cache involved */
ret = _regmap_raw_read(map, reg, val, val_len);