From patchwork Wed Dec 19 08:50:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13653 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 2769823E2D for ; Wed, 19 Dec 2012 08:58:26 +0000 (UTC) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by fiordland.canonical.com (Postfix) with ESMTP id D1D3AA187AA for ; Wed, 19 Dec 2012 08:58:25 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id c12so2285448ieb.23 for ; Wed, 19 Dec 2012 00:58:25 -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 :x-gm-message-state; bh=rtF8qnrEa68AH5TCJ1oLiPmOT/JD6C3Vm+fJyO0iDJ8=; b=Xbg+CCt17OAAqtgnqJ9rhLj8k81sQ0BkcK6dPlYTOeV6KQE/yxFysU6BlCItj6cly0 xv67Va4lWbtsTcP/5/g46ixEI37MAIdHW6AJzkB/4Ob1km2BN/sClLrgh43qFj/q8VdZ 4QS1HzdJicNTFElqwYNoFYRZtY22RuClUn9TcgnVLxtO4wTq1XsybK4PIP5i4do47w3c rw+/6Txkh99z95kVEjnlsIVIr9PwwLAWEozQ5X2QqCx/3QU16OjICqxQzSrQ7/SVoask f5/bJJdlrp7YpmqoLv5kOSkpNeC/sBt8KsiX88KuZOscFRcITF5+6nGUUGdQbyRJoYuC Ez8Q== X-Received: by 10.50.151.238 with SMTP id ut14mr5846747igb.58.1355907505181; Wed, 19 Dec 2012 00:58:25 -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 m19csp220592igt; Wed, 19 Dec 2012 00:58:24 -0800 (PST) X-Received: by 10.66.80.70 with SMTP id p6mr15478076pax.23.1355907504556; Wed, 19 Dec 2012 00:58:24 -0800 (PST) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id b9si5063609pax.223.2012.12.19.00.58.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 00:58:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.53 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-f53.google.com with SMTP id jt11so1051054pbb.40 for ; Wed, 19 Dec 2012 00:58:24 -0800 (PST) X-Received: by 10.68.243.33 with SMTP id wv1mr10611706pbc.143.1355907504274; Wed, 19 Dec 2012 00:58:24 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id p10sm3078009pax.27.2012.12.19.00.58.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 00:58:23 -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 1/2] thermal: db8500: Use of_match_ptr() macro in db8500_thermal.c Date: Wed, 19 Dec 2012 14:20:58 +0530 Message-Id: <1355907059-28720-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkEb45X9J7StFNmSxoROP7ymMEptOMTHbkzZjrtxkkV44jcpimb7CVkybhNsynRWBfEnZ6Z 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_thermal.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c index ec71ade..61ce60a 100644 --- a/drivers/thermal/db8500_thermal.c +++ b/drivers/thermal/db8500_thermal.c @@ -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,