提交 5f25f066 编写于 作者: X Xiaolong Ye 提交者: MyungJoo Ham

PM / devfreq: Fix incorrect type issue.

time_in_state in struct devfreq is defined as unsigned long, so
devm_kzalloc should use sizeof(unsigned long) as argument instead
of sizeof(unsigned int), otherwise it will cause unexpected result
in 64bit system.
Signed-off-by: NXiaolong Ye <yexl@marvell.com>
Signed-off-by: NKevin Liu <kliu5@marvell.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 14de3903
...@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device *dev, ...@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->profile->max_state * devfreq->profile->max_state *
devfreq->profile->max_state, devfreq->profile->max_state,
GFP_KERNEL); GFP_KERNEL);
devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) * devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) *
devfreq->profile->max_state, devfreq->profile->max_state,
GFP_KERNEL); GFP_KERNEL);
devfreq->last_stat_updated = jiffies; devfreq->last_stat_updated = jiffies;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册