mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Devfreq pull request for Rafael. Rebased on pm-devfreq branch. Created on 2012.11.26
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQs0MzAAoJEBOhurvWBoCK9y0QAItWPRoMKm1lMsfM+j189Ffl WbOm72ab6AolYsGRzIHlzlL0ukudRpi8g9uFUc7gpHbp3yrEg5PYxmuDP/+U+/4X /kCvpbBWhfaaghq+HPSSTDAdyQLE5Rp8jxRA9c2j3sCR11eeIP6pqdyrLfjO/MXU UGYr0AV4oLVsp+gcu0A+nKD+RBPsOaay9rRPuuXInPn8nB15G75xemhBlHlQsuhu /rEiRpjpxZVr5E9qqwC2SblXr9X5NXSDypm3OJCE9w/VnjaX9K26iHzikStM/V7B 3J86C9lScewRcArr+WKTKoDyX/2IzBhHGB13KOrC3YLOUIru+gAnzWyhmHwD4WiL gMcJhThwi1/0rMyaobbSgDSPDGJd1WW5AYPzuH1C1INxEX5ieY7/XdUX2xmdLf6i KTUPNkbEk7LrjKYThSmO9ObOT1i5d6sP4a5OIhwaTzEkn3qz50yBGOPfQD3IGhyL udSg/EENmxXMpNpQ3+wCCP0ZZdhCdyNzwll/JixP1jLcZgoI7d1CpFf9/Vvms/M4 CPtKEtBG4BopxR+PqrTjstZVdlw6avWUk2dFE0KIAOyVYl+nZ0M5qKi9CTvFKLt6 rdZhCKznQ1zUU+wP7fDnEhzbLMfTiZ4EJU8uFl+7SPhu/seuFJ6xOkS8m8vIjvUb FeBk8yCYXlvumsrLjkUI =BEDe -----END PGP SIGNATURE----- Merge tag 'pull_req_20121126' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq changes from MyungJoo Ham. * tag 'pull_req_20121126' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Fix return value in devfreq_remove_governor() PM / devfreq: Fix incorrect argument in error message PM / devfreq: missing rcu_read_lock() added for find_device_opp() PM / devfreq: remove compiler error when a governor is module
This commit is contained in:
commit
92043eafcf
2 changed files with 23 additions and 9 deletions
|
|
@ -643,8 +643,8 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
|
|||
g = find_devfreq_governor(governor->name);
|
||||
if (IS_ERR(g)) {
|
||||
pr_err("%s: governor %s not registered\n", __func__,
|
||||
g->name);
|
||||
err = -EINVAL;
|
||||
governor->name);
|
||||
err = PTR_ERR(g);
|
||||
goto err_out;
|
||||
}
|
||||
list_for_each_entry(devfreq, &devfreq_list, node) {
|
||||
|
|
@ -1023,11 +1023,18 @@ struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq,
|
|||
*/
|
||||
int devfreq_register_opp_notifier(struct device *dev, struct devfreq *devfreq)
|
||||
{
|
||||
struct srcu_notifier_head *nh = opp_get_notifier(dev);
|
||||
struct srcu_notifier_head *nh;
|
||||
int ret = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
nh = opp_get_notifier(dev);
|
||||
if (IS_ERR(nh))
|
||||
return PTR_ERR(nh);
|
||||
return srcu_notifier_chain_register(nh, &devfreq->nb);
|
||||
ret = PTR_ERR(nh);
|
||||
rcu_read_unlock();
|
||||
if (!ret)
|
||||
ret = srcu_notifier_chain_register(nh, &devfreq->nb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1042,11 +1049,18 @@ int devfreq_register_opp_notifier(struct device *dev, struct devfreq *devfreq)
|
|||
*/
|
||||
int devfreq_unregister_opp_notifier(struct device *dev, struct devfreq *devfreq)
|
||||
{
|
||||
struct srcu_notifier_head *nh = opp_get_notifier(dev);
|
||||
struct srcu_notifier_head *nh;
|
||||
int ret = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
nh = opp_get_notifier(dev);
|
||||
if (IS_ERR(nh))
|
||||
return PTR_ERR(nh);
|
||||
return srcu_notifier_chain_unregister(nh, &devfreq->nb);
|
||||
ret = PTR_ERR(nh);
|
||||
rcu_read_unlock();
|
||||
if (!ret)
|
||||
ret = srcu_notifier_chain_unregister(nh, &devfreq->nb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("MyungJoo Ham <[email protected]>");
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ extern int devfreq_register_opp_notifier(struct device *dev,
|
|||
extern int devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
|
||||
#ifdef CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND
|
||||
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
|
||||
/**
|
||||
* struct devfreq_simple_ondemand_data - void *data fed to struct devfreq
|
||||
* and devfreq_add_device
|
||||
|
|
|
|||
Loading…
Reference in a new issue