Resent-Date: Thu, 9 Sep 1999 12:09:17 +0200 (MET DST)
To: linux-m68k@lists.linux-m68k.org
Subject: 2.3.16
X-Yow: The fact that 47 PEOPLE are yelling and sweat is cascading
 down my SPINAL COLUMN is fairly enjoyable!!
From: Andreas Schwab <schwab@suse.de>
Date: 09 Sep 1999 12:08:09 +0200
Resent-From: linux-m68k@phil.uni-sb.de

Hi!

Here are some fixes for 2.3.16:

- drivers/char/atari_*.c: modernize and fix module init/cleanup functions.
- drivers/video/atafb.c: fix warnings.
- include/asm-m68k/entry.h: fix GET_CURRENT (to get
  arch/m68k/atari/ataints.c to compile)

Andreas.

----------------------------------------------------------------------
Index: drivers/char/atari_MFPser.c
===================================================================
RCS file: /usr/local/src/m68k-linux/cvsroot/linux/drivers/char/atari_MFPser.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -a -r1.1.1.1 -r1.2
--- drivers/char/atari_MFPser.c	1999/08/02 15:35:20	1.1.1.1
+++ drivers/char/atari_MFPser.c	1999/09/09 08:59:41	1.2
@@ -927,13 +927,8 @@
 }
 
 #ifdef MODULE
-int init_module(void)
+static void __exit atari_MFPser_exit(void)
 {
-	return( atari_MFPser_init() );
-}
-
-void cleanup_module(void)
-{
 	if (stmfp_line >= 0) {
 		MFPser_deinit_port( &rs_table[stmfp_line], 0 );
 		unregister_serial( stmfp_line );
@@ -943,4 +938,7 @@
 		unregister_serial( ttmfp_line );
 	}
 }
+
+module_init(atari_MFPser_init);
+module_exit(atari_MFPser_exit);
 #endif
Index: drivers/char/atari_MIDI.c
===================================================================
RCS file: /usr/local/src/m68k-linux/cvsroot/linux/drivers/char/atari_MIDI.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -a -r1.1.1.1 -r1.2
--- drivers/char/atari_MIDI.c	1999/08/02 15:35:20	1.1.1.1
+++ drivers/char/atari_MIDI.c	1999/09/09 08:59:42	1.2
@@ -148,7 +148,7 @@
 };
 
 
-__initfunc(int atari_MIDI_init( void ))
+int __init atari_MIDI_init(void)
 {
 	extern char  m68k_debug_device[];
   	static  struct serial_struct  req;
@@ -553,15 +553,13 @@
 
 
 #ifdef MODULE
-int init_module(void)
+static void __exit atari_MIDI_exit(void)
 {
-	return( atari_MIDI_init() );
-}
-
-void cleanup_module(void)
-{
 	atari_MIDI_interrupt_hook = NULL;
 	unregister_serial( midi_info->line );
 }
+
+module_init(atari_MIDI_init)
+module_exit(atari_MIDI_exit)
 #endif
 
Index: drivers/char/atari_SCC.c
===================================================================
RCS file: /usr/local/src/m68k-linux/cvsroot/linux/drivers/char/atari_SCC.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -a -r1.1.1.1 -r1.3
--- drivers/char/atari_SCC.c	1999/08/02 15:35:20	1.1.1.1
+++ drivers/char/atari_SCC.c	1999/09/09 09:29:55	1.3
@@ -48,6 +48,7 @@
 #include <linux/m68kserial.h>
 #include <linux/tqueue.h>
 #include <linux/malloc.h>
+#include <linux/init.h>
 
 #include <asm/uaccess.h>
 #include <asm/setup.h>
@@ -2581,7 +2582,7 @@
 
 
 #ifdef MODULE
-int init_module(void)
+static int __init atari_SCC_module_init(void)
 {
 #ifdef ENABLE_ATARI_SCC
 	if (MACH_IS_ATARI)
@@ -2590,7 +2591,7 @@
 	return -ENODEV;
 }
 
-void cleanup_module(void)
+static void __exit atari_SCC_exit(void)
 {
 	if (chb_line >= 0) {
 		SCC_deinit_port( &rs_table[chb_line], CHANNEL_B );
@@ -2614,6 +2615,9 @@
 	if (cha422_line >= 0)
 		unregister_serial( cha422_line );
 }
+
+module_init(atari_SCC_module_init);
+module_exit(atari_SCC_exit);
 #endif
 
 /*
Index: drivers/video/atafb.c
===================================================================
RCS file: /usr/local/src/m68k-linux/cvsroot/linux/drivers/video/atafb.c,v
retrieving revision 1.1.1.4
retrieving revision 1.6
diff -u -a -r1.1.1.4 -r1.6
--- drivers/video/atafb.c	1999/08/19 17:49:04	1.1.1.4
+++ drivers/video/atafb.c	1999/09/09 09:42:14	1.6
@@ -464,7 +464,7 @@
 	int mode;
 
 	strcpy(fix->id,"Atari Builtin");
-	fix->smem_start = real_screen_base;
+	fix->smem_start = (unsigned long)real_screen_base;
 	fix->smem_len = screen_len;
 	fix->type=FB_TYPE_INTERLEAVED_PLANES;
 	fix->type_aux=2;
@@ -797,7 +797,7 @@
 							  struct atafb_par *par )
 {
 	strcpy(fix->id, "Atari Builtin");
-	fix->smem_start = real_screen_base;
+	fix->smem_start = (unsigned long)real_screen_base;
 	fix->smem_len = screen_len;
 	fix->type = FB_TYPE_INTERLEAVED_PLANES;
 	fix->type_aux = 2;
@@ -1760,7 +1760,7 @@
 	int mode;
 
 	strcpy(fix->id,"Atari Builtin");
-	fix->smem_start = real_screen_base;
+	fix->smem_start = (unsigned long)real_screen_base;
 	fix->smem_len = screen_len;
 	fix->type = FB_TYPE_INTERLEAVED_PLANES;
 	fix->type_aux = 2;
@@ -2104,7 +2104,7 @@
 
 {
 	strcpy(fix->id,"Unknown Extern");
-	fix->smem_start=external_addr;
+	fix->smem_start = (unsigned long)external_addr;
 	fix->smem_len = PAGE_ALIGN(external_len);
 	if (external_depth == 1) {
 		fix->type = FB_TYPE_PACKED_PIXELS;
@@ -2488,7 +2488,7 @@
 	atafb_get_var(&var, con, info);
 	if (con == -1)
 		con=0;
-	display->screen_base = fix.smem_start;
+	display->screen_base = (void *)fix.smem_start;
 	display->visual = fix.visual;
 	display->type = fix.type;
 	display->type_aux = fix.type_aux;
Index: include/asm-m68k/entry.h
===================================================================
RCS file: /usr/local/src/m68k-linux/cvsroot/linux/include/asm-m68k/entry.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -a -r1.1.1.2 -r1.2
--- include/asm-m68k/entry.h	1999/09/06 13:42:14	1.1.1.2
+++ include/asm-m68k/entry.h	1999/09/09 09:24:22	1.2
@@ -162,7 +162,7 @@
 #endif
 #define GET_CURRENT(tmp) \
 	"movel	%%sp,"#tmp"\n\t" \
-	"andw	#-KTHREAD_SIZE,"#tmp"\n\t" \
+	"andw	#-"STR(KTHREAD_SIZE)","#tmp"\n\t" \
 	"movel	"#tmp",%%a2"
 
 #endif

-- 
Andreas Schwab                                  "And now for something
schwab@suse.de                                   completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

