aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-12 08:06:08 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-12 08:06:08 -0400
commit25061d285747f20aafa4b50df1b0b5665fef29cd (patch)
treec302ac93e3476788a4671ee556a902fce2592f3a /drivers/base
parent7a6476143270d947924f5bbbc124accb0e558bf4 (diff)
parent6560ffd1ccd688152393dc7c35dbdcc33140633b (diff)
Merge tag 'regmap-3.4' into regmap-stride
regmap: Last minute bug fix for 3.4 This is a last minute bug fix that was only just noticed since the code path that's being exercised here is one that is fairly rarely used. The changelog for the change itself is extremely clear and the code itself is obvious to inspection so should be pretty safe. Conflicts: drivers/base/regmap/regmap.c (overlap between the fix and stride code)
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c4
-rw-r--r--drivers/base/soc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index fcd69ff695d5..357294905793 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -898,10 +898,12 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
898 map->format.parse_val(val + i); 898 map->format.parse_val(val + i);
899 } else { 899 } else {
900 for (i = 0; i < val_count; i++) { 900 for (i = 0; i < val_count; i++) {
901 unsigned int ival;
901 ret = regmap_read(map, reg + (i * map->reg_stride), 902 ret = regmap_read(map, reg + (i * map->reg_stride),
902 val + (i * val_bytes)); 903 &ival);
903 if (ret != 0) 904 if (ret != 0)
904 return ret; 905 return ret;
906 memcpy(val + (i * val_bytes), &ival, val_bytes);
905 } 907 }
906 } 908 }
907 909
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index 05f150382da8..ba29b2e73d48 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -15,7 +15,7 @@
15#include <linux/sys_soc.h> 15#include <linux/sys_soc.h>
16#include <linux/err.h> 16#include <linux/err.h>
17 17
18static DEFINE_IDR(soc_ida); 18static DEFINE_IDA(soc_ida);
19static DEFINE_SPINLOCK(soc_lock); 19static DEFINE_SPINLOCK(soc_lock);
20 20
21static ssize_t soc_info_get(struct device *dev, 21static ssize_t soc_info_get(struct device *dev,
@@ -168,8 +168,6 @@ void soc_device_unregister(struct soc_device *soc_dev)
168 168
169static int __init soc_bus_register(void) 169static int __init soc_bus_register(void)
170{ 170{
171 spin_lock_init(&soc_lock);
172
173 return bus_register(&soc_bus_type); 171 return bus_register(&soc_bus_type);
174} 172}
175core_initcall(soc_bus_register); 173core_initcall(soc_bus_register);