From patchwork Tue Mar 12 17:08:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2257411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 0441CDF23A for ; Tue, 12 Mar 2013 17:13:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFSiK-0005Bn-HS; Tue, 12 Mar 2013 17:10:14 +0000 Received: from mail-ie0-x22c.google.com ([2607:f8b0:4001:c03::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFShJ-0004vY-Kt for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 17:09:10 +0000 Received: by mail-ie0-f172.google.com with SMTP id c10so103337ieb.17 for ; Tue, 12 Mar 2013 10:09:08 -0700 (PDT) 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=+VtYsMTcPo4nQZGIiIOfb9KNloM0QxncGfv3mKIQtOQ=; b=gO/gxxCcVTzoi0TMaxPKgIT4uGF29m/qOUmK2NPN9zC8MT/b0Pjup0zLjI+s0hsAzQ ea2a6x+bBNJxvxyXRAiyNy99MW6AUDACUy+zsC5Jn0eDeiT2CwBbQOhsqAfcljBtkHKC xXS4x0UUES9/hX3IVHtYhvmRNSYCPfH4k26sxsNRJuxGyyOuCPfl4UKHb1rAiTkkrkIl Rase00moDrKBp4muCkeR698hTfW3W3XiHbsidQjeTf3zAud7zHQkiSMZM/BrvqnB5++f Ek0u5RxGCWWajXtvWx2HdRtkUwvzNMFbkWbvw5SEjUNB4oFZdYDxt4BP5exHnRKoRaWE Egwg== X-Received: by 10.42.204.79 with SMTP id fl15mr12943584icb.57.1363108148445; Tue, 12 Mar 2013 10:09:08 -0700 (PDT) Received: from localhost.localdomain ([140.206.155.72]) by mx.google.com with ESMTPS id xc3sm20593825igb.10.2013.03.12.10.09.03 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:07 -0700 (PDT) From: Haojian Zhuang To: linux@arm.linux.org.uk, linus.walleij@linaro.org, arnd@arndb.de, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, pawel.moll@arm.com, swarren@nvidia.com, john.stultz@linaro.org, tglx@linutronix.de, mturquette@linaro.org Subject: [PATCH v2 03/14] clocksource: sp804: append CONFIG_OF Date: Wed, 13 Mar 2013 01:08:32 +0800 Message-Id: <1363108124-17484-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> References: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQn0oejclLQMGA7qDazITtevblRd0aF66xMK2bGoSXcZmOKP5nTbdilsXN4pagUv0iKeWxU/ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_130909_803458_A05D642A X-CRM114-Status: GOOD ( 10.39 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org of_find_matching_node() & of_device_is_available() are depend on CONFIG_OF macro. If CONFIG_OF isn't defined for non-DT mode, the build error occurs. So add CONFIG_OF for those DT functions. Signed-off-by: Haojian Zhuang --- drivers/clocksource/timer-sp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/timer-sp.c b/drivers/clocksource/timer-sp.c index f8c2c54..5f2d700 100644 --- a/drivers/clocksource/timer-sp.c +++ b/drivers/clocksource/timer-sp.c @@ -197,6 +197,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); } +#ifdef CONFIG_OF static struct device_node *from = NULL; static struct of_device_id sp804_timer_match[] __initdata = { @@ -294,3 +295,4 @@ err: iounmap(base); } CLOCKSOURCE_OF_DECLARE(sp804, "arm,sp804", sp804_dt_init); +#endif