projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7da98aa
)
regulator: act8865: fix incorrect devm_kzalloc for act8865
author
Wenyou Yang
<wenyou.yang@atmel.com>
Thu, 26 Dec 2013 06:52:43 +0000
(14:52 +0800)
committer
Mark Brown
<broonie@linaro.org>
Mon, 30 Dec 2013 12:06:55 +0000
(12:06 +0000)
Which cause to allocate more needless memory.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/act8865-regulator.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/act8865-regulator.c
b/drivers/regulator/act8865-regulator.c
index e7dbdc04668304200d7548a17b4b1f8e4a50956a..f816ad866a430b2a6cf0cd561d7ed6fa6a36b075 100644
(file)
--- a/
drivers/regulator/act8865-regulator.c
+++ b/
drivers/regulator/act8865-regulator.c
@@
-291,9
+291,7
@@
static int act8865_pmic_probe(struct i2c_client *client,
return -EINVAL;
}
- act8865 = devm_kzalloc(dev, sizeof(struct act8865) +
- sizeof(struct regulator_dev *) * ACT8865_REG_NUM,
- GFP_KERNEL);
+ act8865 = devm_kzalloc(dev, sizeof(struct act8865), GFP_KERNEL);
if (!act8865)
return -ENOMEM;