diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index d786ddcaf1173a88fdbb29c52744cc4937b8a898..85bffddda530c082120405172c516fabb5e69fad 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg, { int ret; + WARN_ON(map->cache_type != REGCACHE_NONE); + mutex_lock(&map->lock); ret = _regmap_raw_write(map, reg, val, val_len); @@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val, { int ret; + WARN_ON(map->cache_type != REGCACHE_NONE); + mutex_lock(&map->lock); ret = _regmap_raw_read(map, reg, val, val_len);