aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/devfreq.c
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-04-24 15:46:39 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2018-10-01 21:16:41 -0400
commitd0e464205b8a1fa21357aad0bbf136500d7e688d (patch)
tree2ff6bb8132cc18aeb44c18c199974ac4d3486e1c /drivers/devfreq/devfreq.c
parent23c7b54ca1cd1797ef39169ab85e6d46f1c2d061 (diff)
PM / devfreq: Drop custom MIN/MAX macros
Drop the custom MIN/MAX macros in favour of the standard min/max from kernel.h Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 62ead442a872..329c5e3f3338 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -29,9 +29,6 @@
29#include <linux/of.h> 29#include <linux/of.h>
30#include "governor.h" 30#include "governor.h"
31 31
32#define MAX(a,b) ((a > b) ? a : b)
33#define MIN(a,b) ((a < b) ? a : b)
34
35static struct class *devfreq_class; 32static struct class *devfreq_class;
36 33
37/* 34/*
@@ -324,8 +321,8 @@ int update_devfreq(struct devfreq *devfreq)
324 * max_freq 321 * max_freq
325 * min_freq 322 * min_freq
326 */ 323 */
327 max_freq = MIN(devfreq->scaling_max_freq, devfreq->max_freq); 324 max_freq = min(devfreq->scaling_max_freq, devfreq->max_freq);
328 min_freq = MAX(devfreq->scaling_min_freq, devfreq->min_freq); 325 min_freq = max(devfreq->scaling_min_freq, devfreq->min_freq);
329 326
330 if (min_freq && freq < min_freq) { 327 if (min_freq && freq < min_freq) {
331 freq = min_freq; 328 freq = min_freq;
@@ -1197,7 +1194,7 @@ static ssize_t min_freq_show(struct device *dev, struct device_attribute *attr,
1197{ 1194{
1198 struct devfreq *df = to_devfreq(dev); 1195 struct devfreq *df = to_devfreq(dev);
1199 1196
1200 return sprintf(buf, "%lu\n", MAX(df->scaling_min_freq, df->min_freq)); 1197 return sprintf(buf, "%lu\n", max(df->scaling_min_freq, df->min_freq));
1201} 1198}
1202 1199
1203static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr, 1200static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
@@ -1233,7 +1230,7 @@ static ssize_t max_freq_show(struct device *dev, struct device_attribute *attr,
1233{ 1230{
1234 struct devfreq *df = to_devfreq(dev); 1231 struct devfreq *df = to_devfreq(dev);
1235 1232
1236 return sprintf(buf, "%lu\n", MIN(df->scaling_max_freq, df->max_freq)); 1233 return sprintf(buf, "%lu\n", min(df->scaling_max_freq, df->max_freq));
1237} 1234}
1238static DEVICE_ATTR_RW(max_freq); 1235static DEVICE_ATTR_RW(max_freq);
1239 1236