All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-pm@vger.kernel.org
Cc: rui.zhang@intel.com, hongbo.zhang@linaro.org,
	sachin.kamat@linaro.org, patches@linaro.org,
	Hongbo Zhang <hongbo.zhang@stericsson.com>
Subject: [PATCH 2/2] thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.c
Date: Wed, 19 Dec 2012 14:20:59 +0530	[thread overview]
Message-ID: <1355907059-28720-2-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1355907059-28720-1-git-send-email-sachin.kamat@linaro.org>

This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Cc: Hongbo Zhang <hongbo.zhang@stericsson.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Compile tested on linux-next.
---
 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 4cf8e72..2141985 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,
-- 
1.7.4.1


  reply	other threads:[~2012-12-19  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19  8:50 [PATCH 1/2] thermal: db8500: Use of_match_ptr() macro in db8500_thermal.c Sachin Kamat
2012-12-19  8:50 ` Sachin Kamat [this message]
2013-01-03  9:07   ` [PATCH 2/2] thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.c Hongbo Zhang
2013-01-04  7:36   ` Zhang Rui
2013-01-03  9:05 ` [PATCH 1/2] thermal: db8500: Use of_match_ptr() macro in db8500_thermal.c Hongbo Zhang
2013-01-04  7:36 ` Zhang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355907059-28720-2-git-send-email-sachin.kamat@linaro.org \
    --to=sachin.kamat@linaro.org \
    --cc=hongbo.zhang@linaro.org \
    --cc=hongbo.zhang@stericsson.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rui.zhang@intel.com \
    --subject='Re: [PATCH 2/2] thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.