From: Ross Kendall Axe <ross.axe@blueyonder.co.uk>
To: emoenke@gwdg.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.11.7] sbpcd init cleanup and fix
Date: Sun, 17 Apr 2005 23:49:45 +0100 [thread overview]
Message-ID: <4262E809.4090809@blueyonder.co.uk> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]
- Remove ugly '#ifdef MODULE's
- Use the __exit attribute on sbpcd_exit()
- Don't rename sbpcd_init() to __sbpcd_init() in modules
- Make sbpcd_init() and sbpcd_exit() static
- Ensure sbpcd_init() is actually called when the driver is compiled in
to the kernel
Signed-off-by: Ross Kendall Axe <ross.axe@blueyonder.co.uk>
[-- Attachment #1.2: linux-2.6.11.7-sbpcd-init.patch --]
[-- Type: text/x-patch, Size: 993 bytes --]
--- linux-2.6.11.7/drivers/cdrom/sbpcd.c.orig 2005-04-13 17:12:29.000000000 +0100
+++ linux-2.6.11.7/drivers/cdrom/sbpcd.c 2005-04-13 17:46:29.000000000 +0100
@@ -5639,11 +5639,7 @@ static int __init config_spea(void)
*/
/* FIXME: cleanups after failed allocations are too ugly for words */
-#ifdef MODULE
-int __init __sbpcd_init(void)
-#else
-int __init sbpcd_init(void)
-#endif
+static int __init sbpcd_init(void)
{
int i=0, j=0;
int addr[2]={1, CDROM_PORT};
@@ -5894,8 +5890,7 @@ int __init sbpcd_init(void)
return 0;
}
/*==========================================================================*/
-#ifdef MODULE
-void sbpcd_exit(void)
+static void __exit sbpcd_exit(void)
{
int j;
@@ -5926,11 +5921,10 @@ void sbpcd_exit(void)
}
-module_init(__sbpcd_init) /*HACK!*/;
+module_init(sbpcd_init);
module_exit(sbpcd_exit);
-#endif /* MODULE */
static int sbpcd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
{
struct sbpcd_drive *p = cdi->handle;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
reply other threads:[~2005-04-17 21:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4262E809.4090809@blueyonder.co.uk \
--to=ross.axe@blueyonder.co.uk \
--cc=emoenke@gwdg.de \
--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.