diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-25 09:52:59 +0100 | 
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-25 09:52:59 +0100 | 
| commit | d1e16c1a61d68692dba346f4a841315343b085f4 (patch) | |
| tree | 249ec07d1489769fe83b4ec507708455cc0c5138 /drivers/base/regmap/regmap.c | |
| parent | 1573ee81cb9ef24fa5acee6b7442e215e63ede2f (diff) | |
| parent | 6b16351acbd415e66ba16bf7d473ece1574cf0bc (diff) | |
| download | olio-linux-3.10-d1e16c1a61d68692dba346f4a841315343b085f4.tar.xz olio-linux-3.10-d1e16c1a61d68692dba346f4a841315343b085f4.zip  | |
Merge tag 'v3.5-rc4' into for-3.6
Linux 3.5-rc4 contains some bug fixes which overlap with new features.
Diffstat (limited to 'drivers/base/regmap/regmap.c')
| -rw-r--r-- | drivers/base/regmap/regmap.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 0bcda488f11..c89aa01fb1d 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -246,11 +246,11 @@ struct regmap *regmap_init(struct device *dev,  		map->lock = regmap_lock_mutex;  		map->unlock = regmap_unlock_mutex;  	} -	map->format.buf_size = (config->reg_bits + config->val_bits) / 8;  	map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);  	map->format.pad_bytes = config->pad_bits / 8;  	map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8); -	map->format.buf_size += map->format.pad_bytes; +	map->format.buf_size = DIV_ROUND_UP(config->reg_bits + +			config->val_bits + config->pad_bits, 8);  	map->reg_shift = config->pad_bits % 8;  	if (config->reg_stride)  		map->reg_stride = config->reg_stride; @@ -368,7 +368,7 @@ struct regmap *regmap_init(struct device *dev,  	ret = regcache_init(map, config);  	if (ret < 0) -		goto err_free_workbuf; +		goto err_debugfs;  	/* Add a devres resource for dev_get_regmap() */  	m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); @@ -383,7 +383,8 @@ struct regmap *regmap_init(struct device *dev,  err_cache:  	regcache_exit(map); -err_free_workbuf: +err_debugfs: +	regmap_debugfs_exit(map);  	kfree(map->work_buf);  err_map:  	kfree(map); @@ -471,6 +472,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)  	return ret;  } +EXPORT_SYMBOL_GPL(regmap_reinit_cache);  /**   * regmap_exit(): Free a previously allocated register map  |