diff mbox

[06/10] clk: samsung make clk-exynos-audss explicitly non-modular

Message ID 20160704211220.5685-7-paul.gortmaker@windriver.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Paul Gortmaker July 4, 2016, 9:12 p.m. UTC
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(-)

Comments

Krzysztof Kozlowski July 5, 2016, 9:04 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven July 5, 2016, 11:02 a.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Gortmaker July 5, 2016, 1:17 p.m. UTC | #3
[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
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Gortmaker July 5, 2016, 1:32 p.m. UTC | #4
[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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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.


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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");