diff options
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/devfreq.c | 14 | ||||
-rw-r--r-- | drivers/devfreq/governor.h | 21 | ||||
-rw-r--r-- | drivers/devfreq/governor_simpleondemand.c | 4 | ||||
-rw-r--r-- | drivers/devfreq/governor_userspace.c | 2 | ||||
-rw-r--r-- | drivers/devfreq/tegra30-devfreq.c | 4 |
5 files changed, 22 insertions, 23 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 7dcf2093e531..6fecd11dafdd 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -550,14 +550,14 @@ out: EXPORT_SYMBOL(devfreq_monitor_resume); /** - * devfreq_interval_update() - Update device devfreq monitoring interval + * devfreq_update_interval() - Update device devfreq monitoring interval * @devfreq: the devfreq instance. * @delay: new polling interval to be set. * * Helper function to set new load monitoring polling interval. Function - * to be called from governor in response to DEVFREQ_GOV_INTERVAL event. + * to be called from governor in response to DEVFREQ_GOV_UPDATE_INTERVAL event. */ -void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay) +void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay) { unsigned int cur_delay = devfreq->profile->polling_ms; unsigned int new_delay = *delay; @@ -597,7 +597,7 @@ void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay) out: mutex_unlock(&devfreq->lock); } -EXPORT_SYMBOL(devfreq_interval_update); +EXPORT_SYMBOL(devfreq_update_interval); /** * devfreq_notifier_call() - Notify that the device frequency requirements @@ -705,13 +705,13 @@ static void devfreq_dev_release(struct device *dev) if (dev_pm_qos_request_active(&devfreq->user_max_freq_req)) { err = dev_pm_qos_remove_request(&devfreq->user_max_freq_req); - if (err) + if (err < 0) dev_warn(dev->parent, "Failed to remove max_freq request: %d\n", err); } if (dev_pm_qos_request_active(&devfreq->user_min_freq_req)) { err = dev_pm_qos_remove_request(&devfreq->user_min_freq_req); - if (err) + if (err < 0) dev_warn(dev->parent, "Failed to remove min_freq request: %d\n", err); } @@ -1424,7 +1424,7 @@ static ssize_t polling_interval_store(struct device *dev, if (ret != 1) return -EINVAL; - df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value); + df->governor->event_handler(df, DEVFREQ_GOV_UPDATE_INTERVAL, &value); ret = count; return ret; diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index dc7533ccc3db..ae4d0cc18359 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h @@ -18,7 +18,7 @@ /* Devfreq events */ #define DEVFREQ_GOV_START 0x1 #define DEVFREQ_GOV_STOP 0x2 -#define DEVFREQ_GOV_INTERVAL 0x3 +#define DEVFREQ_GOV_UPDATE_INTERVAL 0x3 #define DEVFREQ_GOV_SUSPEND 0x4 #define DEVFREQ_GOV_RESUME 0x5 @@ -30,7 +30,7 @@ * @node: list node - contains registered devfreq governors * @name: Governor's name * @immutable: Immutable flag for governor. If the value is 1, - * this govenror is never changeable to other governor. + * this governor is never changeable to other governor. * @interrupt_driven: Devfreq core won't schedule polling work for this * governor if value is set to 1. * @get_target_freq: Returns desired operating frequency for the device. @@ -57,17 +57,16 @@ struct devfreq_governor { unsigned int event, void *data); }; -extern void devfreq_monitor_start(struct devfreq *devfreq); -extern void devfreq_monitor_stop(struct devfreq *devfreq); -extern void devfreq_monitor_suspend(struct devfreq *devfreq); -extern void devfreq_monitor_resume(struct devfreq *devfreq); -extern void devfreq_interval_update(struct devfreq *devfreq, - unsigned int *delay); +void devfreq_monitor_start(struct devfreq *devfreq); +void devfreq_monitor_stop(struct devfreq *devfreq); +void devfreq_monitor_suspend(struct devfreq *devfreq); +void devfreq_monitor_resume(struct devfreq *devfreq); +void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay); -extern int devfreq_add_governor(struct devfreq_governor *governor); -extern int devfreq_remove_governor(struct devfreq_governor *governor); +int devfreq_add_governor(struct devfreq_governor *governor); +int devfreq_remove_governor(struct devfreq_governor *governor); -extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq); +int devfreq_update_status(struct devfreq *devfreq, unsigned long freq); static inline int devfreq_update_stats(struct devfreq *df) { diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index 3d809f228619..1b314e1df028 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -96,8 +96,8 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq, devfreq_monitor_stop(devfreq); break; - case DEVFREQ_GOV_INTERVAL: - devfreq_interval_update(devfreq, (unsigned int *)data); + case DEVFREQ_GOV_UPDATE_INTERVAL: + devfreq_update_interval(devfreq, (unsigned int *)data); break; case DEVFREQ_GOV_SUSPEND: diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c index af94942fcf95..0fd6c4851071 100644 --- a/drivers/devfreq/governor_userspace.c +++ b/drivers/devfreq/governor_userspace.c @@ -131,7 +131,7 @@ static int devfreq_userspace_handler(struct devfreq *devfreq, } static struct devfreq_governor devfreq_userspace = { - .name = "userspace", + .name = DEVFREQ_GOV_USERSPACE, .get_target_freq = devfreq_userspace_func, .event_handler = devfreq_userspace_handler, }; diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c index 0b65f89d74d5..28b2c7ca416e 100644 --- a/drivers/devfreq/tegra30-devfreq.c +++ b/drivers/devfreq/tegra30-devfreq.c @@ -734,7 +734,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq, devfreq_monitor_stop(devfreq); break; - case DEVFREQ_GOV_INTERVAL: + case DEVFREQ_GOV_UPDATE_INTERVAL: /* * ACTMON hardware supports up to 256 milliseconds for the * sampling period. @@ -745,7 +745,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq, } tegra_actmon_pause(tegra); - devfreq_interval_update(devfreq, new_delay); + devfreq_update_interval(devfreq, new_delay); ret = tegra_actmon_resume(tegra); break; |