From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
<linux-scsi@vger.kernel.org>, <linux-mips@linux-mips.org>
Subject: [PATCH 1/2] drivers/scsi: make jazz_esp.c driver explicitly non-modular
Date: Sun, 27 Mar 2016 13:00:24 -0400 [thread overview]
Message-ID: <1459098025-26269-2-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1459098025-26269-1-git-send-email-paul.gortmaker@windriver.com>
The Kconfig for this driver is currently:
config JAZZ_ESP
bool "MIPS JAZZ FAS216 SCSI support
...meaning that it currently is not being built as a module by anyone,
and it has been this way since the beginning of git history (~2005).
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 module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
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: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-scsi@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/scsi/jazz_esp.c | 43 ++++++-------------------------------------
1 file changed, 6 insertions(+), 37 deletions(-)
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 9aaa74e349cc..4260a0f7e154 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -1,12 +1,13 @@
/* jazz_esp.c: ESP front-end for MIPS JAZZ systems.
*
- * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.frankende)
+ * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.franken.de)
+ *
+ * License: GPL
*/
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/types.h>
-#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
@@ -201,31 +202,11 @@ fail:
return err;
}
-static int esp_jazz_remove(struct platform_device *dev)
-{
- struct esp *esp = dev_get_drvdata(&dev->dev);
- unsigned int irq = esp->host->irq;
-
- scsi_esp_unregister(esp);
-
- free_irq(irq, esp);
- dma_free_coherent(esp->dev, 16,
- esp->command_block,
- esp->command_block_dma);
-
- scsi_host_put(esp->host);
-
- return 0;
-}
-
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:jazz_esp");
-
static struct platform_driver esp_jazz_driver = {
.probe = esp_jazz_probe,
- .remove = esp_jazz_remove,
.driver = {
- .name = "jazz_esp",
+ .name = "jazz_esp",
+ .suppress_bind_attrs = true,
},
};
@@ -233,16 +214,4 @@ static int __init jazz_esp_init(void)
{
return platform_driver_register(&esp_jazz_driver);
}
-
-static void __exit jazz_esp_exit(void)
-{
- platform_driver_unregister(&esp_jazz_driver);
-}
-
-MODULE_DESCRIPTION("JAZZ ESP SCSI driver");
-MODULE_AUTHOR("Thomas Bogendoerfer (tsbogend@alpha.franken.de)");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(DRV_VERSION);
-
-module_init(jazz_esp_init);
-module_exit(jazz_esp_exit);
+device_initcall(jazz_esp_init);
--
2.6.1
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-scsi@vger.kernel.org, linux-mips@linux-mips.org
Subject: [PATCH 1/2] drivers/scsi: make jazz_esp.c driver explicitly non-modular
Date: Sun, 27 Mar 2016 13:00:24 -0400 [thread overview]
Message-ID: <1459098025-26269-2-git-send-email-paul.gortmaker@windriver.com> (raw)
Message-ID: <20160327170024.sJSkNWtU8bIW1_dSu4Q9EOqAY2RbhI8YpJf9LdTZBPc@z> (raw)
In-Reply-To: <1459098025-26269-1-git-send-email-paul.gortmaker@windriver.com>
The Kconfig for this driver is currently:
config JAZZ_ESP
bool "MIPS JAZZ FAS216 SCSI support
...meaning that it currently is not being built as a module by anyone,
and it has been this way since the beginning of git history (~2005).
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 module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
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: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-scsi@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/scsi/jazz_esp.c | 43 ++++++-------------------------------------
1 file changed, 6 insertions(+), 37 deletions(-)
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 9aaa74e349cc..4260a0f7e154 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -1,12 +1,13 @@
/* jazz_esp.c: ESP front-end for MIPS JAZZ systems.
*
- * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.frankende)
+ * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.franken.de)
+ *
+ * License: GPL
*/
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/types.h>
-#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
@@ -201,31 +202,11 @@ fail:
return err;
}
-static int esp_jazz_remove(struct platform_device *dev)
-{
- struct esp *esp = dev_get_drvdata(&dev->dev);
- unsigned int irq = esp->host->irq;
-
- scsi_esp_unregister(esp);
-
- free_irq(irq, esp);
- dma_free_coherent(esp->dev, 16,
- esp->command_block,
- esp->command_block_dma);
-
- scsi_host_put(esp->host);
-
- return 0;
-}
-
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:jazz_esp");
-
static struct platform_driver esp_jazz_driver = {
.probe = esp_jazz_probe,
- .remove = esp_jazz_remove,
.driver = {
- .name = "jazz_esp",
+ .name = "jazz_esp",
+ .suppress_bind_attrs = true,
},
};
@@ -233,16 +214,4 @@ static int __init jazz_esp_init(void)
{
return platform_driver_register(&esp_jazz_driver);
}
-
-static void __exit jazz_esp_exit(void)
-{
- platform_driver_unregister(&esp_jazz_driver);
-}
-
-MODULE_DESCRIPTION("JAZZ ESP SCSI driver");
-MODULE_AUTHOR("Thomas Bogendoerfer (tsbogend@alpha.franken.de)");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(DRV_VERSION);
-
-module_init(jazz_esp_init);
-module_exit(jazz_esp_exit);
+device_initcall(jazz_esp_init);
--
2.6.1
next prev parent reply other threads:[~2016-03-27 17:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-27 17:00 [PATCH 0/2] scsi: remove orphaned modular code from non-modular drivers Paul Gortmaker
2016-03-27 17:00 ` Paul Gortmaker
2016-03-27 17:00 ` Paul Gortmaker [this message]
2016-03-27 17:00 ` [PATCH 1/2] drivers/scsi: make jazz_esp.c driver explicitly non-modular Paul Gortmaker
2016-03-27 17:00 ` [PATCH 2/2] drivers/scsi: make sun3x_esp.c " Paul Gortmaker
2016-03-27 17:00 ` Paul Gortmaker
2016-03-28 5:31 ` [PATCH 0/2] scsi: remove orphaned modular code from non-modular drivers James Bottomley
2016-03-28 15:10 ` Paul Gortmaker
2016-03-28 15:10 ` Paul Gortmaker
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=1459098025-26269-2-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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 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.