From patchwork Wed Dec 19 10:04:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13655 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 4144323E04 for ; Wed, 19 Dec 2012 10:11:52 +0000 (UTC) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) by fiordland.canonical.com (Postfix) with ESMTP id DE83CA1817C for ; Wed, 19 Dec 2012 10:11:51 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id qd14so2414243ieb.6 for ; Wed, 19 Dec 2012 02:11:51 -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=66Qmxwis42fICJiwgWiF4cSpj3iXcR8zy9Y/VjMrtcU=; b=A80V6UncpQC3nJ/bfNH8pHCoHeEnozeYGBy0mqIndZ9RQ90x2SO3dVbNzXsubAvtPH 0l9EIjaQnufEDQ9jfnmWOU+p2GJ8IhiYb/zqg8X4kvaFo15wr+Z3FE5RfSEMU/XtPoH3 Kdzrqkdl3e6BrNnW/nXLpSDIP7rz0QeGgKDD1xcifLWB6Q63ymC46eG0UDhzKNYrNjmx zPZcN3RJ9FyOW+dZf4nwcpUJP/hIMWljkT4s1YEIWS4xlMyKMnG+0wSm+FxgBM4kKoYu hOt47Kam+a2tEuFsf3LCmg0sLaZWwBLHxQDTFlbESAnfrLKxY2WCEritizTIAhSIvHh9 5l5A== X-Received: by 10.50.53.175 with SMTP id c15mr1427964igp.106.1355911911253; Wed, 19 Dec 2012 02:11:51 -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 m19csp224116igt; Wed, 19 Dec 2012 02:11:50 -0800 (PST) X-Received: by 10.68.244.233 with SMTP id xj9mr16941837pbc.167.1355911910230; Wed, 19 Dec 2012 02:11:50 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id rg4si4851368pbc.23.2012.12.19.02.11.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 02:11:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.51 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-f51.google.com with SMTP id ro12so1104518pbb.10 for ; Wed, 19 Dec 2012 02:11:49 -0800 (PST) X-Received: by 10.66.85.39 with SMTP id e7mr15823340paz.63.1355911909299; Wed, 19 Dec 2012 02:11:49 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id rk6sm2874105pbc.20.2012.12.19.02.11.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 02:11:48 -0800 (PST) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: akpm@linux-foundation.org, sachin.kamat@linaro.org, patches@linaro.org, David Brownell , Alessandro Zummo Subject: [PATCH 1/1] rtc-cmos: Use of_match_ptr() macro Date: Wed, 19 Dec 2012 15:34:20 +0530 Message-Id: <1355911460-19926-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmKvw+TB3pjWr8OkU1hDZa/y1AZfP1aOpJjxAbD2+T5QMYFM+ertOYrodZoj9xDHXLs50dJ This eliminates having an #ifdef returning NULL for the case when OF is disabled. Cc: David Brownell Cc: Alessandro Zummo Signed-off-by: Sachin Kamat --- Compile tested using linux-next tree. --- drivers/rtc/rtc-cmos.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 4267789..2e84a64 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -1101,7 +1101,6 @@ static __init void cmos_of_init(struct platform_device *pdev) } #else static inline void cmos_of_init(struct platform_device *pdev) {} -#define of_cmos_match NULL #endif /*----------------------------------------------------------------*/ @@ -1143,7 +1142,7 @@ static struct platform_driver cmos_platform_driver = { #ifdef CONFIG_PM .pm = &cmos_pm_ops, #endif - .of_match_table = of_cmos_match, + .of_match_table = of_match_ptr(of_cmos_match), } };