diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-12 23:03:58 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-12 23:03:58 +0000 |
commit | da8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (patch) | |
tree | 66d5a4804f0a15b5dc224bb2de9b0d9cb208eb91 /drivers | |
parent | c6c124225f9551d78a19c291a2e204618f7e1e92 (diff) | |
parent | 5c1d5f091dc39eecf9a34a8be01492d14c23ad91 (diff) |
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/regmap/regmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 6a19515f8a45..4b2ed0c9e80d 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2240,6 +2240,18 @@ int regmap_get_val_bytes(struct regmap *map) } EXPORT_SYMBOL_GPL(regmap_get_val_bytes); +int regmap_parse_val(struct regmap *map, const void *buf, + unsigned int *val) +{ + if (!map->format.parse_val) + return -EINVAL; + + *val = map->format.parse_val(buf); + + return 0; +} +EXPORT_SYMBOL_GPL(regmap_parse_val); + static int __init regmap_initcall(void) { regmap_debugfs_initcall(); |