All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular
@ 2017-04-13  1:57 Paul Gortmaker
  2017-04-14  8:12 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Gortmaker @ 2017-04-13  1:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Alan Cox, linux-media, devel

The Makefile / Kconfig currently controlling compilation of this code is:

clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += vlv2_plat_clock.o

atomisp/Kconfig:menuconfig INTEL_ATOMISP
atomisp/Kconfig:        bool "Enable support to Intel MIPI camera drivers"

...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.

Since module_init was already not in use by this driver, the init
ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: linux-media@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 .../media/atomisp/platform/clock/vlv2_plat_clock.c  | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c b/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
index 25e939c50aef..a322539d2621 100644
--- a/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
+++ b/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
@@ -21,7 +21,7 @@
 
 #include <linux/err.h>
 #include <linux/io.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/platform_device.h>
 #include "../../include/linux/vlv2_plat_clock.h"
 
@@ -205,18 +205,10 @@ static int vlv2_plat_clk_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int vlv2_plat_clk_remove(struct platform_device *pdev)
-{
-	iounmap(pmc_base);
-	pmc_base = NULL;
-	return 0;
-}
-
 static const struct platform_device_id vlv2_plat_clk_id[] = {
 	{"vlv2_plat_clk", 0},
 	{}
 };
-MODULE_DEVICE_TABLE(platform, vlv2_plat_clk_id);
 
 static int vlv2_resume(struct device *device)
 {
@@ -241,7 +233,6 @@ static const struct dev_pm_ops vlv2_pm_ops = {
 
 static struct platform_driver vlv2_plat_clk_driver = {
 	.probe = vlv2_plat_clk_probe,
-	.remove = vlv2_plat_clk_remove,
 	.id_table = vlv2_plat_clk_id,
 	.driver = {
 		.name = "vlv2_plat_clk",
@@ -254,13 +245,3 @@ static int __init vlv2_plat_clk_init(void)
 	return platform_driver_register(&vlv2_plat_clk_driver);
 }
 arch_initcall(vlv2_plat_clk_init);
-
-static void __exit vlv2_plat_clk_exit(void)
-{
-	platform_driver_unregister(&vlv2_plat_clk_driver);
-}
-module_exit(vlv2_plat_clk_exit);
-
-MODULE_AUTHOR("Asutosh Pathak <asutosh.pathak@intel.com>");
-MODULE_DESCRIPTION("Intel VLV2 platform clock driver");
-MODULE_LICENSE("GPL v2");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular
  2017-04-13  1:57 [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular Paul Gortmaker
@ 2017-04-14  8:12 ` Greg Kroah-Hartman
  2017-04-14 15:57   ` Paul Gortmaker
  2017-04-14 20:42   ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-04-14  8:12 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Mauro Carvalho Chehab, Alan Cox, linux-media, devel

On Wed, Apr 12, 2017 at 09:57:55PM -0400, Paul Gortmaker wrote:
> The Makefile / Kconfig currently controlling compilation of this code is:
> 
> clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += vlv2_plat_clock.o
> 
> atomisp/Kconfig:menuconfig INTEL_ATOMISP
> atomisp/Kconfig:        bool "Enable support to Intel MIPI camera drivers"
> 
> ...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.
> 
> Since module_init was already not in use by this driver, the init
> ordering remains unchanged with this commit.
> 
> Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
> 
> We also delete the MODULE_LICENSE tag etc. since all that information
> is already contained at the top of the file in the comments.
> 
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Alan Cox <alan@linux.intel.com>
> Cc: linux-media@vger.kernel.org
> Cc: devel@driverdev.osuosl.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

I'm pretty sure we want this code to be built as a module, so maybe a
Kconfig change would resolve the issue instead?

Alan, any thoughts?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular
  2017-04-14  8:12 ` Greg Kroah-Hartman
@ 2017-04-14 15:57   ` Paul Gortmaker
  2017-04-14 20:42   ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Gortmaker @ 2017-04-14 15:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Mauro Carvalho Chehab, Alan Cox, linux-media, devel

[Re: [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular] On 14/04/2017 (Fri 10:12) Greg Kroah-Hartman wrote:

> On Wed, Apr 12, 2017 at 09:57:55PM -0400, Paul Gortmaker wrote:
> > The Makefile / Kconfig currently controlling compilation of this code is:
> > 
> > clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += vlv2_plat_clock.o
> > 
> > atomisp/Kconfig:menuconfig INTEL_ATOMISP
> > atomisp/Kconfig:        bool "Enable support to Intel MIPI camera drivers"
> > 
> > ...meaning that it currently is not being built as a module by anyone.

[...]

> I'm pretty sure we want this code to be built as a module, so maybe a
> Kconfig change would resolve the issue instead?

As always, I'm good with things being moved to tristate if there is a use case
for it.  I will note that in this case however, that the above Kconfig option
is not specific to this file/driver.  It is controlling the inclusion of
several dirs/files, and so a more fine grained Kconfig may be required if some
are to be built-in and some are to be tristate...

P.

~/git/linux-head/drivers/staging/media/atomisp$ git grep 'obj.*INTEL_ATOMISP'
Makefile:obj-$(CONFIG_INTEL_ATOMISP) += pci/
Makefile:obj-$(CONFIG_INTEL_ATOMISP) += i2c/
Makefile:obj-$(CONFIG_INTEL_ATOMISP) += platform/
platform/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += clock/
platform/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += intel-mid/
platform/clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += vlv2_plat_clock.o
platform/clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += platform_vlv2_plat_clk.o
platform/intel-mid/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += intel_mid_pcihelpers.o
platform/intel-mid/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += atomisp_gmin_platform.o

> 
> Alan, any thoughts?
> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular
  2017-04-14  8:12 ` Greg Kroah-Hartman
  2017-04-14 15:57   ` Paul Gortmaker
@ 2017-04-14 20:42   ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2017-04-14 20:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Paul Gortmaker
  Cc: linux-kernel, Mauro Carvalho Chehab, linux-media, devel

> I'm pretty sure we want this code to be built as a module, so maybe a
> Kconfig change would resolve the issue instead?
> 
> Alan, any thoughts?

It's a tiny chunk of platform helper code. It probably ultimately
belongs in arch/x86 somewhere or folded into the driver. At the moment
it won't build modular.

I'm fine with the change, it strips out more pointless code so helps
see what tiny bits of code in there are actually used for anything
real.

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-14 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13  1:57 [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular Paul Gortmaker
2017-04-14  8:12 ` Greg Kroah-Hartman
2017-04-14 15:57   ` Paul Gortmaker
2017-04-14 20:42   ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.