All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit}
Date: Mon, 1 May 2006 09:11:32 +0200	[thread overview]
Message-ID: <20060501071132.GG3570@stusta.de> (raw)

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;


             reply	other threads:[~2006-05-01  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-01  7:11 Adrian Bunk [this message]
2006-05-01 13:58 ` [RFC: 2.6 patch] drivers/char/applicom.c: proper module_{init,exit} David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2006-04-15 19:49 Adrian Bunk

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=20060501071132.GG3570@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.