2 // This is a dummy module to make the firmware available when needed
3 // and allows it to be unloaded when not. Rumor is the __initdata
4 // macro doesn't always works on all platforms so we use this kludge.
5 // If not compiled as a module it just makes fip_firm avaliable then
6 // __initdata should work as advertized
9 #include <linux/config.h>
10 #include <linux/module.h>
11 #include <linux/version.h>
12 #include <linux/init.h>
13 #include <linux/wait.h>
19 #define __initfunc(a) a
25 #include "./ip2/ip2types.h"
26 #include "./ip2/fip_firm.h" // the meat
29 ip2_loadmain(int *, int *, unsigned char *, int ); // ref into ip2main.c
32 #if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
36 # include <linux/modversions.h>
39 static int io
[IP2_MAX_BOARDS
]= { 0,};
40 static int irq
[IP2_MAX_BOARDS
] = { 0,};
42 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
43 MODULE_AUTHOR("Doug McNash");
44 MODULE_DESCRIPTION("Computone IntelliPort Plus Driver");
45 MODULE_PARM(irq
,"1-"__MODULE_STRING(IP2_MAX_BOARDS
) "i");
46 MODULE_PARM_DESC(irq
,"Interrupts for IntelliPort Cards");
47 MODULE_PARM(io
,"1-"__MODULE_STRING(IP2_MAX_BOARDS
) "i");
48 MODULE_PARM_DESC(io
,"I/O ports for IntelliPort Cards");
49 # endif /* LINUX_VERSION */
52 //======================================================================
58 MOD_INC_USE_COUNT
; // hold till done
60 rc
= ip2_loadmain(io
,irq
,(unsigned char *)fip_firm
,sizeof(fip_firm
));
61 // The call to lock and load main, create dep
63 MOD_DEC_USE_COUNT
; //done - kerneld now can unload us
67 //======================================================================
71 // call to this is int tty_io.c so we need this
75 //======================================================================
84 # define NULL ((void *) 0)
89 return ip2_loadmain(NULL
,NULL
,(unsigned char *)fip_firm
,sizeof(fip_firm
));