diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-12-19 14:20:59 +0530 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-01-04 15:40:03 +0800 |
commit | c076fc42a4d6c51d6422aaf9f6626bf1adf983e7 (patch) | |
tree | 5f7a69ededd00c935506a8d438126e637bfcafd5 /drivers/thermal | |
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>
Diffstat (limited to 'drivers/thermal')
-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 @@ #include <linux/cpufreq.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/slab.h> @@ -73,15 +74,13 @@ static const struct of_device_id db8500_cpufreq_cooling_match[] = { { .compatible = "stericsson,db8500-cpufreq-cooling" }, {}, }; -#else -#define db8500_cpufreq_cooling_match NULL #endif static struct platform_driver db8500_cpufreq_cooling_driver = { .driver = { .owner = THIS_MODULE, .name = "db8500-cpufreq-cooling", - .of_match_table = db8500_cpufreq_cooling_match, + .of_match_table = of_match_ptr(db8500_cpufreq_cooling_match), }, .probe = db8500_cpufreq_cooling_probe, .suspend = db8500_cpufreq_cooling_suspend, |