diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2016-11-19 08:47:36 -0500 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-01-31 00:12:19 -0500 |
commit | 9d0109be482cf75d731f2d8ea86ce2471b98a429 (patch) | |
tree | c4eaf72655edea664f361c9762ac467ed1ef86fb /drivers/devfreq/devfreq.c | |
parent | 7b70246c3b8cdd62835d1d467e8af1841c316805 (diff) |
PM / devfreq: Fix the checkpatch warnings
This patch just fixes the checkpatch warnings.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq/devfreq.c')
-rw-r--r-- | drivers/devfreq/devfreq.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 47206a21bb90..8e5938c9c7d6 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -538,15 +538,14 @@ struct devfreq *devfreq_add_device(struct device *dev, | |||
538 | devfreq = find_device_devfreq(dev); | 538 | devfreq = find_device_devfreq(dev); |
539 | mutex_unlock(&devfreq_list_lock); | 539 | mutex_unlock(&devfreq_list_lock); |
540 | if (!IS_ERR(devfreq)) { | 540 | if (!IS_ERR(devfreq)) { |
541 | dev_err(dev, "%s: Unable to create devfreq for the device. It already has one.\n", __func__); | 541 | dev_err(dev, "%s: Unable to create devfreq for the device.\n", |
542 | __func__); | ||
542 | err = -EINVAL; | 543 | err = -EINVAL; |
543 | goto err_out; | 544 | goto err_out; |
544 | } | 545 | } |
545 | 546 | ||
546 | devfreq = kzalloc(sizeof(struct devfreq), GFP_KERNEL); | 547 | devfreq = kzalloc(sizeof(struct devfreq), GFP_KERNEL); |
547 | if (!devfreq) { | 548 | if (!devfreq) { |
548 | dev_err(dev, "%s: Unable to create devfreq for the device\n", | ||
549 | __func__); | ||
550 | err = -ENOMEM; | 549 | err = -ENOMEM; |
551 | goto err_out; | 550 | goto err_out; |
552 | } | 551 | } |
@@ -576,11 +575,13 @@ struct devfreq *devfreq_add_device(struct device *dev, | |||
576 | goto err_out; | 575 | goto err_out; |
577 | } | 576 | } |
578 | 577 | ||
579 | devfreq->trans_table = devm_kzalloc(&devfreq->dev, sizeof(unsigned int) * | 578 | devfreq->trans_table = devm_kzalloc(&devfreq->dev, |
579 | sizeof(unsigned int) * | ||
580 | devfreq->profile->max_state * | 580 | devfreq->profile->max_state * |
581 | devfreq->profile->max_state, | 581 | devfreq->profile->max_state, |
582 | GFP_KERNEL); | 582 | GFP_KERNEL); |
583 | devfreq->time_in_state = devm_kzalloc(&devfreq->dev, sizeof(unsigned long) * | 583 | devfreq->time_in_state = devm_kzalloc(&devfreq->dev, |
584 | sizeof(unsigned long) * | ||
584 | devfreq->profile->max_state, | 585 | devfreq->profile->max_state, |
585 | GFP_KERNEL); | 586 | GFP_KERNEL); |
586 | devfreq->last_stat_updated = jiffies; | 587 | devfreq->last_stat_updated = jiffies; |
@@ -995,7 +996,7 @@ static ssize_t cur_freq_show(struct device *dev, struct device_attribute *attr, | |||
995 | 996 | ||
996 | if (devfreq->profile->get_cur_freq && | 997 | if (devfreq->profile->get_cur_freq && |
997 | !devfreq->profile->get_cur_freq(devfreq->dev.parent, &freq)) | 998 | !devfreq->profile->get_cur_freq(devfreq->dev.parent, &freq)) |
998 | return sprintf(buf, "%lu\n", freq); | 999 | return sprintf(buf, "%lu\n", freq); |
999 | 1000 | ||
1000 | return sprintf(buf, "%lu\n", devfreq->previous_freq); | 1001 | return sprintf(buf, "%lu\n", devfreq->previous_freq); |
1001 | } | 1002 | } |