aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaolong Ye <yexl@marvell.com>2015-09-10 23:05:23 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2015-09-11 01:23:30 -0400
commit5f25f066f75a67835abb5e400471a27abd09395b (patch)
tree32028d119a5b61645a977f6a56f06d52e5443d55
parent14de3903181ca41dde73d57ad4f7a79a314ee6bf (diff)
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: Xiaolong Ye <yexl@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r--drivers/devfreq/devfreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1f3e5ea5439f..3927ed9fdbd5 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
482 devfreq->profile->max_state * 482 devfreq->profile->max_state *
483 devfreq->profile->max_state, 483 devfreq->profile->max_state,
484 GFP_KERNEL); 484 GFP_KERNEL);
485 devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) * 485 devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) *
486 devfreq->profile->max_state, 486 devfreq->profile->max_state,
487 GFP_KERNEL); 487 GFP_KERNEL);
488 devfreq->last_stat_updated = jiffies; 488 devfreq->last_stat_updated = jiffies;