From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: <linux-kernel@vger.kernel.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Magnus Damm <damm+renesas@opensource.se>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: [PATCH 2/2] drivers/irqchip: make irq-renesas-irqc.c explicitly non-modular
Date: Sun, 11 Oct 2015 19:05:14 -0400 [thread overview]
Message-ID: <1444604714-2969-3-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1444604714-2969-1-git-send-email-paul.gortmaker@windriver.com>
The Kconfig currently controlling compilation of this code is:
drivers/irqchip/Kconfig:config RENESAS_IRQC
drivers/irqchip/Kconfig: bool
...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.
While at it, since this is core infrastructural code for the platform,
lets prohibit any unbind actions that would have called the .remove
function, if anyone was unwise enough to try that.
Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.
We don't replace module.h with init.h since the file already has that.
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: Magnus Damm <damm+renesas@opensource.se>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/irqchip/irq-renesas-irqc.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 52304b139aa4..a05b1012fce7 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -28,7 +28,6 @@
#include <linux/irqdomain.h>
#include <linux/err.h>
#include <linux/slab.h>
-#include <linux/module.h>
#include <linux/pm_runtime.h>
#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */
@@ -260,33 +259,16 @@ err0:
return ret;
}
-static int irqc_remove(struct platform_device *pdev)
-{
- struct irqc_priv *p = platform_get_drvdata(pdev);
- int k;
-
- for (k = 0; k < p->number_of_irqs; k++)
- free_irq(p->irq[k].requested_irq, &p->irq[k]);
-
- irq_domain_remove(p->irq_domain);
- iounmap(p->iomem);
- pm_runtime_put(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
- kfree(p);
- return 0;
-}
-
static const struct of_device_id irqc_dt_ids[] = {
{ .compatible = "renesas,irqc", },
{},
};
-MODULE_DEVICE_TABLE(of, irqc_dt_ids);
static struct platform_driver irqc_device_driver = {
.probe = irqc_probe,
- .remove = irqc_remove,
.driver = {
.name = "renesas_irqc",
+ .suppress_bind_attrs = true,
.of_match_table = irqc_dt_ids,
}
};
@@ -296,13 +278,3 @@ static int __init irqc_init(void)
return platform_driver_register(&irqc_device_driver);
}
postcore_initcall(irqc_init);
-
-static void __exit irqc_exit(void)
-{
- platform_driver_unregister(&irqc_device_driver);
-}
-module_exit(irqc_exit);
-
-MODULE_AUTHOR("Magnus Damm");
-MODULE_DESCRIPTION("Renesas IRQC Driver");
-MODULE_LICENSE("GPL v2");
--
2.6.1
next prev parent reply other threads:[~2015-10-11 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-11 23:05 [PATCH 0/2] irqchip: make non-modular code explicitly non-modular Paul Gortmaker
2015-10-11 23:05 ` [PATCH 1/2] drivers/irqchip: make irq-renesas-intc-irqpin.c " Paul Gortmaker
2015-10-11 23:05 ` Paul Gortmaker [this message]
2015-10-12 7:04 ` [PATCH 0/2] irqchip: make non-modular code " Geert Uytterhoeven
2015-10-14 2:26 ` 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=1444604714-2969-3-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=damm+renesas@opensource.se \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox