thermal: db8500: Use of_match_ptr() macro in db8500_thermal.c
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 19 Dec 2012 08:50:58 +0000 (14:20 +0530)
committerZhang Rui <rui.zhang@intel.com>
Fri, 4 Jan 2013 07:39:32 +0000 (15:39 +0800)
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>
drivers/thermal/db8500_thermal.c

index ec71ade3e3174491df515a33bd0c3b25e7f0c818..61ce60a35921d8ca543bcc275a5b7d479b98fa4f 100644 (file)
@@ -508,15 +508,13 @@ static const struct of_device_id db8500_thermal_match[] = {
        { .compatible = "stericsson,db8500-thermal" },
        {},
 };
-#else
-#define db8500_thermal_match NULL
 #endif
 
 static struct platform_driver db8500_thermal_driver = {
        .driver = {
                .owner = THIS_MODULE,
                .name = "db8500-thermal",
-               .of_match_table = db8500_thermal_match,
+               .of_match_table = of_match_ptr(db8500_thermal_match),
        },
        .probe = db8500_thermal_probe,
        .suspend = db8500_thermal_suspend,