From: Krzysztof Kozlowski <krzk@kernel.org>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
alsa-devel@alsa-project.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 1/3] clk: fix redefinition of clk_prepare on MIPS with HAVE_LEGACY_CLK
Date: Sun, 15 Nov 2020 18:09:48 +0100 [thread overview]
Message-ID: <20201115170950.304460-2-krzk@kernel.org> (raw)
In-Reply-To: <20201115170950.304460-1-krzk@kernel.org>
COMMON_CLK even though is a user-selectable symbol, is still selected by
multiple other config options. COMMON_CLK should not be used when
legacy clocks are provided by architecture, so it correctly depends on
!HAVE_LEGACY_CLK.
However it is possible to create a config which selects both COMMON_CLK
(by SND_SUN8I_CODEC) and HAVE_LEGACY_CLK (by SOC_RT305X) which leads to
compile errors (MIPS architecture):
drivers/clk/clk.c:855:6: error: redefinition of ‘clk_unprepare’
In file included from drivers/clk/clk.c:9:
include/linux/clk.h:263:20: note: previous definition of ‘clk_unprepare’ was here
The definitions clk_bulk_prepare() (and unprepare) already have proper
surrounding #ifdef so add them also for clk_prepare()/clk_unprepare().
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/clk/clk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f83dac54ed85..f4f68c7c2fb5 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -841,6 +841,7 @@ static void clk_core_unprepare_lock(struct clk_core *core)
clk_prepare_unlock();
}
+#ifdef CONFIG_HAVE_CLK_PREPARE
/**
* clk_unprepare - undo preparation of a clock source
* @clk: the clk being unprepared
@@ -860,6 +861,7 @@ void clk_unprepare(struct clk *clk)
clk_core_unprepare_lock(clk->core);
}
EXPORT_SYMBOL_GPL(clk_unprepare);
+#endif
static int clk_core_prepare(struct clk_core *core)
{
@@ -921,6 +923,7 @@ static int clk_core_prepare_lock(struct clk_core *core)
return ret;
}
+#ifdef CONFIG_HAVE_CLK_PREPARE
/**
* clk_prepare - prepare a clock source
* @clk: the clk being prepared
@@ -941,6 +944,7 @@ int clk_prepare(struct clk *clk)
return clk_core_prepare_lock(clk->core);
}
EXPORT_SYMBOL_GPL(clk_prepare);
+#endif /* CONFIG_HAVE_CLK_PREPARE */
static void clk_core_disable(struct clk_core *core)
{
--
2.25.1
next prev parent reply other threads:[~2020-11-15 17:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 17:09 [PATCH 0/3] clk/sunxi/media: Fix builds with COMMON_CLK and HAVE_LEGACY_CLK Krzysztof Kozlowski
2020-11-15 17:09 ` Krzysztof Kozlowski [this message]
2020-11-18 7:41 ` [PATCH 1/3] clk: fix redefinition of clk_prepare on MIPS with HAVE_LEGACY_CLK Stephen Boyd
2020-11-18 7:48 ` Krzysztof Kozlowski
2020-11-25 0:11 ` Stephen Boyd
2020-11-25 14:15 ` Krzysztof Kozlowski
2020-11-27 20:19 ` Stephen Boyd
2020-11-15 17:09 ` [RFC 2/3] ARM: sunxi: do not select COMMON_CLK to fix builds Krzysztof Kozlowski
2020-11-17 4:36 ` Samuel Holland
2020-11-17 7:37 ` Krzysztof Kozlowski
2020-11-15 17:09 ` [RFC 3/3] media: atomisp: " Krzysztof Kozlowski
2020-11-25 0:14 ` Stephen Boyd
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=20201115170950.304460-2-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jernej.skrabec@siol.net \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=perex@perex.cz \
--cc=sakari.ailus@linux.intel.com \
--cc=sboyd@kernel.org \
--cc=tiwai@suse.com \
--cc=wens@csie.org \
/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;
as well as URLs for NNTP newsgroup(s).