diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-25 07:45:11 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-25 07:45:11 -0400 |
commit | dbac75468eef385dc8d4bf9927a7547a17edb416 (patch) | |
tree | 5a15630edf5a0b9c0a6514c236e52bab861d550a | |
parent | 7f234a4d8aab23e778933808a88bfa47ea4fdc2a (diff) | |
parent | 454cbc446fa378ddab3052e0d01aeb4ceb8304e2 (diff) |
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
-rw-r--r-- | drivers/devfreq/Kconfig | 2 | ||||
-rw-r--r-- | drivers/devfreq/devfreq-event.c | 12 | ||||
-rw-r--r-- | drivers/devfreq/devfreq.c | 15 | ||||
-rw-r--r-- | drivers/devfreq/event/Kconfig | 4 | ||||
-rw-r--r-- | drivers/devfreq/event/exynos-ppmu.c | 3 | ||||
-rw-r--r-- | drivers/devfreq/exynos-bus.c | 11 |
6 files changed, 16 insertions, 31 deletions
diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig index 78dac0e9da11..a5be56ec57f2 100644 --- a/drivers/devfreq/Kconfig +++ b/drivers/devfreq/Kconfig | |||
@@ -75,7 +75,7 @@ config DEVFREQ_GOV_PASSIVE | |||
75 | comment "DEVFREQ Drivers" | 75 | comment "DEVFREQ Drivers" |
76 | 76 | ||
77 | config ARM_EXYNOS_BUS_DEVFREQ | 77 | config ARM_EXYNOS_BUS_DEVFREQ |
78 | bool "ARM EXYNOS Generic Memory Bus DEVFREQ Driver" | 78 | tristate "ARM EXYNOS Generic Memory Bus DEVFREQ Driver" |
79 | depends on ARCH_EXYNOS | 79 | depends on ARCH_EXYNOS |
80 | select DEVFREQ_GOV_SIMPLE_ONDEMAND | 80 | select DEVFREQ_GOV_SIMPLE_ONDEMAND |
81 | select DEVFREQ_GOV_PASSIVE | 81 | select DEVFREQ_GOV_PASSIVE |
diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c index 39b048eda2ce..9aea2c7ecbe6 100644 --- a/drivers/devfreq/devfreq-event.c +++ b/drivers/devfreq/devfreq-event.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/export.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
@@ -481,13 +481,3 @@ static int __init devfreq_event_init(void) | |||
481 | return 0; | 481 | return 0; |
482 | } | 482 | } |
483 | subsys_initcall(devfreq_event_init); | 483 | subsys_initcall(devfreq_event_init); |
484 | |||
485 | static void __exit devfreq_event_exit(void) | ||
486 | { | ||
487 | class_destroy(devfreq_event_class); | ||
488 | } | ||
489 | module_exit(devfreq_event_exit); | ||
490 | |||
491 | MODULE_AUTHOR("Chanwoo Choi <cw00.choi@samsung.com>"); | ||
492 | MODULE_DESCRIPTION("DEVFREQ-Event class support"); | ||
493 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index e92418facc92..478006b7764a 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/export.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
21 | #include <linux/pm_opp.h> | 21 | #include <linux/pm_opp.h> |
@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index) | |||
707 | if (devfreq->dev.parent | 707 | if (devfreq->dev.parent |
708 | && devfreq->dev.parent->of_node == node) { | 708 | && devfreq->dev.parent->of_node == node) { |
709 | mutex_unlock(&devfreq_list_lock); | 709 | mutex_unlock(&devfreq_list_lock); |
710 | of_node_put(node); | ||
710 | return devfreq; | 711 | return devfreq; |
711 | } | 712 | } |
712 | } | 713 | } |
713 | mutex_unlock(&devfreq_list_lock); | 714 | mutex_unlock(&devfreq_list_lock); |
715 | of_node_put(node); | ||
714 | 716 | ||
715 | return ERR_PTR(-EPROBE_DEFER); | 717 | return ERR_PTR(-EPROBE_DEFER); |
716 | } | 718 | } |
@@ -1199,13 +1201,6 @@ static int __init devfreq_init(void) | |||
1199 | } | 1201 | } |
1200 | subsys_initcall(devfreq_init); | 1202 | subsys_initcall(devfreq_init); |
1201 | 1203 | ||
1202 | static void __exit devfreq_exit(void) | ||
1203 | { | ||
1204 | class_destroy(devfreq_class); | ||
1205 | destroy_workqueue(devfreq_wq); | ||
1206 | } | ||
1207 | module_exit(devfreq_exit); | ||
1208 | |||
1209 | /* | 1204 | /* |
1210 | * The followings are helper functions for devfreq user device drivers with | 1205 | * The followings are helper functions for devfreq user device drivers with |
1211 | * OPP framework. | 1206 | * OPP framework. |
@@ -1471,7 +1466,3 @@ void devm_devfreq_unregister_notifier(struct device *dev, | |||
1471 | devm_devfreq_dev_match, devfreq)); | 1466 | devm_devfreq_dev_match, devfreq)); |
1472 | } | 1467 | } |
1473 | EXPORT_SYMBOL(devm_devfreq_unregister_notifier); | 1468 | EXPORT_SYMBOL(devm_devfreq_unregister_notifier); |
1474 | |||
1475 | MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); | ||
1476 | MODULE_DESCRIPTION("devfreq class support"); | ||
1477 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig index 1e8b4f469f38..eb6f74a2b6b9 100644 --- a/drivers/devfreq/event/Kconfig +++ b/drivers/devfreq/event/Kconfig | |||
@@ -14,7 +14,7 @@ menuconfig PM_DEVFREQ_EVENT | |||
14 | if PM_DEVFREQ_EVENT | 14 | if PM_DEVFREQ_EVENT |
15 | 15 | ||
16 | config DEVFREQ_EVENT_EXYNOS_NOCP | 16 | config DEVFREQ_EVENT_EXYNOS_NOCP |
17 | bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver" | 17 | tristate "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver" |
18 | depends on ARCH_EXYNOS | 18 | depends on ARCH_EXYNOS |
19 | select PM_OPP | 19 | select PM_OPP |
20 | help | 20 | help |
@@ -22,7 +22,7 @@ config DEVFREQ_EVENT_EXYNOS_NOCP | |||
22 | (Network on Chip) Probe counters to measure the bandwidth of AXI bus. | 22 | (Network on Chip) Probe counters to measure the bandwidth of AXI bus. |
23 | 23 | ||
24 | config DEVFREQ_EVENT_EXYNOS_PPMU | 24 | config DEVFREQ_EVENT_EXYNOS_PPMU |
25 | bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver" | 25 | tristate "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver" |
26 | depends on ARCH_EXYNOS | 26 | depends on ARCH_EXYNOS |
27 | select PM_OPP | 27 | select PM_OPP |
28 | help | 28 | help |
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index f312485f1451..845bf25fb9fb 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c | |||
@@ -482,7 +482,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev) | |||
482 | if (!info->edev) { | 482 | if (!info->edev) { |
483 | dev_err(&pdev->dev, | 483 | dev_err(&pdev->dev, |
484 | "failed to allocate memory devfreq-event devices\n"); | 484 | "failed to allocate memory devfreq-event devices\n"); |
485 | return -ENOMEM; | 485 | ret = -ENOMEM; |
486 | goto err; | ||
486 | } | 487 | } |
487 | edev = info->edev; | 488 | edev = info->edev; |
488 | platform_set_drvdata(pdev, info); | 489 | platform_set_drvdata(pdev, info); |
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 2363d0a189b7..29866f7e6d7e 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c | |||
@@ -383,7 +383,7 @@ err_clk: | |||
383 | static int exynos_bus_probe(struct platform_device *pdev) | 383 | static int exynos_bus_probe(struct platform_device *pdev) |
384 | { | 384 | { |
385 | struct device *dev = &pdev->dev; | 385 | struct device *dev = &pdev->dev; |
386 | struct device_node *np = dev->of_node; | 386 | struct device_node *np = dev->of_node, *node; |
387 | struct devfreq_dev_profile *profile; | 387 | struct devfreq_dev_profile *profile; |
388 | struct devfreq_simple_ondemand_data *ondemand_data; | 388 | struct devfreq_simple_ondemand_data *ondemand_data; |
389 | struct devfreq_passive_data *passive_data; | 389 | struct devfreq_passive_data *passive_data; |
@@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev) | |||
407 | /* Parse the device-tree to get the resource information */ | 407 | /* Parse the device-tree to get the resource information */ |
408 | ret = exynos_bus_parse_of(np, bus); | 408 | ret = exynos_bus_parse_of(np, bus); |
409 | if (ret < 0) | 409 | if (ret < 0) |
410 | goto err; | 410 | return ret; |
411 | 411 | ||
412 | profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL); | 412 | profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL); |
413 | if (!profile) { | 413 | if (!profile) { |
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev) | |||
415 | goto err; | 415 | goto err; |
416 | } | 416 | } |
417 | 417 | ||
418 | if (of_parse_phandle(dev->of_node, "devfreq", 0)) | 418 | node = of_parse_phandle(dev->of_node, "devfreq", 0); |
419 | if (node) { | ||
420 | of_node_put(node); | ||
419 | goto passive; | 421 | goto passive; |
420 | else | 422 | } else { |
421 | ret = exynos_bus_parent_parse_of(np, bus); | 423 | ret = exynos_bus_parent_parse_of(np, bus); |
424 | } | ||
422 | 425 | ||
423 | if (ret < 0) | 426 | if (ret < 0) |
424 | goto err; | 427 | goto err; |