* [PATCH 00/10] clk: fix/remove module usage in non-modular code
@ 2016-07-04 21:12 Paul Gortmaker
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
2016-07-04 21:12 ` [PATCH 07/10] clk: samsung: make clk-s5pv210-audss " Paul Gortmaker
0 siblings, 2 replies; 11+ messages in thread
From: Paul Gortmaker @ 2016-07-04 21:12 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Aleksandr Frid, Alexandre Courbot,
Boris BREZILLON, Carlo Caione, Chen-Yu Tsai, Emilio López,
Kevin Hilman, Krzysztof Kozlowski, Kukjin Kim, Maxime Ripard,
Michael Turquette, Neil Armstrong, Padmavathi Venna,
Paul Walmsley, Peter De Schrijver, Peter Ujfalusi,
Prashant Gaikwad, Stephen Boyd, Stephen Warren,
Sylwester Nawrocki
This series covers the audit of non-modular module code use in the
drivers/clk/ directory.
Quasi generic boiler plate description follows; included for folks who
haven't yet seen what we are aiming to achieve with this operation.
We are trying to not use module support for code that can never be built
as a module because:
(1) it is easy to accidentally write unused module_exit and remove code
(2) it can be misleading when reading the source, thinking it can be
modular when the Makefile and/or Kconfig prohibit it
(3) it requires the include of the module.h header file which in turn
includes nearly everything else, thus adding to CPP overhead.
(4) it gets copied/replicated into other code and spreads like weeds.
With respect to #1 in this instance, we see for these 10 commits:
15 files changed, 37 insertions(+), 227 deletions(-)
...which is a respectable (IMHO) net amount of removal of unused code.
Changes seen here cover the following categories:
-just replacement of modular macros with their non-modular
equivalents that CPP would have inserted anyway, such as:
module_init --> device_initcall
module_platform_driver --> builtin_platform_driver
-the removal of including module.h ; replaced with init.h
as required based on whether the file used it.
-the removal of any/all unused/orphaned __exit functions that
would never be called.
-the removal of instances of MODULE_DEVICE_TABLE and MODULE_ALIAS
that become no-ops in the non-modular case.
-the removal of any ".remove" functions that were hooked into
the driver struct. This ".remove" function would of
course not be called from the __exit function since that was
never run. However in theory, someone could have triggered it
via sysfs unbind, even though there isn't a sensible use case
for doing so. So to cover that possibility, we've also disabled
sysfs unbind in the driver.
-the removal of MODULE_DESCRIIPTION/AUTHOR/LICENSE tags that are
also no-ops for non-modular ; we ensure the information in those
tags is present in the top of file comments in each case.
There are no initcall level changes here; everything stays at the level
of initcall it was previously - either by not using modular versions to
begin with, or by using the builtin level equivalents.
As usual, we can consider making some of these tristate if an author
has strong feelings about extending support into the modular realm,
but I won't be able to run-time test any of that.
I batched the sunxi changes together since they had similar author
and maintainer fields and it helps avoid polluting history with too
many mundane commits, but I can split that up if so desired.
Build testing done on linux-next on arm/arm64 and x86/x86_64.
Paul.
---
Cc: Aleksandr Frid <afrid@nvidia.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: "Emilio López" <emilio@elopez.com.ar>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Padmavathi Venna <padma.v@samsung.com>
Cc: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-clk@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Paul Gortmaker (10):
clk: meson8b: make it explicitly non-modular
clk: meson: make gxbb explicitly non-modular
clk: mvebu: make cp110-system-controller explicitly non-modular
clk: mvebu: make ap806-system-controller explicitly non-modular
clk: oxnas: make it explicitly non-modular
clk: samsung make clk-exynos-audss explicitly non-modular
clk: samsung: make clk-s5pv210-audss explicitly non-modular
clk: sunxi: make clk-* explicitly non-modular
clk: tegra: make clk-tegra124-dfll-fcpu explicitly non-modular
clk: ti: make clk-dra7-atl explicitly non-modular
drivers/clk/clk-oxnas.c | 15 +++----------
drivers/clk/meson/gxbb.c | 18 ++++-----------
drivers/clk/meson/meson8b-clkc.c | 19 ++++------------
drivers/clk/mvebu/ap806-system-controller.c | 23 +++----------------
drivers/clk/mvebu/cp110-system-controller.c | 34 +++--------------------------
drivers/clk/samsung/clk-exynos-audss.c | 13 +----------
drivers/clk/samsung/clk-s5pv210-audss.c | 29 ++----------------------
drivers/clk/sunxi/clk-factors.c | 1 -
drivers/clk/sunxi/clk-sun6i-apb0-gates.c | 9 ++------
drivers/clk/sunxi/clk-sun6i-apb0.c | 9 ++------
drivers/clk/sunxi/clk-sun6i-ar100.c | 21 +++---------------
drivers/clk/sunxi/clk-sun8i-apb0.c | 9 ++------
drivers/clk/sunxi/clk-sun9i-mmc.c | 28 +++---------------------
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 16 ++------------
drivers/clk/ti/clk-dra7-atl.c | 20 +++--------------
15 files changed, 37 insertions(+), 227 deletions(-)
--
2.8.4
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-04 21:12 [PATCH 00/10] clk: fix/remove module usage in non-modular code Paul Gortmaker
@ 2016-07-04 21:12 ` Paul Gortmaker
2016-07-05 9:04 ` Krzysztof Kozlowski
` (2 more replies)
2016-07-04 21:12 ` [PATCH 07/10] clk: samsung: make clk-s5pv210-audss " Paul Gortmaker
1 sibling, 3 replies; 11+ messages in thread
From: Paul Gortmaker @ 2016-07-04 21:12 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, Kukjin Kim, Krzysztof Kozlowski,
Padmavathi Venna, linux-samsung-soc, linux-clk
The Kconfig currently controlling compilation of this code is:
arch/arm/mach-exynos/Kconfig:menuconfig ARCH_EXYNOS
arch/arm/mach-exynos/Kconfig: bool "Samsung EXYNOS" if ARCH_MULTI_V7
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modularity so that when reading the
driver there is no doubt it is builtin-only.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init was already not used by this code, the init ordering
remains unchanged with this commit.
We also delete the MODULE_LICENSE tags etc. since all that information
is already contained at the top of the file in the comments.
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Padmavathi Venna <padma.v@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/clk/samsung/clk-exynos-audss.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 4e9584d79089..42b62f865198 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -15,7 +15,7 @@
#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/syscore_ops.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/platform_device.h>
#include <dt-bindings/clock/exynos-audss-clk.h>
@@ -278,14 +278,3 @@ static int __init exynos_audss_clk_init(void)
return platform_driver_register(&exynos_audss_clk_driver);
}
core_initcall(exynos_audss_clk_init);
-
-static void __exit exynos_audss_clk_exit(void)
-{
- platform_driver_unregister(&exynos_audss_clk_driver);
-}
-module_exit(exynos_audss_clk_exit);
-
-MODULE_AUTHOR("Padmavathi Venna <padma.v@samsung.com>");
-MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("platform:exynos-audss-clk");
--
2.8.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
@ 2016-07-05 9:04 ` Krzysztof Kozlowski
2016-07-05 13:32 ` Paul Gortmaker
2016-07-05 11:02 ` Geert Uytterhoeven
2016-07-07 13:12 ` Sylwester Nawrocki
2 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-05 9:04 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel
Cc: Sylwester Nawrocki, Tomasz Figa, Michael Turquette, Stephen Boyd,
Kukjin Kim, linux-samsung-soc, linux-clk
On 07/04/2016 11:12 PM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> arch/arm/mach-exynos/Kconfig:menuconfig ARCH_EXYNOS
> arch/arm/mach-exynos/Kconfig: bool "Samsung EXYNOS" if ARCH_MULTI_V7
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Lets remove the modular code that is essentially orphaned, so that
> when reading the driver there is no doubt it is builtin-only.
>
> Since module_init was already not used by this code, the init ordering
> remains unchanged with this commit.
>
> We also delete the MODULE_LICENSE tags etc. since all that information
> is already contained at the top of the file in the comments.
>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Padmavathi Venna <padma.v@samsung.com>
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-clk@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/clk/samsung/clk-exynos-audss.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
> index 4e9584d79089..42b62f865198 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -15,7 +15,7 @@
> #include <linux/clk-provider.h>
> #include <linux/of_address.h>
> #include <linux/syscore_ops.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/platform_device.h>
>
> #include <dt-bindings/clock/exynos-audss-clk.h>
> @@ -278,14 +278,3 @@ static int __init exynos_audss_clk_init(void)
> return platform_driver_register(&exynos_audss_clk_driver);
> }
> core_initcall(exynos_audss_clk_init);
> -
> -static void __exit exynos_audss_clk_exit(void)
> -{
> - platform_driver_unregister(&exynos_audss_clk_driver);
> -}
> -module_exit(exynos_audss_clk_exit);
> -
> -MODULE_AUTHOR("Padmavathi Venna <padma.v@samsung.com>");
> -MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");
> -MODULE_LICENSE("GPL v2");
> -MODULE_ALIAS("platform:exynos-audss-clk");
Why not removing .remove() callback as well?
I don't find sysfs unbind hook useful except testing the exit paths...
which in that case do not exist anymore (there is no "modprobe -r" for
it anyway).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-05 9:04 ` Krzysztof Kozlowski
@ 2016-07-05 13:32 ` Paul Gortmaker
0 siblings, 0 replies; 11+ messages in thread
From: Paul Gortmaker @ 2016-07-05 13:32 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-kernel, Sylwester Nawrocki, Tomasz Figa, Michael Turquette,
Stephen Boyd, Kukjin Kim, linux-samsung-soc, linux-clk
[Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular] On 05/07/2016 (Tue 11:04) Krzysztof Kozlowski wrote:
> On 07/04/2016 11:12 PM, Paul Gortmaker wrote:
> > The Kconfig currently controlling compilation of this code is:
> >
> > arch/arm/mach-exynos/Kconfig:menuconfig ARCH_EXYNOS
> > arch/arm/mach-exynos/Kconfig: bool "Samsung EXYNOS" if ARCH_MULTI_V7
> >
> > ...meaning that it currently is not being built as a module by anyone.
> >
> > Lets remove the couple traces of modularity so that when reading the
> > driver there is no doubt it is builtin-only.
> >
> > Lets remove the modular code that is essentially orphaned, so that
> > when reading the driver there is no doubt it is builtin-only.
> >
[...]
> > -MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");
> > -MODULE_LICENSE("GPL v2");
> > -MODULE_ALIAS("platform:exynos-audss-clk");
>
> Why not removing .remove() callback as well?
>
> I don't find sysfs unbind hook useful except testing the exit paths...
> which in that case do not exist anymore (there is no "modprobe -r" for
> it anyway).
Yes, I normally delete the .remove callbacks as indicated in the 0/10,
but somehow I overlooked this one. Thanks for spotting it. I'll
delete it and disable the sysfs bind in v2.
Paul.
--
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
2016-07-05 9:04 ` Krzysztof Kozlowski
@ 2016-07-05 11:02 ` Geert Uytterhoeven
2016-07-05 13:17 ` Paul Gortmaker
2016-07-07 13:12 ` Sylwester Nawrocki
2 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2016-07-05 11:02 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel@vger.kernel.org, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, Kukjin Kim, Krzysztof Kozlowski,
Padmavathi Venna, linux-samsung-soc@vger.kernel.org, linux-clk
Hi Paul,
On Mon, Jul 4, 2016 at 11:12 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> We also delete the MODULE_LICENSE tags etc. since all that information
> is already contained at the top of the file in the comments.
But the unstructured information at the top of the file is much more difficult
to grep for...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-05 11:02 ` Geert Uytterhoeven
@ 2016-07-05 13:17 ` Paul Gortmaker
0 siblings, 0 replies; 11+ messages in thread
From: Paul Gortmaker @ 2016-07-05 13:17 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-kernel@vger.kernel.org, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, Kukjin Kim, Krzysztof Kozlowski,
Padmavathi Venna, linux-samsung-soc@vger.kernel.org, linux-clk
[Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular] On 05/07/2016 (Tue 13:02) Geert Uytterhoeven wrote:
> Hi Paul,
>
> On Mon, Jul 4, 2016 at 11:12 PM, Paul Gortmaker
> <paul.gortmaker@windriver.com> wrote:
> > We also delete the MODULE_LICENSE tags etc. since all that information
> > is already contained at the top of the file in the comments.
>
> But the unstructured information at the top of the file is much more difficult
> to grep for...
...which IMHO is largely a moot point, since the MODULE_<xyz> tags
aren't universally deployed and largely don't exist at all once you are
outside of the driver space.
Paul.
--
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
2016-07-05 9:04 ` Krzysztof Kozlowski
2016-07-05 11:02 ` Geert Uytterhoeven
@ 2016-07-07 13:12 ` Sylwester Nawrocki
2 siblings, 0 replies; 11+ messages in thread
From: Sylwester Nawrocki @ 2016-07-07 13:12 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, Tomasz Figa, Michael Turquette, Stephen Boyd,
Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, linux-clk
On 07/04/2016 11:12 PM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> arch/arm/mach-exynos/Kconfig:menuconfig ARCH_EXYNOS
> arch/arm/mach-exynos/Kconfig: bool "Samsung EXYNOS" if ARCH_MULTI_V7
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Lets remove the modular code that is essentially orphaned, so that
> when reading the driver there is no doubt it is builtin-only.
>
> Since module_init was already not used by this code, the init ordering
> remains unchanged with this commit.
>
> We also delete the MODULE_LICENSE tags etc. since all that information
> is already contained at the top of the file in the comments.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> #include <dt-bindings/clock/exynos-audss-clk.h>
> @@ -278,14 +278,3 @@ static int __init exynos_audss_clk_init(void)
> return platform_driver_register(&exynos_audss_clk_driver);
> }
> core_initcall(exynos_audss_clk_init);
Thanks for the patch. I will try to get rid of the above initcall
instead of removing module support. Any clock dependencies should
now be handled properly with deferred probing. And the module support
will be useful since the audss clock controller is present only
on selected Exynos SoC variants.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 07/10] clk: samsung: make clk-s5pv210-audss explicitly non-modular
2016-07-04 21:12 [PATCH 00/10] clk: fix/remove module usage in non-modular code Paul Gortmaker
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
@ 2016-07-04 21:12 ` Paul Gortmaker
2016-07-06 10:49 ` Sylwester Nawrocki
2016-07-13 10:32 ` Sylwester Nawrocki
1 sibling, 2 replies; 11+ messages in thread
From: Paul Gortmaker @ 2016-07-04 21:12 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, linux-samsung-soc, linux-clk
The Kconfig currently controlling compilation of this code is:
arch/arm/mach-s5pv210/Kconfig:config ARCH_S5PV210
arch/arm/mach-s5pv210/Kconfig: bool "Samsung S5PV210/S5PC110" if ARCH_MULTI_V7
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since this code is already not using module_init, case, the init
ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tags etc. since all that information
is already contained at the top of the file in the comments.
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/clk/samsung/clk-s5pv210-audss.c | 29 ++---------------------------
1 file changed, 2 insertions(+), 27 deletions(-)
diff --git a/drivers/clk/samsung/clk-s5pv210-audss.c b/drivers/clk/samsung/clk-s5pv210-audss.c
index eefb84b22566..c66ed2d1450e 100644
--- a/drivers/clk/samsung/clk-s5pv210-audss.c
+++ b/drivers/clk/samsung/clk-s5pv210-audss.c
@@ -18,7 +18,7 @@
#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/syscore_ops.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/platform_device.h>
#include <dt-bindings/clock/s5pv210-audss.h>
@@ -194,20 +194,6 @@ unregister:
return ret;
}
-static int s5pv210_audss_clk_remove(struct platform_device *pdev)
-{
- int i;
-
- of_clk_del_provider(pdev->dev.of_node);
-
- for (i = 0; i < clk_data.clk_num; i++) {
- if (!IS_ERR(clk_table[i]))
- clk_unregister(clk_table[i]);
- }
-
- return 0;
-}
-
static const struct of_device_id s5pv210_audss_clk_of_match[] = {
{ .compatible = "samsung,s5pv210-audss-clock", },
{},
@@ -216,10 +202,10 @@ static const struct of_device_id s5pv210_audss_clk_of_match[] = {
static struct platform_driver s5pv210_audss_clk_driver = {
.driver = {
.name = "s5pv210-audss-clk",
+ .suppress_bind_attrs = true,
.of_match_table = s5pv210_audss_clk_of_match,
},
.probe = s5pv210_audss_clk_probe,
- .remove = s5pv210_audss_clk_remove,
};
static int __init s5pv210_audss_clk_init(void)
@@ -227,14 +213,3 @@ static int __init s5pv210_audss_clk_init(void)
return platform_driver_register(&s5pv210_audss_clk_driver);
}
core_initcall(s5pv210_audss_clk_init);
-
-static void __exit s5pv210_audss_clk_exit(void)
-{
- platform_driver_unregister(&s5pv210_audss_clk_driver);
-}
-module_exit(s5pv210_audss_clk_exit);
-
-MODULE_AUTHOR("Tomasz Figa <t.figa@samsung.com>");
-MODULE_DESCRIPTION("S5PV210 Audio Subsystem Clock Controller");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("platform:s5pv210-audss-clk");
--
2.8.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 07/10] clk: samsung: make clk-s5pv210-audss explicitly non-modular
2016-07-04 21:12 ` [PATCH 07/10] clk: samsung: make clk-s5pv210-audss " Paul Gortmaker
@ 2016-07-06 10:49 ` Sylwester Nawrocki
2016-07-13 10:32 ` Sylwester Nawrocki
1 sibling, 0 replies; 11+ messages in thread
From: Sylwester Nawrocki @ 2016-07-06 10:49 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, Tomasz Figa, Michael Turquette, Stephen Boyd,
linux-samsung-soc, linux-clk
Patch applied, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 07/10] clk: samsung: make clk-s5pv210-audss explicitly non-modular
2016-07-04 21:12 ` [PATCH 07/10] clk: samsung: make clk-s5pv210-audss " Paul Gortmaker
2016-07-06 10:49 ` Sylwester Nawrocki
@ 2016-07-13 10:32 ` Sylwester Nawrocki
2016-07-13 21:59 ` Michael Turquette
1 sibling, 1 reply; 11+ messages in thread
From: Sylwester Nawrocki @ 2016-07-13 10:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: Paul Gortmaker, linux-kernel, Tomasz Figa, linux-samsung-soc,
linux-clk
On 07/04/2016 11:12 PM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> arch/arm/mach-s5pv210/Kconfig:config ARCH_S5PV210
> arch/arm/mach-s5pv210/Kconfig: bool "Samsung S5PV210/S5PC110" if ARCH_MULTI_V7
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the modular code that is essentially orphaned, so that
> when reading the driver there is no doubt it is builtin-only.
>
> We explicitly disallow a driver unbind, since that doesn't have a
> sensible use case anyway, and it allows us to drop the ".remove"
> code for non-modular drivers.
>
> Since this code is already not using module_init, case, the init
> ordering remains unchanged with this commit.
>
> We also delete the MODULE_LICENSE tags etc. since all that information
> is already contained at the top of the file in the comments.
>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-clk@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
In case this is going to be applied directly to current clk-next:
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 07/10] clk: samsung: make clk-s5pv210-audss explicitly non-modular
2016-07-13 10:32 ` Sylwester Nawrocki
@ 2016-07-13 21:59 ` Michael Turquette
0 siblings, 0 replies; 11+ messages in thread
From: Michael Turquette @ 2016-07-13 21:59 UTC (permalink / raw)
To: Sylwester Nawrocki, Stephen Boyd
Cc: Paul Gortmaker, linux-kernel, Tomasz Figa, linux-samsung-soc,
linux-clk
Quoting Sylwester Nawrocki (2016-07-13 03:32:42)
> On 07/04/2016 11:12 PM, Paul Gortmaker wrote:
> > The Kconfig currently controlling compilation of this code is:
> >
> > arch/arm/mach-s5pv210/Kconfig:config ARCH_S5PV210
> > arch/arm/mach-s5pv210/Kconfig: bool "Samsung S5PV210/S5PC110" if ARCH_MULTI_V7
> >
> > ...meaning that it currently is not being built as a module by anyone.
> >
> > Lets remove the modular code that is essentially orphaned, so that
> > when reading the driver there is no doubt it is builtin-only.
> >
> > We explicitly disallow a driver unbind, since that doesn't have a
> > sensible use case anyway, and it allows us to drop the ".remove"
> > code for non-modular drivers.
> >
> > Since this code is already not using module_init, case, the init
> > ordering remains unchanged with this commit.
> >
> > We also delete the MODULE_LICENSE tags etc. since all that information
> > is already contained at the top of the file in the comments.
> >
> > Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> > Cc: Tomasz Figa <tomasz.figa@gmail.com>
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Cc: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: linux-samsung-soc@vger.kernel.org
> > Cc: linux-clk@vger.kernel.org
> > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>
> In case this is going to be applied directly to current clk-next:
>
> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>
Applied to clk-next.
I know that we normally take PRs for the samsung clk stuff, but this
late in the cycle I'm OK to simply pick individual patches.
Thanks,
Mike
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-07-13 21:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-04 21:12 [PATCH 00/10] clk: fix/remove module usage in non-modular code Paul Gortmaker
2016-07-04 21:12 ` [PATCH 06/10] clk: samsung make clk-exynos-audss explicitly non-modular Paul Gortmaker
2016-07-05 9:04 ` Krzysztof Kozlowski
2016-07-05 13:32 ` Paul Gortmaker
2016-07-05 11:02 ` Geert Uytterhoeven
2016-07-05 13:17 ` Paul Gortmaker
2016-07-07 13:12 ` Sylwester Nawrocki
2016-07-04 21:12 ` [PATCH 07/10] clk: samsung: make clk-s5pv210-audss " Paul Gortmaker
2016-07-06 10:49 ` Sylwester Nawrocki
2016-07-13 10:32 ` Sylwester Nawrocki
2016-07-13 21:59 ` Michael Turquette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox