projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a892d6
)
regmap: Fix kcalloc parameters swapped
author
Axel Lin
<axel.lin@gmail.com>
Fri, 10 Feb 2012 11:29:55 +0000
(19:29 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Fri, 10 Feb 2012 11:46:14 +0000
(11:46 +0000)
The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap.c
patch
|
blob
|
history
diff --git
a/drivers/base/regmap/regmap.c
b/drivers/base/regmap/regmap.c
index
28e89fd
..
46b2bd7
100644
(file)
--- a/
drivers/base/regmap/regmap.c
+++ b/
drivers/base/regmap/regmap.c
@@
-709,7
+709,7
@@
int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
}
}
- map->patch = kcalloc(
sizeof(struct reg_default), num_regs
, GFP_KERNEL);
+ map->patch = kcalloc(
num_regs, sizeof(struct reg_default)
, GFP_KERNEL);
if (map->patch != NULL) {
memcpy(map->patch, regs,
num_regs * sizeof(struct reg_default));