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: 1895121 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8E8463FC66 for ; Wed, 19 Dec 2012 09:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481Ab2LSJzt (ORCPT ); Wed, 19 Dec 2012 04:55:49 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:43051 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976Ab2LSJzs (ORCPT ); Wed, 19 Dec 2012 04:55:48 -0500 X-Greylist: delayed 3131 seconds by postgrey-1.27 at vger.kernel.org; Wed, 19 Dec 2012 04:55:48 EST Received: by mail-pb0-f48.google.com with SMTP id rq13so1088285pbb.35 for ; Wed, 19 Dec 2012 01:55:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=qfBBgD1OzqeP1bJotRKClBpJ8wCO4aobh/QSpWMrzc0=; b=dMJdbUM3Otgtea89UnQJH+Gogm8vPB8W8Lol1M8XJiavXh44zM1QW1hIImOFsQI+K4 wn60+Me8asY9BG7koLkmy0qcnqlH/u4j0LNxi77/aSZXbY2H6aB1Dafn20Tu0Bqg+U3I ewQd1MEGFDMos6DNGbXecTe21R0YAmMAV/6BazahSywBiGMrFxN6nzlMkFpdwHTXl8th BmtpTz05OvQC0MM0Ke3m1pLbMyQhXD2CbRvINaQrB/ytgZ3xuOV8zV3dHE7Q7soU1b2z P5gR+GBgdACF2ASkMXwN5zK9T/hX8wiNocajgzEFaPJnpDrteDv4+30/1fsbfPVEy8aa FFnQ== 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: ALoCoQmZI4FuIlowBv2cUwOiHMYHVNZokvMUsrqDBvaNwu1Ak4qMCSRL5lKX8tuAnx4xIcFFY/93 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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,