[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403898973-19571-2-git-send-email-dianders@chromium.org>
Date: Fri, 27 Jun 2014 12:56:11 -0700
From: Doug Anderson <dianders@...omium.org>
To: Lee Jones <lee.jones@...aro.org>, Wolfram Sang <wsa@...-dreams.de>,
Mark Brown <broonie@...nel.org>
Cc: Vincent Palatin <vpalatin@...omium.org>,
Bill Richardson <wfrichar@...omium.org>,
Randall Spangler <rspangler@...omium.org>, sjg@...omium.org,
afaerber@...e.de, stephan@...khronix.com, olof@...om.net,
Doug Anderson <dianders@...omium.org>,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] regmap: cache: regcache_hw_init() should use regmap_bulk_read()
We really should be using regmap_bulk_read() in regcache_hw_init().
The regmap_bulk_read() will translate into regmap_raw_read() when
appropriate. Doing this fixes problems where regmap_smbus() will
crash because they don't implement .read and .write.
Signed-off-by: Doug Anderson <dianders@...omium.org>
---
drivers/base/regmap/regcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 29b4128..6447486 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -45,7 +45,7 @@ static int regcache_hw_init(struct regmap *map)
tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL);
if (!tmp_buf)
return -EINVAL;
- ret = regmap_raw_read(map, 0, tmp_buf,
+ ret = regmap_bulk_read(map, 0, tmp_buf,
map->num_reg_defaults_raw);
map->cache_bypass = cache_bypass;
if (ret < 0) {
--
2.0.0.526.g5318336
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists