lkml.org 
[lkml]   [2005]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.11.7] sbpcd init cleanup and fix
- 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>
--- 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;[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-04-17 23:51    [W:0.024 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site