Skip to content

Commit 3a1ec2e

Browse files
committed
PM / devfreq: Change to DEVFREQ_GOV_UPDATE_INTERVAL event name
DEVFREQ_GOV_INTERVAL event indicates that update the interval for polling mode of devfreq device. But, this event name doesn't specify exactly what to do. Change DEVFREQ_GOV_INTERVAL event name to DEVFREQ_GOV_UPDATE_INTERVAL which specifies what to do by event name. And modify the function name to DEVFREQ_GOV_UPDATE_INTERVAL with 'devfreq_' prefix + verb + object as following: - devfreq_interval_update -> devfreq_updatee_interval Reviewed-by: Lukasz Luba <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 6d74349 commit 3a1ec2e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

drivers/devfreq/devfreq.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,14 +550,14 @@ void devfreq_monitor_resume(struct devfreq *devfreq)
550550
EXPORT_SYMBOL(devfreq_monitor_resume);
551551

552552
/**
553-
* devfreq_interval_update() - Update device devfreq monitoring interval
553+
* devfreq_update_interval() - Update device devfreq monitoring interval
554554
* @devfreq: the devfreq instance.
555555
* @delay: new polling interval to be set.
556556
*
557557
* Helper function to set new load monitoring polling interval. Function
558-
* to be called from governor in response to DEVFREQ_GOV_INTERVAL event.
558+
* to be called from governor in response to DEVFREQ_GOV_UPDATE_INTERVAL event.
559559
*/
560-
void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay)
560+
void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay)
561561
{
562562
unsigned int cur_delay = devfreq->profile->polling_ms;
563563
unsigned int new_delay = *delay;
@@ -597,7 +597,7 @@ void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay)
597597
out:
598598
mutex_unlock(&devfreq->lock);
599599
}
600-
EXPORT_SYMBOL(devfreq_interval_update);
600+
EXPORT_SYMBOL(devfreq_update_interval);
601601

602602
/**
603603
* devfreq_notifier_call() - Notify that the device frequency requirements
@@ -1424,7 +1424,7 @@ static ssize_t polling_interval_store(struct device *dev,
14241424
if (ret != 1)
14251425
return -EINVAL;
14261426

1427-
df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value);
1427+
df->governor->event_handler(df, DEVFREQ_GOV_UPDATE_INTERVAL, &value);
14281428
ret = count;
14291429

14301430
return ret;

drivers/devfreq/governor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/* Devfreq events */
1919
#define DEVFREQ_GOV_START 0x1
2020
#define DEVFREQ_GOV_STOP 0x2
21-
#define DEVFREQ_GOV_INTERVAL 0x3
21+
#define DEVFREQ_GOV_UPDATE_INTERVAL 0x3
2222
#define DEVFREQ_GOV_SUSPEND 0x4
2323
#define DEVFREQ_GOV_RESUME 0x5
2424

@@ -61,7 +61,7 @@ void devfreq_monitor_start(struct devfreq *devfreq);
6161
void devfreq_monitor_stop(struct devfreq *devfreq);
6262
void devfreq_monitor_suspend(struct devfreq *devfreq);
6363
void devfreq_monitor_resume(struct devfreq *devfreq);
64-
void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay);
64+
void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay);
6565

6666
int devfreq_add_governor(struct devfreq_governor *governor);
6767
int devfreq_remove_governor(struct devfreq_governor *governor);

drivers/devfreq/governor_simpleondemand.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq,
9696
devfreq_monitor_stop(devfreq);
9797
break;
9898

99-
case DEVFREQ_GOV_INTERVAL:
100-
devfreq_interval_update(devfreq, (unsigned int *)data);
99+
case DEVFREQ_GOV_UPDATE_INTERVAL:
100+
devfreq_update_interval(devfreq, (unsigned int *)data);
101101
break;
102102

103103
case DEVFREQ_GOV_SUSPEND:

drivers/devfreq/tegra30-devfreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq,
734734
devfreq_monitor_stop(devfreq);
735735
break;
736736

737-
case DEVFREQ_GOV_INTERVAL:
737+
case DEVFREQ_GOV_UPDATE_INTERVAL:
738738
/*
739739
* ACTMON hardware supports up to 256 milliseconds for the
740740
* sampling period.
@@ -745,7 +745,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq,
745745
}
746746

747747
tegra_actmon_pause(tegra);
748-
devfreq_interval_update(devfreq, new_delay);
748+
devfreq_update_interval(devfreq, new_delay);
749749
ret = tegra_actmon_resume(tegra);
750750
break;
751751

0 commit comments

Comments
 (0)