From patchwork Thu Jan 17 06:23:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 14096 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 862D523E1F for ; Thu, 17 Jan 2013 06:31:44 +0000 (UTC) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by fiordland.canonical.com (Postfix) with ESMTP id 47FC4A18115 for ; Thu, 17 Jan 2013 06:31:44 +0000 (UTC) Received: by mail-vc0-f179.google.com with SMTP id p1so2134468vcq.38 for ; Wed, 16 Jan 2013 22:31:43 -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=zFe3T8TYbWGmdYyxvEL0SshwIhOOPq18I1v8c8k2kA0=; b=P/5vd2jAE1P8gV5l8W8sIFak06ieKWToKTwFQkOFDBFGS4f51R39d7EHHxMAhK9tuK 9p82bgT3ZXkOMEW6BjMx2Xybs12Fc3LjfzwqctOW+i7NrhtO5Fu4MUYoAWP2ArY4d2Tf vY7YNYq1lOu0WhSn4Jrziy4kQQbNUlMC9Xw9paVwTXYqBt26LLUUbSzx2Y90lZ5AX4DM NkYy0ebOq9Y8d1PXh9D7ZZp5C6Op8yM0WgPfey3f+CathDlPo8w1hCS7H5vyUSG2AgYM Cq/QHVrhxVjj4Blb+P+ox1d3pU7yP/QWD6gjKe9tmyg4b10YBIQbcI8koeRCtUBnn2iZ VlOg== X-Received: by 10.52.18.207 with SMTP id y15mr3731338vdd.8.1358404303740; Wed, 16 Jan 2013 22:31:43 -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.58.145.101 with SMTP id st5csp14892veb; Wed, 16 Jan 2013 22:31:42 -0800 (PST) X-Received: by 10.66.81.198 with SMTP id c6mr10810818pay.50.1358404301658; Wed, 16 Jan 2013 22:31:41 -0800 (PST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id j9si1047363pav.68.2013.01.16.22.31.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jan 2013 22:31:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.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-pa0-f53.google.com with SMTP id hz1so1271998pad.12 for ; Wed, 16 Jan 2013 22:31:40 -0800 (PST) X-Received: by 10.66.89.132 with SMTP id bo4mr10753880pab.62.1358404300701; Wed, 16 Jan 2013 22:31:40 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id jv1sm483474pbc.36.2013.01.16.22.31.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Jan 2013 22:31:40 -0800 (PST) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] drivers/rtc/rtc-twl: use of_match_ptr() macro Date: Thu, 17 Jan 2013 11:53:08 +0530 Message-Id: <1358403788-20384-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmQxbbmcSvf0G7tnW30UoFjZaVovBXNz0Jk/DBGMXwIRu26pvQerRBduvGwOKAawX37dtoo Used of_match_ptr() macro with CONFIG_OF defined. This maintains code consistency with the rest of the drivers. Signed-off-by: Sachin Kamat --- Compile tested on linux-next (20130117). This driver was left out from "drivers/rtc: use of_match_ptr() macro" patch as its dependencies gave compilation errors then. --- drivers/rtc/rtc-twl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index ccd4ad3..8bc6c80 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -588,11 +589,14 @@ static int twl_rtc_resume(struct platform_device *pdev) #define twl_rtc_resume NULL #endif +#ifdef CONFIG_OF static const struct of_device_id twl_rtc_of_match[] = { {.compatible = "ti,twl4030-rtc", }, { }, }; MODULE_DEVICE_TABLE(of, twl_rtc_of_match); +#endif + MODULE_ALIAS("platform:twl_rtc"); static struct platform_driver twl4030rtc_driver = { @@ -604,7 +608,7 @@ static struct platform_driver twl4030rtc_driver = { .driver = { .owner = THIS_MODULE, .name = "twl_rtc", - .of_match_table = twl_rtc_of_match, + .of_match_table = of_match_ptr(twl_rtc_of_match), }, };