From patchwork Tue Sep 9 06:11:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 4866091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 72CB19F32E for ; Tue, 9 Sep 2014 06:14:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A4E320145 for ; Tue, 9 Sep 2014 06:14:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB585200D0 for ; Tue, 9 Sep 2014 06:14:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XREfA-0007Hs-GJ; Tue, 09 Sep 2014 06:12:24 +0000 Received: from mail-pd0-f178.google.com ([209.85.192.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XREf6-0006vy-3o for linux-arm-kernel@lists.infradead.org; Tue, 09 Sep 2014 06:12:20 +0000 Received: by mail-pd0-f178.google.com with SMTP id p10so5401297pdj.37 for ; Mon, 08 Sep 2014 23:11:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=bfqnI3eKDIOuGHQsVHiQgP0c7WTce6BuLQJUuWxcS3w=; b=mTd2vvPeJRGLYpO31ecn9PVdhN8iZl5SaEzreSrPOBP9tlgY6alXCSoFnkO/aqBMgu taEUneBCmZ+K2ZKgarRQmF8kGDUp9FxqqRXiD+Ty+J7XJKaef+K7tquya/ITIjcIdSn2 QOP/dPpxCw6bSfUHGjyyHcN6kC2DkTn1iOumxj9MGlP0fDzIJatiaNMSzEvaE0PEcy/B 77JAZATAesVxJaOECZT3Q39YvJw3UUnyqC+/djz6kAfHN21x86+G6M9euhJupxJNstBn wImUhy4ybWxA2zMzwSZT5s5ktfWQNRIrg/ai1WdEJyxMBRLY3C4uNZK+4uqMOIrttO2U BDYA== X-Gm-Message-State: ALoCoQlg00jyL7dtJ9yMdScIc1SzxAow6cva3d3viOMVEk+XDe2Vb//yzVUmkKT8ExIeFs50VIAB X-Received: by 10.66.145.133 with SMTP id su5mr15950805pab.11.1410243118460; Mon, 08 Sep 2014 23:11:58 -0700 (PDT) Received: from quantum.home (pool-108-47-66-231.lsanca.fios.verizon.net. [108.47.66.231]) by mx.google.com with ESMTPSA id z3sm381436pbt.91.2014.09.08.23.11.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Sep 2014 23:11:57 -0700 (PDT) From: Mike Turquette To: s.nawrocki@samsung.com, tomeu.vizoso@collabora.com Subject: [PATCH 2/2] asm-generic: COMMON_CLK defines __clk_{get,put} Date: Mon, 8 Sep 2014 23:11:26 -0700 Message-Id: <1410243086-14925-1-git-send-email-mturquette@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1410242868-14750-1-git-send-email-mturquette@linaro.org> References: <1410242868-14750-1-git-send-email-mturquette@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140908_231220_188906_EFBCE240 X-CRM114-Status: GOOD ( 11.37 ) X-Spam-Score: -2.5 (--) Cc: Mike Turquette , linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_COMMON_CLK is selected then __clk_get and __clk_put are defined in drivers/clk/clk.c and declared in include/linux/clkdev.h. Sylwester's series[0] to properly support clk_{get,put} in the common clock framework made changes to the asm-specific clkdev.h headers, but not the asm-generic version. Tomeu's recent changes[1] to introduce a provider/consumer split in the clock framework uncovered this problem, causing the following build error on any architecture using the asm-generic clkdev.h (e.g. x86 architecture and the ACPI LPSS driver): In file included from drivers/acpi/acpi_lpss.c:15:0: include/linux/clkdev.h:59:5: error: conflicting types for ‘__clk_get’ int __clk_get(struct clk_core *clk); ^ In file included from arch/x86/include/generated/asm/clkdev.h:1:0, from include/linux/clkdev.h:15, from drivers/acpi/acpi_lpss.c:15: include/asm-generic/clkdev.h:20:19: note: previous definition of ‘__clk_get’ was here static inline int __clk_get(struct clk *clk) { return 1; } ^ Fixed by only declarating __clk_get and __clk_put when CONFIG_COMMON_CLK is set. [0] http://lkml.kernel.org/r/<1386177127-2894-5-git-send-email-s.nawrocki@samsung.com> [1] http://lkml.kernel.org/r/<1409758148-20104-1-git-send-email-tomeu.vizoso@collabora.com> Signed-off-by: Mike Turquette --- include/asm-generic/clkdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h index 90a32a6..4ff33474 100644 --- a/include/asm-generic/clkdev.h +++ b/include/asm-generic/clkdev.h @@ -15,10 +15,12 @@ #include +#ifndef CONFIG_COMMON_CLK struct clk; static inline int __clk_get(struct clk *clk) { return 1; } static inline void __clk_put(struct clk *clk) { } +#endif static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) {