PM / devfreq: Allocate memory using the right data type

Long and int have different sizes on a 64-bit machine. Allocate
memory for the time_in_state table using the right data type.

Change-Id: Iecc1acc12ddabdb436c212f205aaed8dbb49a2b4
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
This commit is contained in:
Suman Tatiraju 2014-06-11 20:43:26 -07:00
parent 512fe3702f
commit dc65a54d91

View file

@ -505,9 +505,10 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->profile->max_state *
devfreq->profile->max_state,
GFP_KERNEL);
devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) *
devfreq->profile->max_state,
GFP_KERNEL);
devfreq->time_in_state = devm_kzalloc(dev,
sizeof(*(devfreq->time_in_state)) *
devfreq->profile->max_state,
GFP_KERNEL);
devfreq->last_stat_updated = jiffies;
devfreq_set_freq_limits(devfreq);