* Change the period of govenor timer according to PASS level
*/
if (policy->pass_table[level].gov_timeout >= PASS_MIN_GOV_TIMEOUT &&
- (policy->governor->gov_timeout
+ (policy->gov_timeout
!= policy->pass_table[level].gov_timeout)) {
_I("Change the period of governor timer from %fs to %fs\n",
- policy->governor->gov_timeout,
+ policy->gov_timeout,
policy->pass_table[level].gov_timeout);
- policy->governor->gov_timeout =
+ policy->gov_timeout =
policy->pass_table[level].gov_timeout;
- ecore_timer_interval_set(policy->governor->gov_timer_id,
- policy->governor->gov_timeout);
- ecore_timer_reset(policy->governor->gov_timer_id);
+ ecore_timer_interval_set(policy->gov_timer_id,
+ policy->gov_timeout);
+ ecore_timer_reset(policy->gov_timer_id);
}
return ECORE_CALLBACK_RENEW;
}
/* Create the core timer of PASS governor */
- if (policy->governor->gov_timeout > 0) {
- policy->governor->gov_timer_id = ecore_timer_add(
- policy->governor->gov_timeout,
+ if (policy->gov_timeout > 0) {
+ policy->gov_timer_id = ecore_timer_add(
+ policy->gov_timeout,
(Ecore_Task_Cb)pass_governor_core_timer,
(void *)policy);
- if (!policy->governor->gov_timer_id) {
+ if (!policy->gov_timer_id) {
_E("cannot add core timer for governor");
pass_governor_update(policy, PASS_GOV_STOP);
return;
}
} else {
- policy->governor->gov_timer_id = NULL;
+ policy->gov_timer_id = NULL;
}
/*
pass_hotplug_stop(policy);
- if (policy->governor->gov_timer_id) {
- ecore_timer_del(policy->governor->gov_timer_id);
- policy->governor->gov_timer_id = NULL;
+ if (policy->gov_timer_id) {
+ ecore_timer_del(policy->gov_timer_id);
+ policy->gov_timer_id = NULL;
}
/* Set PASS state as PASS_GOV_STOP */
struct pass_resource *res = to_pass_resource(policy);
struct pass_conf_data *cdata = &res->cdata;
- if(policy->governor->gov_timeout < 0) {
- _E("invalid timeout value [%d]!",
- policy->governor->gov_timeout);
+ if(policy->gov_timeout < 0) {
+ _E("invalid timeout value [%d]!", policy->gov_timeout);
pass_governor_update(policy, PASS_GOV_STOP);
return -EINVAL;
}
policy->pass_table = NULL;
policy->num_pass_cpu_stats = 0;
- policy->governor->gov_timeout = 0;
+ policy->gov_timeout = 0;
policy->governor = NULL;