* [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit}
@ 2006-04-15 19:49 Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2006-04-15 19:49 UTC (permalink / raw)
To: dwmw2; +Cc: linux-kernel
This patch:
- converts the driver to use module_{init,exit}
- let the driver print a warning if the old __setup is used
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/char/applicom.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
--- linux-2.6.17-rc1-mm2-full/drivers/char/applicom.c.old 2006-04-15 21:19:31.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/applicom.c 2006-04-15 21:23:36.000000000 +0200
@@ -166,11 +166,7 @@ static int ac_register_board(unsigned lo
return boardno + 1;
}
-#ifdef MODULE
-
-#define applicom_init init_module
-
-void cleanup_module(void)
+static void __exit applicom_exit(void)
{
unsigned int i;
@@ -188,9 +184,7 @@ void cleanup_module(void)
}
}
-#endif /* MODULE */
-
-int __init applicom_init(void)
+static int __init applicom_init(void)
{
int i, numisa = 0;
struct pci_dev *dev = NULL;
@@ -358,10 +352,9 @@ out:
return ret;
}
+module_init(applicom_init);
+module_exit(applicom_exit);
-#ifndef MODULE
-__initcall(applicom_init);
-#endif
static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
{
@@ -870,6 +863,8 @@ static int __init applicom_setup(char *s
return 0;
}
+ printk(KERN_WARNING "applicom= is deprecated\n please use applicom.irq= and applicom.mem=\n");
+
mem = ints[1];
irq = ints[2];
return 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit}
@ 2006-05-01 7:11 Adrian Bunk
2006-05-01 13:58 ` David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2006-05-01 7:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: dwmw2, linux-kernel
This patch:
- converts the driver to use module_{init,exit}
- let the driver print a warning if the old __setup is used
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 15 Apr 2006
drivers/char/applicom.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
--- linux-2.6.17-rc1-mm2-full/drivers/char/applicom.c.old 2006-04-15 21:19:31.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/applicom.c 2006-04-15 21:23:36.000000000 +0200
@@ -166,11 +166,7 @@ static int ac_register_board(unsigned lo
return boardno + 1;
}
-#ifdef MODULE
-
-#define applicom_init init_module
-
-void cleanup_module(void)
+static void __exit applicom_exit(void)
{
unsigned int i;
@@ -188,9 +184,7 @@ void cleanup_module(void)
}
}
-#endif /* MODULE */
-
-int __init applicom_init(void)
+static int __init applicom_init(void)
{
int i, numisa = 0;
struct pci_dev *dev = NULL;
@@ -358,10 +352,9 @@ out:
return ret;
}
+module_init(applicom_init);
+module_exit(applicom_exit);
-#ifndef MODULE
-__initcall(applicom_init);
-#endif
static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
{
@@ -870,6 +863,8 @@ static int __init applicom_setup(char *s
return 0;
}
+ printk(KERN_WARNING "applicom= is deprecated\n please use applicom.irq= and applicom.mem=\n");
+
mem = ints[1];
irq = ints[2];
return 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit}
2006-05-01 7:11 [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit} Adrian Bunk
@ 2006-05-01 13:58 ` David Woodhouse
0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2006-05-01 13:58 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel
On Mon, 2006-05-01 at 09:11 +0200, Adrian Bunk wrote:
> - converts the driver to use module_{init,exit}
Ack.
> - let the driver print a warning if the old __setup is used
> + printk(KERN_WARNING "applicom= is deprecated\n please use applicom.irq= and applicom.mem=\n");
I wouldn't bother with this -- just change it.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-01 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 7:11 [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit} Adrian Bunk
2006-05-01 13:58 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2006-04-15 19:49 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox