Commit dbac7546 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'pm-devfreq'

* pm-devfreq:
  PM / devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
  PM / devfreq: add missing of_node_put after calling of_parse_phandle
  PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()
  PM / devfreq: exynos: fix error path in exynos_bus_probe()
  PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate
  PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate
  PM / devfreq: make exynos-bus ARM_EXYNOS_BUS_DEVFREQ tristate
  PM / devfreq: make devfreq-event explicitly non-modular
  PM / devfreq: make devfreq explicitly non-modular
parents 7f234a4d 454cbc44
...@@ -75,7 +75,7 @@ config DEVFREQ_GOV_PASSIVE ...@@ -75,7 +75,7 @@ config DEVFREQ_GOV_PASSIVE
comment "DEVFREQ Drivers" comment "DEVFREQ Drivers"
config ARM_EXYNOS_BUS_DEVFREQ config ARM_EXYNOS_BUS_DEVFREQ
bool "ARM EXYNOS Generic Memory Bus DEVFREQ Driver" tristate "ARM EXYNOS Generic Memory Bus DEVFREQ Driver"
depends on ARCH_EXYNOS depends on ARCH_EXYNOS
select DEVFREQ_GOV_SIMPLE_ONDEMAND select DEVFREQ_GOV_SIMPLE_ONDEMAND
select DEVFREQ_GOV_PASSIVE select DEVFREQ_GOV_PASSIVE
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -481,13 +481,3 @@ static int __init devfreq_event_init(void) ...@@ -481,13 +481,3 @@ static int __init devfreq_event_init(void)
return 0; return 0;
} }
subsys_initcall(devfreq_event_init); subsys_initcall(devfreq_event_init);
static void __exit devfreq_event_exit(void)
{
class_destroy(devfreq_event_class);
}
module_exit(devfreq_event_exit);
MODULE_AUTHOR("Chanwoo Choi <cw00.choi@samsung.com>");
MODULE_DESCRIPTION("DEVFREQ-Event class support");
MODULE_LICENSE("GPL");
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/pm_opp.h> #include <linux/pm_opp.h>
...@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index) ...@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
if (devfreq->dev.parent if (devfreq->dev.parent
&& devfreq->dev.parent->of_node == node) { && devfreq->dev.parent->of_node == node) {
mutex_unlock(&devfreq_list_lock); mutex_unlock(&devfreq_list_lock);
of_node_put(node);
return devfreq; return devfreq;
} }
} }
mutex_unlock(&devfreq_list_lock); mutex_unlock(&devfreq_list_lock);
of_node_put(node);
return ERR_PTR(-EPROBE_DEFER); return ERR_PTR(-EPROBE_DEFER);
} }
...@@ -1199,13 +1201,6 @@ static int __init devfreq_init(void) ...@@ -1199,13 +1201,6 @@ static int __init devfreq_init(void)
} }
subsys_initcall(devfreq_init); subsys_initcall(devfreq_init);
static void __exit devfreq_exit(void)
{
class_destroy(devfreq_class);
destroy_workqueue(devfreq_wq);
}
module_exit(devfreq_exit);
/* /*
* The followings are helper functions for devfreq user device drivers with * The followings are helper functions for devfreq user device drivers with
* OPP framework. * OPP framework.
...@@ -1471,7 +1466,3 @@ void devm_devfreq_unregister_notifier(struct device *dev, ...@@ -1471,7 +1466,3 @@ void devm_devfreq_unregister_notifier(struct device *dev,
devm_devfreq_dev_match, devfreq)); devm_devfreq_dev_match, devfreq));
} }
EXPORT_SYMBOL(devm_devfreq_unregister_notifier); EXPORT_SYMBOL(devm_devfreq_unregister_notifier);
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
MODULE_DESCRIPTION("devfreq class support");
MODULE_LICENSE("GPL");
...@@ -14,7 +14,7 @@ menuconfig PM_DEVFREQ_EVENT ...@@ -14,7 +14,7 @@ menuconfig PM_DEVFREQ_EVENT
if PM_DEVFREQ_EVENT if PM_DEVFREQ_EVENT
config DEVFREQ_EVENT_EXYNOS_NOCP config DEVFREQ_EVENT_EXYNOS_NOCP
bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver" tristate "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
depends on ARCH_EXYNOS depends on ARCH_EXYNOS
select PM_OPP select PM_OPP
help help
...@@ -22,7 +22,7 @@ config DEVFREQ_EVENT_EXYNOS_NOCP ...@@ -22,7 +22,7 @@ config DEVFREQ_EVENT_EXYNOS_NOCP
(Network on Chip) Probe counters to measure the bandwidth of AXI bus. (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
config DEVFREQ_EVENT_EXYNOS_PPMU config DEVFREQ_EVENT_EXYNOS_PPMU
bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver" tristate "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"
depends on ARCH_EXYNOS depends on ARCH_EXYNOS
select PM_OPP select PM_OPP
help help
......
...@@ -482,7 +482,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev) ...@@ -482,7 +482,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
if (!info->edev) { if (!info->edev) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"failed to allocate memory devfreq-event devices\n"); "failed to allocate memory devfreq-event devices\n");
return -ENOMEM; ret = -ENOMEM;
goto err;
} }
edev = info->edev; edev = info->edev;
platform_set_drvdata(pdev, info); platform_set_drvdata(pdev, info);
......
...@@ -383,7 +383,7 @@ static int exynos_bus_parse_of(struct device_node *np, ...@@ -383,7 +383,7 @@ static int exynos_bus_parse_of(struct device_node *np,
static int exynos_bus_probe(struct platform_device *pdev) static int exynos_bus_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node, *node;
struct devfreq_dev_profile *profile; struct devfreq_dev_profile *profile;
struct devfreq_simple_ondemand_data *ondemand_data; struct devfreq_simple_ondemand_data *ondemand_data;
struct devfreq_passive_data *passive_data; struct devfreq_passive_data *passive_data;
...@@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev) ...@@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
/* Parse the device-tree to get the resource information */ /* Parse the device-tree to get the resource information */
ret = exynos_bus_parse_of(np, bus); ret = exynos_bus_parse_of(np, bus);
if (ret < 0) if (ret < 0)
goto err; return ret;
profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL); profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL);
if (!profile) { if (!profile) {
...@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev) ...@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
goto err; goto err;
} }
if (of_parse_phandle(dev->of_node, "devfreq", 0)) node = of_parse_phandle(dev->of_node, "devfreq", 0);
if (node) {
of_node_put(node);
goto passive; goto passive;
else } else {
ret = exynos_bus_parent_parse_of(np, bus); ret = exynos_bus_parent_parse_of(np, bus);
}
if (ret < 0) if (ret < 0)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment