From patchwork Sun Apr 28 10:24:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2498021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id DF684DF2E5 for ; Sun, 28 Apr 2013 10:31:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWOt5-0000nn-K0; Sun, 28 Apr 2013 10:31:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWOsz-0000YY-Sg; Sun, 28 Apr 2013 10:31:14 +0000 Received: from mail-ee0-f53.google.com ([74.125.83.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWOsv-0000YE-EW for linux-arm-kernel@lists.infradead.org; Sun, 28 Apr 2013 10:31:10 +0000 Received: by mail-ee0-f53.google.com with SMTP id d17so2305772eek.40 for ; Sun, 28 Apr 2013 03:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=Dy5GVj6wQpR3W8iJGcpKZCURG6RECDQy8XsXMZfK6AA=; b=uNQjyq5F/MJ6O0m4+kuVPLP2ks/2H35v9NrJOQncV2D7pD12x1/42eC7oA9OiA3GQS E8semz+tRTG9L6KvXxk4dkL9V9mPsGg+yfRlCzn9DzY73YFqZerqF/d1ybRMfvNVZXgO v0YVKGA1tw6E50aCzJj4oIYGQEkw/HXu8aOArWQm9q10vwuUYjgVcoBBguVJ5vvHN/Yq c3Nzb9A+LPIzSSw6KNhMee2XHCuMZoK5GYzp1YWE/zhNoaMfiMPVLGKE1NpFJuKHhhcR UxUGK+vJaITlQ8mMvA43fNdoyN8dG/871mz+Y5XBFqeUIiDIL0hhFmkzyvIse1DDqxWs Po3w== X-Received: by 10.15.93.202 with SMTP id w50mr85768957eez.45.1367144689998; Sun, 28 Apr 2013 03:24:49 -0700 (PDT) Received: from topkick.lan (dslc-082-083-251-181.pools.arcor-ip.net. [82.83.251.181]) by mx.google.com with ESMTPSA id k43sm26793545een.2.2013.04.28.03.24.47 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Apr 2013 03:24:49 -0700 (PDT) Received: from edge.lan (magicgate.lan [192.168.1.1]) by topkick.lan (Postfix) with ESMTPSA id 91C735FD1B; Sun, 28 Apr 2013 12:24:27 +0200 (CEST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH] clk: si5351: Allow to build without CONFIG_OF Date: Sun, 28 Apr 2013 12:24:41 +0200 Message-Id: <1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130428_063109_648869_A0059362 X-CRM114-Status: GOOD ( 18.26 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.53 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sebastian.hesselbarth[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-doc@vger.kernel.org, Linus Walleij , Thierry Reding , Grant Likely , Marek Belisko , Stephen Rothwell , Lars-Peter Clausen , Mike Turquette , Arnd Bergmann , Rabeeh Khoury , Guenter Roeck , Pawel Moll , devicetree-discuss@lists.ozlabs.org, Rob Herring , Dom Cobley , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, Jean-Francois Moine , Michal Bachraty , Stephen Warren , Mark Brown , linux-kernel@vger.kernel.org, Daniel Mack , Rob Landley , Andrew Morton 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 In clk-si5351 there was some dependency to CONFIG_OF that permitted the use of the driver on !CONFIG_OF platforms. This patch adds proper #ifdef around of_clk_add_provider and removes the dependency on CONFIG_OF. Signed-off-by: Sebastian Hesselbarth --- Note: This patch is based upon v3.9-rc8 with clk-si5351 v8 plus two fixes by Marek Belisko applied. It has been compile-tested on x86_64 allmodconfig. Cc: Stephen Rothwell Cc: Grant Likely Cc: Rob Herring Cc: Rob Landley Cc: Mike Turquette Cc: Stephen Warren Cc: Thierry Reding Cc: Dom Cobley Cc: Linus Walleij Cc: Arnd Bergmann Cc: Andrew Morton Cc: Pawel Moll Cc: Mark Brown Cc: Russell King - ARM Linux Cc: Rabeeh Khoury Cc: Daniel Mack Cc: Jean-Francois Moine Cc: Lars-Peter Clausen Cc: Guenter Roeck Cc: Michal Bachraty Cc: Marek Belisko Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- drivers/clk/Kconfig | 1 - drivers/clk/clk-si5351.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 6412f55..5039e41 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -58,7 +58,6 @@ config COMMON_CLK_MAX77686 config COMMON_CLK_SI5351 tristate "Clock driver for SiLabs 5351A/B/C" depends on I2C - depends on OF select REGMAP_I2C select RATIONAL ---help--- diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index 8323c31..91c0f01 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1489,12 +1489,14 @@ static int si5351_i2c_probe(struct i2c_client *client, } } +#ifdef CONFIG_OF ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get, &drvdata->onecell); if (ret) { dev_err(&client->dev, "unable to add clk provider\n"); return ret; } +#endif return 0; }