[PATCH]: g_NCR5380.c 2.1.42 as module

Joachim Gassen (joachim@fb4-1112.uni-muenster.de)
Sun, 1 Jun 1997 15:13:52 +0200 (MET DST)


Hey all

I have had some problems with the g_NCR5380 module and the latest kernels
(about kernel > 2.1.37) due to unresolved symbols.
2.1.42 finally failed to compile with the following messages:

gcc -D__KERNEL__ -I/usr/src/linux-vanilla/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -m486
-malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 -D__SMP__
-DMODULE -c -o g_NCR5380.o g_NCR5380.c
g_NCR5380.c: In function eneric_NCR5380_proc_info':
g_NCR5380.c:658: `dev' undeclared (first use this function)
g_NCR5380.c:658: (Each undeclared identifier is reported only once
g_NCR5380.c:658: for each function it appears in.)
g_NCR5380.c:665: `scsi_device_types' undeclared (first use this function)
make[2]: *** [g_NCR5380.o] Error 1

(With or without SMP defined)

The enclosed patch makes 2.1.42 compile g_NCR5380 as a module again.
The unresolved symbols are gone, too. The module now works for me
(NCR53C400a and a patch from Ingmar Baumgart <ingmar@gonzo.schwaben.de>
see http://www.schwaben.de/home/bgt/).

Could someone with deeper knowledge please have a look at this and
enlighten me whether I did something completely braindead.

(btw: who is the current maintainer for this code?)

Thanks Joachim

-- 
Joachim Gassen             <http://fb4-1112.uni-muenster.de/~joachim>  
v: 0251-63664 f/d: 63617 isdn: 63625 joachim@fb4-1112.uni-muenster.de
Ls f. BWL, insb. IUR,     Universitaetsstr. 14-16,     48143 Muenster
voice: 0251-8321901   fax: 0251-8322018   11joga@wiwi.uni-muenster.de    

diff -3 -c -r linux-vanilla/drivers/scsi/g_NCR5380.c linux-patched/drivers/scsi/g_NCR5380.c *** linux-vanilla/drivers/scsi/g_NCR5380.c Sun Jun 1 14:25:12 1997 --- linux-patched/drivers/scsi/g_NCR5380.c Sat May 31 18:36:03 1997 *************** *** 619,625 **** struct Scsi_Host *scsi_ptr; Scsi_Cmnd *ptr; struct NCR5380_hostdata *hostdata; ! cli(); for (scsi_ptr = first_instance; scsi_ptr; scsi_ptr=scsi_ptr->next) --- 686,692 ---- struct Scsi_Host *scsi_ptr; Scsi_Cmnd *ptr; struct NCR5380_hostdata *hostdata; ! Scsi_Device *dev; cli(); for (scsi_ptr = first_instance; scsi_ptr; scsi_ptr=scsi_ptr->next) diff -3 -c -r linux-vanilla/drivers/scsi/scsi.h linux-patched/drivers/scsi/scsi.h *** linux-vanilla/drivers/scsi/scsi.h Sun Jun 1 14:25:12 1997 --- linux-patched/drivers/scsi/scsi.h Sat May 31 18:48:18 1997 *************** *** 37,43 **** #endif #define MAX_SCSI_DEVICE_CODE 10 ! extern void scsi_make_blocked_list(void); extern volatile int in_scan_scsis; extern const unsigned char scsi_command_size[8]; --- 37,44 ---- #endif #define MAX_SCSI_DEVICE_CODE 10 ! extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE]; ! extern void scsi_make_blocked_list(void); extern volatile int in_scan_scsis; extern const unsigned char scsi_command_size[8]; diff -3 -c -r linux-vanilla/drivers/scsi/scsi_syms.c linux-patched/drivers/scsi/scsi_syms.c *** linux-vanilla/drivers/scsi/scsi_syms.c Fri Jan 3 10:33:26 1997 --- linux-patched/drivers/scsi/scsi_syms.c Sat May 31 14:06:30 1997 *************** *** 72,76 **** --- 72,77 ---- EXPORT_SYMBOL(scsi_hosts); EXPORT_SYMBOL(scsi_devicelist); EXPORT_SYMBOL(scsi_devices); + EXPORT_SYMBOL(scsi_device_types); #endif /* CONFIG_MODULES */