diff --git a/elks/arch/i86/drivers/block/rd.c b/elks/arch/i86/drivers/block/rd.c index 85f1fa3ae..85f5c3a3f 100644 --- a/elks/arch/i86/drivers/block/rd.c +++ b/elks/arch/i86/drivers/block/rd.c @@ -281,7 +281,7 @@ static struct file_operations rd_fops = { rd_release /* release */ }; -void rd_init(void) +void INITPROC rd_init(void) { if (register_blkdev(MAJOR_NR, DEVICE_NAME, &rd_fops) == 0) { blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; diff --git a/elks/arch/i86/drivers/block/ssd.c b/elks/arch/i86/drivers/block/ssd.c index 191c78ba7..8f4733668 100644 --- a/elks/arch/i86/drivers/block/ssd.c +++ b/elks/arch/i86/drivers/block/ssd.c @@ -37,7 +37,7 @@ static struct file_operations ssd_fops = { ssd_release /* release */ }; -void ssd_init(void) +void INITPROC ssd_init(void) { if (register_blkdev(MAJOR_NR, DEVICE_NAME, &ssd_fops) == 0) { blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; diff --git a/elks/arch/i86/drivers/char/cgatext.c b/elks/arch/i86/drivers/char/cgatext.c index c9ebc9f70..14475ce47 100644 --- a/elks/arch/i86/drivers/char/cgatext.c +++ b/elks/arch/i86/drivers/char/cgatext.c @@ -1,6 +1,4 @@ -#include #include -#include #include #include #include @@ -90,12 +88,7 @@ static struct file_operations cgatext_fops = NULL /* release */ }; -void -cgatext_init(void) +void INITPROC cgatext_init(void) { - int i; - - i = register_chrdev(CGATEXT_MAJOR, CGATEXT_DEVICE_NAME, &cgatext_fops); - if(i) - printk("cgatext: unable to register: %d\n", i); + register_chrdev(CGATEXT_MAJOR, "cgatext", &cgatext_fops); } diff --git a/elks/arch/i86/drivers/char/eth.c b/elks/arch/i86/drivers/char/eth.c index a690188a8..e99a6d6f4 100644 --- a/elks/arch/i86/drivers/char/eth.c +++ b/elks/arch/i86/drivers/char/eth.c @@ -93,7 +93,7 @@ static struct file_operations eth_fops = { eth_release }; -void /*INITPROC*/ eth_init(void) +void INITPROC eth_init(void) { register_chrdev(ETH_MAJOR, "eth", ð_fops); diff --git a/elks/arch/i86/drivers/char/init.c b/elks/arch/i86/drivers/char/init.c index 70c1a860b..c2e7ed806 100644 --- a/elks/arch/i86/drivers/char/init.c +++ b/elks/arch/i86/drivers/char/init.c @@ -2,7 +2,7 @@ #include #include -void chr_dev_init(void) +void INITPROC chr_dev_init(void) { #ifdef CONFIG_CHAR_DEV_LP lp_init(); diff --git a/elks/arch/i86/drivers/char/lp.c b/elks/arch/i86/drivers/char/lp.c index abfae1951..3d2d1efbe 100644 --- a/elks/arch/i86/drivers/char/lp.c +++ b/elks/arch/i86/drivers/char/lp.c @@ -266,7 +266,7 @@ static struct file_operations lp_fops = { /*@+type@*/ -void lp_init(void) +void INITPROC lp_init(void) { register struct lp_info *lp = &ports[0]; int i; diff --git a/elks/arch/i86/drivers/char/mem.c b/elks/arch/i86/drivers/char/mem.c index fd87f709f..e5be83d27 100644 --- a/elks/arch/i86/drivers/char/mem.c +++ b/elks/arch/i86/drivers/char/mem.c @@ -414,10 +414,9 @@ static struct file_operations memory_fops = { /*@+type@*/ -void mem_dev_init(void) +void INITPROC mem_dev_init(void) { - if (register_chrdev(MEM_MAJOR, "mem", &memory_fops)) - printk("MEM: Unable to get major %d for memory devices\n", MEM_MAJOR); + register_chrdev(MEM_MAJOR, "mem", &memory_fops); } #endif diff --git a/elks/arch/i86/drivers/char/meta.c b/elks/arch/i86/drivers/char/meta.c index 8246fb8ea..ab9fc7444 100644 --- a/elks/arch/i86/drivers/char/meta.c +++ b/elks/arch/i86/drivers/char/meta.c @@ -15,6 +15,7 @@ #ifdef CONFIG_DEV_META #include +#include #include #include #include @@ -345,9 +346,9 @@ static struct file_operations meta_chr_fops = { meta_release /* release */ }; -void meta_init(void) +void INITPROC meta_init(void) { - printk("Userspace device driver Copyright (C) 1999 Alistair Riddoch\n"); + debug("Userspace device driver Copyright (C) 1999 Alistair Riddoch\n"); if (!register_chrdev(MAJOR_NR, DEVICE_NAME, &meta_chr_fops)) meta_initialised = 1; } diff --git a/elks/arch/i86/drivers/char/pty.c b/elks/arch/i86/drivers/char/pty.c index 63f3275da..f9a9689a0 100644 --- a/elks/arch/i86/drivers/char/pty.c +++ b/elks/arch/i86/drivers/char/pty.c @@ -182,7 +182,7 @@ struct tty_ops ttyp_ops = { /*@+type@*/ -void pty_init(void) +void INITPROC pty_init(void) { register_chrdev(PTY_MASTER_MAJOR, "pty", &pty_fops); } diff --git a/elks/arch/i86/drivers/char/tcpdev.c b/elks/arch/i86/drivers/char/tcpdev.c index 9b7cb99eb..b0798f762 100644 --- a/elks/arch/i86/drivers/char/tcpdev.c +++ b/elks/arch/i86/drivers/char/tcpdev.c @@ -176,7 +176,7 @@ static struct file_operations tcpdev_fops = { /*@+type@*/ -void tcpdev_init(void) +void INITPROC tcpdev_init(void) { register_chrdev(TCPDEV_MAJOR, "tcpdev", &tcpdev_fops); bufin_sem = bufout_sem = 0; diff --git a/elks/arch/i86/drivers/net/el3.c b/elks/arch/i86/drivers/net/el3.c index 910bd7a62..e861c2d26 100644 --- a/elks/arch/i86/drivers/net/el3.c +++ b/elks/arch/i86/drivers/net/el3.c @@ -90,7 +90,7 @@ enum RxFilter { #define EP_ID_PORT_END 0x200 #define EP_TAG_MAX 0x7 /* must be 2^n - 1 */ -static int el3_isa_probe(); +static int INITPROC el3_isa_probe(); //static word_t read_eeprom(int, int); static word_t id_read_eeprom(int); static size_t el3_write(struct inode *, struct file *, char *, size_t); @@ -141,7 +141,7 @@ struct file_operations el3_fops = el3_release }; -void el3_drv_init(void) { +void INITPROC el3_drv_init(void) { ioaddr = net_port; // temporary verbose = (net_flagsÐF_VERBOSE); @@ -156,7 +156,7 @@ void el3_drv_init(void) { } -static int el3_find_id_port ( void ) { +static int INITPROC el3_find_id_port ( void ) { for ( el3_id_port = EP_ID_PORT_START ; el3_id_port < EP_ID_PORT_END ; @@ -176,7 +176,7 @@ static int el3_find_id_port ( void ) { } /* Return 0 on success, 1 on error */ -static int el3_isa_probe( void ) +static int INITPROC el3_isa_probe( void ) { short lrs_state = 0xff; int i; diff --git a/elks/arch/i86/drivers/net/wd.c b/elks/arch/i86/drivers/net/wd.c index 306e8996f..42a8f6f35 100644 --- a/elks/arch/i86/drivers/net/wd.c +++ b/elks/arch/i86/drivers/net/wd.c @@ -175,7 +175,7 @@ static void wd_get_hw_addr(word_t * data) * determine bus width if possible. */ -static int wd_probe(void) { +static int INITPROC wd_probe(void) { int i, tmp = 0; for (i = 0; i < 8; i++) @@ -706,7 +706,7 @@ static void wd_int(int irq, struct pt_regs * regs) * Ethernet main initialization (during boot) */ -void wd_drv_init(void) +void INITPROC wd_drv_init(void) { unsigned u; word_t hw_addr[6U]; @@ -734,7 +734,7 @@ void wd_drv_init(void) /* Using this wrapper saves 44 bytes of RAM */ /* Using word transfers when possible improves transfer time ~10% * on large packets (measured @ 1200 bytes) */ -void fmemcpy(void *dst_off, seg_t dst_seg, void *src_off, seg_t src_seg, size_t count, int type) { +static void fmemcpy(void *dst_off, seg_t dst_seg, void *src_off, seg_t src_seg, size_t count, int type) { if (type == is_8bit) fmemcpyb(dst_off, dst_seg, src_off, src_seg, count); diff --git a/elks/include/linuxmt/cgatext.h b/elks/include/linuxmt/cgatext.h deleted file mode 100644 index 31353e8ae..000000000 --- a/elks/include/linuxmt/cgatext.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __LINUXMT_CGATEXT_H -#define __LINUXMT_CGATEXT_H - -#define CGATEXT_DEVICE_NAME "cgatext" - -#endif diff --git a/elks/include/linuxmt/init.h b/elks/include/linuxmt/init.h index f9ad0a468..d0de1cb9d 100644 --- a/elks/include/linuxmt/init.h +++ b/elks/include/linuxmt/init.h @@ -45,22 +45,22 @@ extern int INITPROC bioshd_init(void); extern int INITPROC get_ide_data(int, struct drive_infot *); extern int directhd_init(void); extern void floppy_init(void); -extern void rd_init(void); -extern void ssd_init(void); +extern void INITPROC rd_init(void); +extern void INITPROC ssd_init(void); extern void romflash_init(void); /* char device init routines*/ -extern void chr_dev_init(void); -extern void cgatext_init(void); -extern void eth_init(void); +extern void INITPROC chr_dev_init(void); +extern void INITPROC cgatext_init(void); +extern void INITPROC eth_init(void); extern void ne2k_drv_init(void); -extern void el3_drv_init(void); -extern void wd_drv_init(void); -extern void lp_init(void); -extern void mem_dev_init(void); -extern void meta_init(void); -extern void pty_init(void); -extern void tcpdev_init(void); +extern void INITPROC el3_drv_init(void); +extern void INITPROC wd_drv_init(void); +extern void INITPROC lp_init(void); +extern void INITPROC mem_dev_init(void); +extern void INITPROC meta_init(void); +extern void INITPROC pty_init(void); +extern void INITPROC tcpdev_init(void); extern void kfork_proc(void (*addr)()); extern void arch_setup_user_stack(struct task_struct *, word_t entry);