Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1481373

[PATCH 1/6] mfd: altera-a10sr: make it explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 1/6] mfd: altera-a10sr: make it explicitly non-modular
Date 2016-09-12 16:50 +0200
Message-ID <sgAIy-4zI-29@gated-at.bofh.it> (permalink)
References <sgAIy-4zI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_ALTERA_A10SR
drivers/mfd/Kconfig:    bool "Altera Arria10 DevKit System Resource chip"

...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 builtin_driver() uses the same init level priority as
module_spi_driver() the init ordering remains unchanged with
this commit. [Note that there is no builtin_spi_driver macro,
so we open-code what it would be via builtin_driver().]

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
was (or is now) contained at the top of the file in the comments.

Cc: Thor Thayer <tthayer@opensource.altera.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/mfd/altera-a10sr.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c
index 40ed65e5fb2a..06e1f7fc5605 100644
--- a/drivers/mfd/altera-a10sr.c
+++ b/drivers/mfd/altera-a10sr.c
@@ -1,4 +1,8 @@
 /*
+ * Altera Arria10 DevKit System Resource MFD Driver
+ *
+ * Author: Thor Thayer <tthayer@opensource.altera.com>
+ *
  * Copyright Intel Corporation (C) 2014-2016. All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -20,7 +24,7 @@
 
 #include <linux/mfd/altera-a10sr.h>
 #include <linux/mfd/core.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/spi/spi.h>
 
@@ -152,7 +156,6 @@ static const struct of_device_id altr_a10sr_spi_of_match[] = {
 	{ .compatible = "altr,a10sr" },
 	{ },
 };
-MODULE_DEVICE_TABLE(of, altr_a10sr_spi_of_match);
 
 static struct spi_driver altr_a10sr_spi_driver = {
 	.probe = altr_a10sr_spi_probe,
@@ -161,9 +164,4 @@ static struct spi_driver altr_a10sr_spi_driver = {
 		.of_match_table = of_match_ptr(altr_a10sr_spi_of_match),
 	},
 };
-
-module_spi_driver(altr_a10sr_spi_driver);
-
-MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Thor Thayer <tthayer@opensource.altera.com>");
-MODULE_DESCRIPTION("Altera Arria10 DevKit System Resource MFD Driver");
+builtin_driver(altr_a10sr_spi_driver, spi_register_driver)
-- 
2.8.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] mfd: trivial demodularization of non-modular drivers. Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-09-12 16:50 +0200
  [PATCH 5/6] mfd: sun6i-prcm: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-09-12 16:50 +0200
    Re: [PATCH 5/6] mfd: sun6i-prcm: Make it explicitly non-modular Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-12 19:50 +0200
  [PATCH 4/6] mfd: smsc-ece1099: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-09-12 16:50 +0200
  [PATCH 1/6] mfd: altera-a10sr: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-09-12 16:50 +0200

csiph-web