diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-12-19 03:50:59 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-01-04 02:40:03 -0500 |
commit | c076fc42a4d6c51d6422aaf9f6626bf1adf983e7 (patch) | |
tree | 5f7a69ededd00c935506a8d438126e637bfcafd5 | |
parent | c313637641c3e33388903e16cfde97b2e67adb9e (diff) |
thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.c
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Hongbo Zhang <hongbo.zhang@stericsson.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/db8500_cpufreq_cooling.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 4cf8e72af90a..21419851fc02 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++ b/drivers/thermal/db8500_cpufreq_cooling.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/of.h> | ||
24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
26 | 27 | ||
@@ -73,15 +74,13 @@ static const struct of_device_id db8500_cpufreq_cooling_match[] = { | |||
73 | { .compatible = "stericsson,db8500-cpufreq-cooling" }, | 74 | { .compatible = "stericsson,db8500-cpufreq-cooling" }, |
74 | {}, | 75 | {}, |
75 | }; | 76 | }; |
76 | #else | ||
77 | #define db8500_cpufreq_cooling_match NULL | ||
78 | #endif | 77 | #endif |
79 | 78 | ||
80 | static struct platform_driver db8500_cpufreq_cooling_driver = { | 79 | static struct platform_driver db8500_cpufreq_cooling_driver = { |
81 | .driver = { | 80 | .driver = { |
82 | .owner = THIS_MODULE, | 81 | .owner = THIS_MODULE, |
83 | .name = "db8500-cpufreq-cooling", | 82 | .name = "db8500-cpufreq-cooling", |
84 | .of_match_table = db8500_cpufreq_cooling_match, | 83 | .of_match_table = of_match_ptr(db8500_cpufreq_cooling_match), |
85 | }, | 84 | }, |
86 | .probe = db8500_cpufreq_cooling_probe, | 85 | .probe = db8500_cpufreq_cooling_probe, |
87 | .suspend = db8500_cpufreq_cooling_suspend, | 86 | .suspend = db8500_cpufreq_cooling_suspend, |