patch-2.1.36 linux/drivers/block/acsi.c

Next file: linux/drivers/block/amiflop.c
Previous file: linux/drivers/block/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/drivers/block/acsi.c linux/drivers/block/acsi.c
@@ -43,8 +43,6 @@
  *
  */
 
-#include <linux/module.h>
-
 #define MAJOR_NR ACSI_MAJOR
 
 #include <linux/config.h>
@@ -1127,9 +1125,8 @@
 		 * ACSI disks...
 		 */
 	  case BLKGETSIZE:   /* Return device size */
-		if (put_user(acsi_part[MINOR(inode->i_rdev)].nr_sects,
-			     (long *)arg))
-                    return -EFAULT;                                     
+		return put_user(acsi_part[MINOR(inode->i_rdev)].nr_sects,
+				(long *) arg);
 	  case BLKFLSBUF:
 		if(!suser())  return -EACCES;
 		if(!inode->i_rdev) return -EINVAL;
@@ -1629,33 +1626,23 @@
 	return DEV_SUPPORTED;
 }
 
-#ifdef CONFIG_ATARI_SLM_MODULE
-void acsi_attach_SLMs( int (*attach_func)( int, int ) );
-#endif
+EXPORT_SYMBOL(acsi_delay_start);
+EXPORT_SYMBOL(acsi_delay_end);
+EXPORT_SYMBOL(acsi_wait_for_IRQ);
+EXPORT_SYMBOL(acsi_wait_for_noIRQ);
+EXPORT_SYMBOL(acsicmd_nodma);
+EXPORT_SYMBOL(acsi_getstatus);
+EXPORT_SYMBOL(acsi_buffer);
+EXPORT_SYMBOL(phys_acsi_buffer);
 
-static struct symbol_table acsi_symbol_table =
-{
-#include <linux/symtab_begin.h>
-
-	X(acsi_delay_start),
-	X(acsi_delay_end),
-	X(acsi_wait_for_IRQ),
-	X(acsi_wait_for_noIRQ),
-	X(acsicmd_nodma),
-	X(acsi_getstatus),
-	X(acsi_buffer),
-	X(phys_acsi_buffer),
 #ifdef CONFIG_ATARI_SLM_MODULE
-	X(acsi_extstatus),
-	X(acsi_end_extstatus),
-	X(acsi_extcmd),
-	X(acsi_attach_SLMs),
-#endif
+void acsi_attach_SLMs( int (*attach_func)( int, int ) );
 
-#include <linux/symtab_end.h>
-};
+EXPORT_SYMBOL(acsi_extstatus);
+EXPORT_SYMBOL(acsi_end_extstatus);
+EXPORT_SYMBOL(acsi_extcmd);
+EXPORT_SYMBOL(acsi_attach_SLMs);
 
-#ifdef CONFIG_ATARI_SLM_MODULE
 /* to remember IDs of SLM devices, SLM module is loaded later
  * (index is target#, contents is lun#, -1 means "no SLM") */
 int SLM_devices[8];
@@ -1751,7 +1738,6 @@
 	for( i = 0; i < (MAX_DEV << 4); i++ )
 		acsi_blocksizes[i] = 1024;
 	blksize_size[MAJOR_NR] = acsi_blocksizes;
-	register_symtab (&acsi_symbol_table);
 }
 
 #ifdef CONFIG_ATARI_SLM_MODULE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov