From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
Mike Turquette <mturquette@linaro.org>,
Stephen Warren <swarren@nvidia.com>,
Thierry Reding <thierry.reding@avionic-design.de>,
Dom Cobley <popcornmix@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Rabeeh Khoury <rabeeh@solid-run.com>,
Daniel Mack <zonque@gmail.com>,
Jean-Francois Moine <moinejf@free.fr>,
Lars-Peter Clausen <lars@metafoo.de>,
Guenter Roeck <linux@roeck-us.net>,
Michal Bachraty <michal.bachraty@streamunlimited.com>,
Marek Belisko <marek.belisko@streamunlimited.com>,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: si5351: Allow to build without CONFIG_OF
Date: Sun, 28 Apr 2013 12:24:41 +0200 [thread overview]
Message-ID: <1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
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 <sebastian.hesselbarth@gmail.com>
---
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 <sfr@canb.auug.org.au>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Dom Cobley <popcornmix@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Rabeeh Khoury <rabeeh@solid-run.com>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Michal Bachraty <michal.bachraty@streamunlimited.com>
Cc: Marek Belisko <marek.belisko@streamunlimited.com>
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;
}
--
1.7.10.4
next reply other threads:[~2013-04-28 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 10:24 Sebastian Hesselbarth [this message]
2013-04-28 18:03 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@roeck-us.net \
--cc=marek.belisko@streamunlimited.com \
--cc=michal.bachraty@streamunlimited.com \
--cc=moinejf@free.fr \
--cc=mturquette@linaro.org \
--cc=pawel.moll@arm.com \
--cc=popcornmix@gmail.com \
--cc=rabeeh@solid-run.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sfr@canb.auug.org.au \
--cc=swarren@nvidia.com \
--cc=thierry.reding@avionic-design.de \
--cc=zonque@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®