look at include/linux/compatmac.h

------------------------------------------------------------------------

2.4.20:	list_move(), list_move_tail(), list_splice_init(),
	list_for_each_entry()

------------------------------------------------------------------------

2.0.0 support:
	linux/file.h appeared since 2.0.14
	linux/sched.h: files->open_fds.fds_bits

------------------------------------------------------------------------

#define ISA_BASE    0xA0000
#define ISA_MAX    0x100000  /* for general memory access */

/* this line appears in silly_init */
io_base = ioremap(ISA_BASE, ISA_MAX - ISA_BASE);

------------------------------------------------------------------------

list.h soon: reverse traversal list_for_each_r and list_for_each_safe_r

------------------------------------------------------------------------

2.4.18/include/linux/kdev_t.h:

+/* 2.5.x compatibility */
+
+#define mk_kdev(a,b) MKDEV(a,b)
+#define major(d) MAJOR(d)
+#define minor(d) MINOR(d)
+#define kdev_same(a,b) (a==b)
+#define kdev_none(d) (!(d))

------------------------------------------------------------------------

linux/stringify.h since 2.4.18

------------------------------------------------------------------------

*xattr sys call entries added (i386 only)
(eXtended Attributes, EA)

------------------------------------------------------------------------
procfs:

#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
extern int gpib_read_proc( char *buffer, char **start, off_t offset, int count,
			   int *eof, void *data );
#else
extern int gpib_read_proc( char *buffer, char **start, off_t offset, int count,
			   int unused );

struct proc_dir_entry gpib_proc_entry = {
	0,
	5, "gpib0",
	S_IFREG | S_IRUGO,
	1, 0, 0,
	0,
	NULL,
	&gpib_read_proc
};
#endif


int init_module( void )
{
#if LINUX_VERSION_CODE < KERNEL_VERSION( 2, 4, 0 ) && \
    LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
	struct proc_dir_entry *gpib_proc_entry;
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 )
	create_proc_read_entry( board.name, 0, NULL, gpib_read_proc, NULL );
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION( 2, 4, 0 ) && \
    LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
	if ( ( gpib_proc_entry = create_proc_entry( board.name, 0, NULL ) ) )
		gpib_proc_entry->read_proc = gpib_read_proc;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION( 2, 2, 0 )
	for ( gpib_proc_entry.namelen = 0, namep = board.name;
	      *namep != '\0'; gpib_proc_entry.namelen++, namep++ )
		;
	gpib_proc_entry.name = board.name;
	proc_register_dynamic( &proc_root, &gpib_proc_entry );
#endif
}

void cleanup_module( void )
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 )
		remove_proc_entry( board.name, NULL );
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION( 2, 4, 0 ) && \
    LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
		remove_proc_entry( board.name, NULL );
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION( 2, 2, 0 )
		proc_unregister( &proc_root, gpib_proc_entry.low_ino );
#endif
}


#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
int gpib_read_proc( char *buffer, char **start, off_t offset, int count,
		    int *eof, void *data )
#else
int gpib_read_proc( char *buffer, char **start, off_t offset, int count,
		    int unused )
#endif
{
	char *buf = buffer;

	buf += sprintf( buf, "board type     : " );

 proc_done:
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
	*eof = 1;
#endif

	return ( int ) ( buf - buffer);
}


------------------------------------------------------------------------

inline void semaphore_init( struct semaphore *semaphore, int state )
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 0 )
	sema_init( semaphore, state );
#else
	semaphore->count = state;
#endif
}


