diff options
Diffstat (limited to 'drivers/devfreq/devfreq.c')
| -rw-r--r-- | drivers/devfreq/devfreq.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index a5b09deba52..582b4d31c46 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -349,6 +349,7 @@ void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay) unsigned int new_delay = *delay; mutex_lock(&devfreq->lock); + devfreq->profile->polling_ms = new_delay; if (devfreq->stop_polling) goto out; @@ -825,7 +826,6 @@ static ssize_t store_polling_interval(struct device *dev, if (ret != 1) return -EINVAL; - df->profile->polling_ms = value; df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value); ret = count; @@ -977,26 +977,6 @@ static ssize_t show_trans_table(struct device *dev, struct device_attribute *att return len; } -static ssize_t show_time_in_state(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct devfreq *devfreq = to_devfreq(dev); - - ssize_t len = 0; - int i, err; - unsigned int max_state = devfreq->profile->max_state; - - err = devfreq_update_status(devfreq, devfreq->previous_freq); - if (err) - return 0; - - for (i = 0; i < max_state; i++) { - len += sprintf(buf + len, "%u %u\n", devfreq->profile->freq_table[i], - jiffies_to_msecs(devfreq->time_in_state[i])); - } - return len; -} - static struct device_attribute devfreq_attrs[] = { __ATTR(governor, S_IRUGO | S_IWUSR, show_governor, store_governor), __ATTR(available_governors, S_IRUGO, show_available_governors, NULL), @@ -1008,7 +988,6 @@ static struct device_attribute devfreq_attrs[] = { __ATTR(min_freq, S_IRUGO | S_IWUSR, show_min_freq, store_min_freq), __ATTR(max_freq, S_IRUGO | S_IWUSR, show_max_freq, store_max_freq), __ATTR(trans_stat, S_IRUGO, show_trans_table, NULL), - __ATTR(time_in_state, S_IRUGO, show_time_in_state, NULL), { }, }; @@ -1020,10 +999,7 @@ static int __init devfreq_init(void) return PTR_ERR(devfreq_class); } - devfreq_wq = - alloc_workqueue("devfreq_wq", - WQ_HIGHPRI | WQ_UNBOUND | WQ_FREEZABLE | - WQ_MEM_RECLAIM, 0); + devfreq_wq = create_freezable_workqueue("devfreq_wq"); if (IS_ERR(devfreq_wq)) { class_destroy(devfreq_class); pr_err("%s: couldn't create workqueue\n", __FILE__); |
