From patchwork Wed Dec 19 08:50:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13654 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7757323E2D for ; Wed, 19 Dec 2012 08:58:29 +0000 (UTC) Received: from mail-ia0-f169.google.com (mail-ia0-f169.google.com [209.85.210.169]) by fiordland.canonical.com (Postfix) with ESMTP id 2D673A187AA for ; Wed, 19 Dec 2012 08:58:29 +0000 (UTC) Received: by mail-ia0-f169.google.com with SMTP id r4so1499668iaj.14 for ; Wed, 19 Dec 2012 00:58:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=qfBBgD1OzqeP1bJotRKClBpJ8wCO4aobh/QSpWMrzc0=; b=lF1pAmegLcjlUhPwMLj/Ne86Qrqy4q7k5dHsUtAXmqDNWhGmPZ11N1RxP/6aUfGmWM LwqgOGZZ+cjSgHMCT8XzJ7Ickoquowgq/PGJ2KgmWX/u0x2S+Xp2FipET18uGC7aReRv p1xXBROXCodieMBRC6ZAQFuQj1kimKkieA3y/ZCz8M0zLbXJafRLMsB07BJ67YAWdtF9 /IOOU3Dw2sHei8hJZqPy9CDbaZHdwH202ycJu6Zxk3IKU+g+3Y8bG5E2ZmVtEUrDXSA6 Z3lVQj3zL1S7aI4AvCyqDH5QNv4I4fzBoFbJkMLvLxd6RIXFS7HbIgUswUuDu8MtVBTc vS1w== X-Received: by 10.50.53.175 with SMTP id c15mr1277303igp.106.1355907508522; Wed, 19 Dec 2012 00:58:28 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.115 with SMTP id m19csp220594igt; Wed, 19 Dec 2012 00:58:28 -0800 (PST) X-Received: by 10.66.73.167 with SMTP id m7mr15252776pav.68.1355907507809; Wed, 19 Dec 2012 00:58:27 -0800 (PST) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id s7si5066367pax.210.2012.12.19.00.58.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 00:58:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.52; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f52.google.com with SMTP id ro2so1048701pbb.11 for ; Wed, 19 Dec 2012 00:58:27 -0800 (PST) X-Received: by 10.68.189.65 with SMTP id gg1mr16227131pbc.57.1355907507578; Wed, 19 Dec 2012 00:58:27 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id p10sm3078009pax.27.2012.12.19.00.58.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 00:58:26 -0800 (PST) From: Sachin Kamat To: linux-pm@vger.kernel.org Cc: rui.zhang@intel.com, hongbo.zhang@linaro.org, sachin.kamat@linaro.org, patches@linaro.org, Hongbo Zhang 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 Message-Id: <1355907059-28720-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1355907059-28720-1-git-send-email-sachin.kamat@linaro.org> References: <1355907059-28720-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkhlpgKIEUxyaz4s6JF1KkkNFKPSLhIPEwk8IcZe9xzGtIlc6/y8QQu1kow7Kld/idwoj7c This eliminates having an #ifdef returning NULL for the case when OF is disabled. Cc: Hongbo Zhang Signed-off-by: Sachin Kamat Reviewed-by: hongbo.zhang@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 #include #include +#include #include #include @@ -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,