## Automatically generated incremental diff
## From:   linux-2.5.68-bk4
## To:     linux-2.5.68-bk5
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.68-bk4/Makefile linux-2.5.68-bk5/Makefile
--- linux-2.5.68-bk4/Makefile	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/Makefile	2003-04-24 04:34:51.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 68
-EXTRAVERSION = -bk4
+EXTRAVERSION = -bk5
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.68-bk4/arch/cris/drivers/serial.c linux-2.5.68-bk5/arch/cris/drivers/serial.c
--- linux-2.5.68-bk4/arch/cris/drivers/serial.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/arch/cris/drivers/serial.c	2003-04-24 04:34:51.000000000 -0700
@@ -1402,7 +1402,7 @@
 
 	if (!E100_RTS_GET(info) &&
 	    CIRC_SPACE(info->recv.head, info->recv.tail, SERIAL_RECV_SIZE) < TTY_THROTTLE_LIMIT)
-		info->tty->driver.throttle(info->tty);
+		info->tty->driver->throttle(info->tty);
 	
 	START_FLUSH_FAST_TIMER(info, "receive_chars");
 
@@ -1658,7 +1658,7 @@
 	/* unthrottle if we have throttled */
 	if (E100_RTS_GET(info) &&
 	    CIRC_SPACE(info->recv.head, info->recv.tail, SERIAL_RECV_SIZE) > TTY_THROTTLE_LIMIT)
-		tty->driver.unthrottle(info->tty);
+		tty->driver->unthrottle(info->tty);
 }
 
 static _INLINE_ void
@@ -3049,8 +3049,8 @@
 #endif
 
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -3169,7 +3169,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -3289,7 +3289,7 @@
 
 	/* find which port we want to open */
 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
   
 	if (line < 0 || line >= NR_PORTS)
 		return -ENODEV;
@@ -3302,8 +3302,7 @@
 		return -ENODEV; 
   
 #ifdef SERIAL_DEBUG_OPEN
-	printk("[%d] rs_open %s%d, count = %d\n", current->pid,
-	       tty->driver.name, info->line,
+	printk("[%d] rs_open %s, count = %d\n", current->pid, tty->name,
 	       info->count);
 #endif
 
@@ -3359,7 +3358,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
diff -urN linux-2.5.68-bk4/arch/i386/Kconfig linux-2.5.68-bk5/arch/i386/Kconfig
--- linux-2.5.68-bk4/arch/i386/Kconfig	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/i386/Kconfig	2003-04-24 04:34:51.000000000 -0700
@@ -798,7 +798,7 @@
 
 config SOFTWARE_SUSPEND
 	bool "Software Suspend (EXPERIMENTAL)"
-	depends on EXPERIMENTAL && PM
+	depends on EXPERIMENTAL && PM && SWAP
 	---help---
 	  Enable the possibilty of suspendig machine. It doesn't need APM.
 	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
diff -urN linux-2.5.68-bk4/arch/i386/kernel/irq.c linux-2.5.68-bk5/arch/i386/kernel/irq.c
--- linux-2.5.68-bk4/arch/i386/kernel/irq.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/i386/kernel/irq.c	2003-04-24 04:34:51.000000000 -0700
@@ -32,6 +32,7 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/kallsyms.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -203,10 +204,12 @@
  * waste of time and is not what some drivers would
  * prefer.
  */
-int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
+int handle_IRQ_event(unsigned int irq,
+		struct pt_regs *regs, struct irqaction *action)
 {
 	int status = 1;	/* Force the "do bottom halves" bit */
 	int retval = 0;
+	struct irqaction *first_action = action;
 
 	if (!(action->flags & SA_INTERRUPT))
 		local_irq_enable();
@@ -223,12 +226,22 @@
 		static int count = 100;
 		if (count) {
 			count--;
-			printk(retval
-				? "irq event %d: bogus retval mask %x\n"
-				: "irq %d: nobody cared!\n",
-				irq, 
-				retval);
+			if (retval) {
+				printk("irq event %d: bogus retval mask %x\n",
+					irq, retval);
+			} else {
+				printk("irq %d: nobody cared!\n", irq);
+			}
 			dump_stack();
+			printk("handlers:\n");
+			action = first_action;
+			do {
+				printk("[<%p>]", action->handler);
+				print_symbol(" (%s)",
+					(unsigned long)action->handler);
+				printk("\n");
+				action = action->next;
+			} while (action);
 		}
 	}
 
diff -urN linux-2.5.68-bk4/arch/i386/kernel/module.c linux-2.5.68-bk5/arch/i386/kernel/module.c
--- linux-2.5.68-bk4/arch/i386/kernel/module.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/i386/kernel/module.c	2003-04-24 04:34:51.000000000 -0700
@@ -110,7 +110,7 @@
 		    const Elf_Shdr *sechdrs,
 		    struct module *me)
 {
-	Elf_Shdr *s;
+	const Elf_Shdr *s;
 	char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
 
 	/* look for .altinstructions to patch */ 
diff -urN linux-2.5.68-bk4/arch/i386/kernel/mpparse.c linux-2.5.68-bk5/arch/i386/kernel/mpparse.c
--- linux-2.5.68-bk4/arch/i386/kernel/mpparse.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/arch/i386/kernel/mpparse.c	2003-04-24 04:34:51.000000000 -0700
@@ -1089,11 +1089,15 @@
 	list_for_each(node, &acpi_prt.entries) {
 		entry = list_entry(node, struct acpi_prt_entry, node);
 
-		/* We're only interested in static (non-link) entries. */
-		if (entry->link.handle)
-			continue;
+		/* Need to get irq for dynamic entry */
+		if (entry->link.handle) {
+			irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
+			if (!irq)
+				continue;
+		}
+		else
+			irq = entry->link.index;
 
-		irq = entry->link.index;
 		ioapic = mp_find_ioapic(irq);
 		if (ioapic < 0)
 			continue;
diff -urN linux-2.5.68-bk4/arch/i386/kernel/setup.c linux-2.5.68-bk5/arch/i386/kernel/setup.c
--- linux-2.5.68-bk4/arch/i386/kernel/setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/i386/kernel/setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -802,12 +802,12 @@
    APs have less capabilities than the boot processor are not handled. 
     
    In this case boot with "noreplacement". */ 
-void __init apply_alternatives(void *start, void *end) 
+void apply_alternatives(void *start, void *end) 
 { 
 	struct alt_instr *a; 
 	int diff, i, k;
 
-	for (a = start; a < end; 
+	for (a = start; a < (struct alt_instr *)end; 
 	     a = (void *)ALIGN((unsigned long)(a + 1) + a->instrlen, 4)) { 
 		if (!boot_cpu_has(a->cpuid))
 			continue;
diff -urN linux-2.5.68-bk4/arch/ia64/hp/sim/simserial.c linux-2.5.68-bk5/arch/ia64/hp/sim/simserial.c
--- linux-2.5.68-bk4/arch/ia64/hp/sim/simserial.c	2003-04-19 19:49:29.000000000 -0700
+++ linux-2.5.68-bk5/arch/ia64/hp/sim/simserial.c	2003-04-24 04:34:51.000000000 -0700
@@ -676,7 +676,7 @@
 	 * the line discipline to only process XON/XOFF characters.
 	 */
 	shutdown(info);
-	if (tty->driver.flush_buffer) tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
 	info->event = 0;
 	info->tty = 0;
@@ -879,7 +879,7 @@
 	unsigned long		page;
 
 	MOD_INC_USE_COUNT;
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS)) {
 		MOD_DEC_USE_COUNT;
 		return -ENODEV;
@@ -893,8 +893,7 @@
 	info->tty = tty;
 
 #ifdef SIMSERIAL_DEBUG
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
@@ -937,7 +936,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else
 			*tty->termios = info->state->callout_termios;
diff -urN linux-2.5.68-bk4/arch/ia64/kernel/perfmon.c linux-2.5.68-bk5/arch/ia64/kernel/perfmon.c
--- linux-2.5.68-bk4/arch/ia64/kernel/perfmon.c	2003-04-19 19:51:08.000000000 -0700
+++ linux-2.5.68-bk5/arch/ia64/kernel/perfmon.c	2003-04-24 04:34:51.000000000 -0700
@@ -555,7 +555,7 @@
 		memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 		adr=(unsigned long) mem;
 		while (size > 0) {
-			mem_map_reserve(vmalloc_to_page((void *)adr));
+			SetPageReserved(vmalloc_to_page((void *)adr));
 			adr+=PAGE_SIZE;
 			size-=PAGE_SIZE;
 		}
@@ -571,7 +571,7 @@
 	if (mem) {
 		adr=(unsigned long) mem;
 		while ((long) size > 0) {
-			mem_map_unreserve(vmalloc_to_page((void*)adr));
+			ClearPageReserved(vmalloc_to_page((void*)adr));
 			adr+=PAGE_SIZE;
 			size-=PAGE_SIZE;
 		}
diff -urN linux-2.5.68-bk4/arch/mips/au1000/common/serial.c linux-2.5.68-bk5/arch/mips/au1000/common/serial.c
--- linux-2.5.68-bk4/arch/mips/au1000/common/serial.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/arch/mips/au1000/common/serial.c	2003-04-24 04:34:51.000000000 -0700
@@ -195,7 +195,7 @@
 
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ tty->name, (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -218,7 +218,7 @@
 
 
 static inline int serial_paranoia_check(struct async_struct *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -227,11 +227,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -273,7 +273,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -289,7 +289,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1144,7 +1144,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty || !info->xmit.buf)
@@ -1168,7 +1168,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit.head == info->xmit.tail
@@ -1190,7 +1190,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit.buf || !tmp_buf)
@@ -1264,7 +1264,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
 }
@@ -1273,7 +1273,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
 }
@@ -1283,7 +1283,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	save_flags(flags); cli();
 	info->xmit.head = info->xmit.tail = 0;
@@ -1305,7 +1305,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	info->x_char = ch;
@@ -1335,7 +1335,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1360,7 +1360,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1451,7 +1451,7 @@
 		goto check_and_exit;
 	}
 
-	new_serial.irq = irq_cannonicalize(new_serial.irq);
+	new_serial.irq = irq_canonicalize(new_serial.irq);
 
 	if ((new_serial.irq >= NR_IRQS) || (new_serial.irq < 0) || 
 	    (new_serial.baud_base < 9600)|| (new_serial.type < PORT_UNKNOWN) ||
@@ -1697,7 +1697,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_break"))
+	if (serial_paranoia_check(info, tty->name, "rs_break"))
 		return;
 
 	if (!CONFIGURED_SERIAL_PORT(info))
@@ -1720,7 +1720,7 @@
 	struct serial_icounter_struct icount;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1887,7 +1887,7 @@
 	struct serial_state *state;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1962,8 +1962,8 @@
 		rs_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1991,7 +1991,7 @@
 	unsigned long orig_jiffies, char_time;
 	int lsr;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 	if (info->state->type == PORT_UNKNOWN)
@@ -2055,7 +2055,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	struct serial_state *state = info->state;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -2105,7 +2105,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2264,7 +2264,7 @@
 	unsigned long		page;
 
 	MOD_INC_USE_COUNT;
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS)) {
 		MOD_DEC_USE_COUNT;
 		return -ENODEV;
@@ -2276,14 +2276,13 @@
 	}
 	tty->driver_data = info;
 	info->tty = tty;
-	if (serial_paranoia_check(info, tty->device, "rs_open")) {
+	if (serial_paranoia_check(info, tty->name, "rs_open")) {
 		MOD_DEC_USE_COUNT;		
 		return -ENODEV;
 	}
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
@@ -2336,7 +2335,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -2353,7 +2352,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...", info->line);
+	printk("rs_open %s successful...", tty->name);
 #endif
 	return 0;
 }
@@ -2589,7 +2588,7 @@
 	serial_driver.magic = TTY_DRIVER_MAGIC;
 	serial_driver.driver_name = "serial";
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #else
 	serial_driver.name = "ttyS";
 #endif
@@ -2633,7 +2632,7 @@
 	 */
 	callout_driver = serial_driver;
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #else
 	callout_driver.name = "cua";
 #endif
@@ -2662,7 +2661,7 @@
 		state->icount.rx = state->icount.tx = 0;
 		state->icount.frame = state->icount.parity = 0;
 		state->icount.overrun = state->icount.brk = 0;
-		state->irq = irq_cannonicalize(state->irq);
+		state->irq = irq_canonicalize(state->irq);
 		if (state->hub6)
 			state->io_type = SERIAL_IO_HUB6;
 		if (state->port && check_region(state->port,8)) {
@@ -2682,10 +2681,8 @@
 		       (state->flags & ASYNC_FOURPORT) ? " FourPort" : "",
 		       state->port, state->irq,
 		       uart_config[state->type].name);
-		tty_register_device(&serial_driver,
-				   serial_driver.minor_start + state->line);
-		tty_register_device(&callout_driver,
-				   callout_driver.minor_start + state->line);
+		tty_register_device(&serial_driver, state->line);
+		tty_register_device(&callout_driver, state->line);
 	}
 	return 0;
 }
@@ -2772,10 +2769,8 @@
 	      state->iomem_base ? "iomem" : "port",
 	      state->iomem_base ? (unsigned long)state->iomem_base :
 	      state->port, state->irq, uart_config[state->type].name);
-	tty_register_device(&serial_driver,
-			   serial_driver.minor_start + state->line); 
-	tty_register_device(&callout_driver,
-			   callout_driver.minor_start + state->line);
+	tty_register_device(&serial_driver, state->line); 
+	tty_register_device(&callout_driver, state->line);
 	return state->line + SERIAL_DEV_OFFSET;
 }
 
@@ -2801,10 +2796,8 @@
 	/* These will be hidden, because they are devices that will no longer
 	 * be available to the system. (ie, PCMCIA modems, once ejected)
 	 */
-	tty_unregister_device(&serial_driver,
-			     serial_driver.minor_start + state->line);
-	tty_unregister_device(&callout_driver,
-			     callout_driver.minor_start + state->line);
+	tty_unregister_device(&serial_driver, state->line);
+	tty_unregister_device(&callout_driver, state->line);
 	restore_flags(flags);
 }
 
diff -urN linux-2.5.68-bk4/arch/mips/baget/vacserial.c linux-2.5.68-bk5/arch/mips/baget/vacserial.c
--- linux-2.5.68-bk4/arch/mips/baget/vacserial.c	2003-04-19 19:50:06.000000000 -0700
+++ linux-2.5.68-bk5/arch/mips/baget/vacserial.c	2003-04-24 04:34:51.000000000 -0700
@@ -29,7 +29,7 @@
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) baget_printk("(%s):[%x] refc=%d, serc=%d, ttyc=%d-> %s\n", \
-  cdevname(tty->device),(info->flags),serial_refcount,info->count,tty->count,s)
+  tty->name,(info->flags),serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -164,7 +164,7 @@
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct async_struct *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -173,11 +173,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -266,7 +266,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -282,7 +282,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1023,7 +1023,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty || !info->xmit_buf)
@@ -1046,7 +1046,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1066,7 +1066,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 		
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf || !tmp_buf)
@@ -1134,7 +1134,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -1146,7 +1146,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -1156,7 +1156,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags; 
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 
 	save_flags(flags); cli();
@@ -1177,7 +1177,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	info->x_char = ch;
@@ -1207,7 +1207,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1224,7 +1224,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1456,7 +1456,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_break"))
+	if (serial_paranoia_check(info, tty->name, "rs_break"))
 		return;
 
 	if (!info->port)
@@ -1482,7 +1482,7 @@
 	struct serial_icounter_struct *p_cuser;	/* user space */
 	unsigned long flags; 
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1640,7 +1640,7 @@
 	struct serial_state *state;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1717,8 +1717,8 @@
 		rs_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1747,7 +1747,7 @@
 	unsigned long orig_jiffies, char_time;
 	int lsr;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 	if (info->state->type == PORT_UNKNOWN)
@@ -1802,7 +1802,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	struct serial_state *state = info->state;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -1850,7 +1850,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1997,7 +1997,7 @@
 	unsigned long		page;
 
 	MOD_INC_USE_COUNT; 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS)) {
 		MOD_DEC_USE_COUNT; 
 		return -ENODEV;
@@ -2009,14 +2009,13 @@
 	}
         tty->driver_data = info;
         info->tty = tty;
-	if (serial_paranoia_check(info, tty->device, "rs_open")) {
+	if (serial_paranoia_check(info, tty->name, "rs_open")) {
 	        /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ 
 		return -ENODEV;
 	}
 
 #ifdef SERIAL_DEBUG_OPEN
-	baget_printk("rs_open %s%d, count = %d\n", 
-		     tty->driver.name, info->line,
+	baget_printk("rs_open %s, count = %d\n", tty->name,
 		     info->state->count);
 #endif
 	info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -2071,7 +2070,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -2088,7 +2087,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	baget_printk("rs_open ttys%d successful...", info->line);
+	baget_printk("rs_open %s successful...", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/arch/mips/kernel/irixioctl.c linux-2.5.68-bk5/arch/mips/kernel/irixioctl.c
--- linux-2.5.68-bk4/arch/mips/kernel/irixioctl.c	2003-04-19 19:50:09.000000000 -0700
+++ linux-2.5.68-bk5/arch/mips/kernel/irixioctl.c	2003-04-24 04:34:51.000000000 -0700
@@ -48,8 +48,8 @@
 
 static struct tty_struct *get_real_tty(struct tty_struct *tp)
 {
-	if (tp->driver.type == TTY_DRIVER_TYPE_PTY &&
-	   tp->driver.subtype == PTY_TYPE_MASTER)
+	if (tp->driver->type == TTY_DRIVER_TYPE_PTY &&
+	   tp->driver->subtype == PTY_TYPE_MASTER)
 		return tp->link;
 	else
 		return tp;
diff -urN linux-2.5.68-bk4/arch/parisc/kernel/ioctl32.c linux-2.5.68-bk5/arch/parisc/kernel/ioctl32.c
--- linux-2.5.68-bk4/arch/parisc/kernel/ioctl32.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/arch/parisc/kernel/ioctl32.c	2003-04-24 04:34:51.000000000 -0700
@@ -1446,7 +1446,7 @@
 	if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
 		return -EINVAL;
 	                                                
-	if (tty->driver.ioctl != vt_ioctl)
+	if (tty->driver->ioctl != vt_ioctl)
 		return -EINVAL;
 	
 	/*
diff -urN linux-2.5.68-bk4/arch/parisc/kernel/irq.c linux-2.5.68-bk5/arch/parisc/kernel/irq.c
--- linux-2.5.68-bk4/arch/parisc/kernel/irq.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/arch/parisc/kernel/irq.c	2003-04-24 04:34:51.000000000 -0700
@@ -161,7 +161,7 @@
 
 	DBG_IRQ(irq, ("mask_irq(%d) %d+%d eiem 0x%lx\n", irq,
 				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
 	if (region->ops.mask_irq)
 		region->ops.mask_irq(region->data.dev, IRQ_OFFSET(irq));
@@ -173,7 +173,7 @@
 
 	DBG_IRQ(irq, ("unmask_irq(%d) %d+%d eiem 0x%lx\n", irq,
 				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
 	if (region->ops.unmask_irq)
 		region->ops.unmask_irq(region->data.dev, IRQ_OFFSET(irq));
@@ -185,7 +185,7 @@
 
 	DBG_IRQ(irq, ("disable_irq(%d) %d+%d eiem 0x%lx\n", irq,
 				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
 	if (region->ops.disable_irq)
 		region->ops.disable_irq(region->data.dev, IRQ_OFFSET(irq));
@@ -199,7 +199,7 @@
 
 	DBG_IRQ(irq, ("enable_irq(%d) %d+%d eiem 0x%lx\n", irq,
 				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
 
 	if (region->ops.enable_irq)
@@ -594,7 +594,7 @@
 	printk(KERN_INFO "request_irq(%d, %p, 0x%lx, %s, %p)\n",irq, handler, irqflags, devname, dev_id);
 #endif
 
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	/* request_irq()/free_irq() may not be called from interrupt context. */
 	if (in_interrupt())
 		BUG();
@@ -654,7 +654,7 @@
 	struct irqaction *action, **p;
 
 	/* See comments in request_irq() about interrupt context */
-	irq = irq_cannonicalize(irq);
+	irq = irq_canonicalize(irq);
 	
 	if (in_interrupt()) BUG();
 
diff -urN linux-2.5.68-bk4/arch/ppc/4xx_io/serial_sicc.c linux-2.5.68-bk5/arch/ppc/4xx_io/serial_sicc.c
--- linux-2.5.68-bk4/arch/ppc/4xx_io/serial_sicc.c	2003-04-19 19:48:48.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/4xx_io/serial_sicc.c	2003-04-24 04:34:51.000000000 -0700
@@ -1052,8 +1052,7 @@
     unsigned long flags;
 
 #if DEBUG
-    printk("siccuart_flush_buffer(%d) called\n",
-           MINOR(tty->device) - tty->driver.minor_start);
+    printk("siccuart_flush_buffer(%d) called\n", tty->index);
 #endif
     save_flags(flags); cli();
     info->xmit.head = info->xmit.tail = 0;
@@ -1482,7 +1481,7 @@
         state->count = 1;
     }
     if (--state->count < 0) {
-        printk("rs_close: bad serial port count for %s%d: %d\n", tty->driver.name, info->state->line, state->count);
+        printk("rs_close: bad serial port count for %s: %d\n", tty->name, state->count);
         state->count = 0;
     }
     if (state->count) {
@@ -1521,8 +1520,8 @@
         siccuart_wait_until_sent(tty, info->timeout);
     }
     siccuart_shutdown(info);
-    if (tty->driver.flush_buffer)
-        tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+        tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
         tty->ldisc.flush_buffer(tty);
     tty->closing = 0;
@@ -1580,7 +1579,7 @@
     expire = jiffies + timeout;
 #if DEBUG
     printk("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu  char_time=%lu...\n",
-           MINOR(tty->device) - tty->driver.minor_start, jiffies,
+           tty->index, jiffies,
            expire, char_time);
 #endif
     while ((readb(info->port->uart_base + BL_SICC_LSR) & _LSR_TX_ALL) != _LSR_TX_ALL) {
@@ -1634,7 +1633,7 @@
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
         if (info->flags & ASYNC_NORMAL_ACTIVE)
             return -EBUSY;
         if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1754,7 +1753,7 @@
 static int siccuart_open(struct tty_struct *tty, struct file *filp)
 {
     struct SICC_info *info;
-    int retval, line = MINOR(tty->device) - tty->driver.minor_start;
+    int retval, line = tty->index;
 
 
     // is this a line that we've got?
@@ -1814,7 +1813,7 @@
 
     if ((info->state->count == 1) &&
         (info->flags & ASYNC_SPLIT_TERMIOS)) {
-        if (tty->driver.subtype == SERIAL_TYPE_NORMAL) {
+        if (tty->driver->subtype == SERIAL_TYPE_NORMAL) {
             *tty->termios = info->state->normal_termios;
         }
         else  {
diff -urN linux-2.5.68-bk4/arch/ppc/8260_io/uart.c linux-2.5.68-bk5/arch/ppc/8260_io/uart.c
--- linux-2.5.68-bk4/arch/ppc/8260_io/uart.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/8260_io/uart.c	2003-04-24 04:34:51.000000000 -0700
@@ -219,7 +219,7 @@
 static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout);
 
 static inline int serial_paranoia_check(ser_info_t *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -228,11 +228,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -265,7 +265,7 @@
 	volatile scc_t	*sccp;
 	volatile smc_t	*smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -288,7 +288,7 @@
 	volatile scc_t	*sccp;
 	volatile smc_t	*smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -964,7 +964,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	volatile cbd_t	*bdp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty)
@@ -995,7 +995,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	volatile cbd_t *bdp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty) 
@@ -1047,7 +1047,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	int	ret;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 
 	if ((info->tx_cur->cbd_sc & BD_SC_READY) == 0) {
@@ -1067,7 +1067,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return 0;
 }
@@ -1076,7 +1076,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 
 	/* There is nothing to "flush", whatever we gave the CPM
@@ -1099,7 +1099,7 @@
 
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	bdp = info->tx_cur;
@@ -1137,7 +1137,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1163,7 +1163,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1414,7 +1414,7 @@
 	struct async_icount cnow;	/* kernel counter temps */
 	struct serial_icounter_struct *p_cuser;	/* user space */
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
@@ -1619,7 +1619,7 @@
 	volatile smc_t	*smcp;
 	volatile scc_t	*sccp;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1701,8 +1701,8 @@
 		rs_8xx_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1732,7 +1732,7 @@
 	/*int lsr;*/
 	volatile cbd_t *bdp;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 #ifdef maybe
@@ -1789,7 +1789,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	struct serial_state *state = info->state;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -1840,7 +1840,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1975,18 +1975,17 @@
 	ser_info_t	*info;
 	int 		retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 	retval = get_async_struct(line, &info);
 	if (retval)
 		return retval;
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	tty->driver_data = info;
 	info->tty = tty;
@@ -2010,7 +2009,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -2021,7 +2020,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...", info->line);
+	printk("rs_open %s successful...", line);
 #endif
 	return 0;
 }
@@ -2507,7 +2506,7 @@
 	serial_driver.magic = TTY_DRIVER_MAGIC;
 	serial_driver.driver_name = "serial";
 #ifdef CONFIG_DEVFS_FS
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #else
 	serial_driver.name = "ttyS";
 #endif
@@ -2549,7 +2548,7 @@
 	 */
 	callout_driver = serial_driver;
 #ifdef CONFIG_DEVFS_FS
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #else
 	callout_driver.name = "cua";
 #endif
diff -urN linux-2.5.68-bk4/arch/ppc/8xx_io/uart.c linux-2.5.68-bk5/arch/ppc/8xx_io/uart.c
--- linux-2.5.68-bk4/arch/ppc/8xx_io/uart.c	2003-04-19 19:50:30.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/8xx_io/uart.c	2003-04-24 04:34:51.000000000 -0700
@@ -233,7 +233,7 @@
 static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout);
 
 static inline int serial_paranoia_check(ser_info_t *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -242,11 +242,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -279,7 +279,7 @@
 	volatile scc_t	*sccp;
 	volatile smc_t	*smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -303,7 +303,7 @@
 	volatile scc_t	*sccp;
 	volatile smc_t	*smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	idx = PORT_NUM(info->state->smc_scc_num);
@@ -1043,7 +1043,7 @@
 	volatile cbd_t	*bdp;
 	unsigned char *cp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty)
@@ -1082,7 +1082,7 @@
             return ret;
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty) 
@@ -1135,7 +1135,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	int	ret;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 
 	if ((info->tx_cur->cbd_sc & BD_SC_READY) == 0) {
@@ -1155,7 +1155,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return 0;
 }
@@ -1164,7 +1164,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 
 	/* There is nothing to "flush", whatever we gave the CPM
@@ -1188,7 +1188,7 @@
 
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	bdp = info->tx_cur;
@@ -1227,7 +1227,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1253,7 +1253,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1462,7 +1462,7 @@
 	struct async_icount cnow;	/* kernel counter temps */
 	struct serial_icounter_struct *p_cuser;	/* user space */
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
@@ -1667,7 +1667,7 @@
 	volatile smc_t	*smcp;
 	volatile scc_t	*sccp;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1750,8 +1750,8 @@
 		rs_8xx_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1781,7 +1781,7 @@
 	/*int lsr;*/
 	volatile cbd_t *bdp;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 #ifdef maybe
@@ -1849,7 +1849,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	struct serial_state *state = info->state;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -1900,7 +1900,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2035,18 +2035,17 @@
 	ser_info_t	*info;
 	int 		retval, line;
 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 	retval = get_async_struct(line, &info);
 	if (retval)
 		return retval;
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	tty->driver_data = info;
 	info->tty = tty;
@@ -2071,7 +2070,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -2082,7 +2081,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...", info->line);
+	printk("rs_open %s successful...", tty->name);
 #endif
 	return 0;
 }
@@ -2561,7 +2560,7 @@
 	serial_driver.magic = TTY_DRIVER_MAGIC;
 	serial_driver.driver_name = "serial";
 #ifdef CONFIG_DEVFS_FS
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #else
 	serial_driver.name = "ttyS";
 #endif
@@ -2603,7 +2602,7 @@
 	 */
 	callout_driver = serial_driver;
 #ifdef CONFIG_DEVFS_FS
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #else
 	callout_driver.name = "cua";
 #endif
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/4xx/oak_setup.c linux-2.5.68-bk5/arch/ppc/platforms/4xx/oak_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/4xx/oak_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/4xx/oak_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -101,7 +101,7 @@
 
 	ppc_md.setup_arch	 	= oak_setup_arch;
 	ppc_md.show_percpuinfo	 	= oak_show_percpuinfo;
-	ppc_md.irq_cannonicalize 	= NULL;
+	ppc_md.irq_canonicalize 	= NULL;
 	ppc_md.init_IRQ		 	= oak_init_IRQ;
 	ppc_md.get_irq		 	= oak_get_irq;
 	ppc_md.init		 	= NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/adir_setup.c linux-2.5.68-bk5/arch/ppc/platforms/adir_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/adir_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/adir_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -189,7 +189,7 @@
 
 	ppc_md.setup_arch = adir_setup_arch;
 	ppc_md.show_cpuinfo = adir_show_cpuinfo;
-	ppc_md.irq_cannonicalize = NULL;
+	ppc_md.irq_canonicalize = NULL;
 	ppc_md.init_IRQ = adir_init_IRQ;
 	ppc_md.get_irq = adir_get_irq;
 	ppc_md.init = NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/chrp_setup.c linux-2.5.68-bk5/arch/ppc/platforms/chrp_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/chrp_setup.c	2003-04-19 19:50:42.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/chrp_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -306,7 +306,7 @@
 }
 
 u_int __chrp
-chrp_irq_cannonicalize(u_int irq)
+chrp_irq_canonicalize(u_int irq)
 {
 	if (irq == 2)
 		return 9;
@@ -456,7 +456,7 @@
 	ppc_md.setup_arch     = chrp_setup_arch;
 	ppc_md.show_percpuinfo = of_show_percpuinfo;
 	ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
-	ppc_md.irq_cannonicalize = chrp_irq_cannonicalize;
+	ppc_md.irq_canonicalize = chrp_irq_canonicalize;
 	ppc_md.init_IRQ       = chrp_init_IRQ;
 	ppc_md.get_irq        = openpic_get_irq;
 
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/ev64260_setup.c linux-2.5.68-bk5/arch/ppc/platforms/ev64260_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/ev64260_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/ev64260_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -437,7 +437,7 @@
 
 	ppc_md.setup_arch = ev64260_setup_arch;
 	ppc_md.show_cpuinfo = ev64260_show_cpuinfo;
-	ppc_md.irq_cannonicalize = NULL;
+	ppc_md.irq_canonicalize = NULL;
 	ppc_md.init_IRQ = ev64260_init_irq;
 	ppc_md.get_irq = gt64260_get_irq;
 	ppc_md.init = NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/gemini_setup.c linux-2.5.68-bk5/arch/ppc/platforms/gemini_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/gemini_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/gemini_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -559,7 +559,7 @@
 
 	ppc_md.setup_arch = gemini_setup_arch;
 	ppc_md.show_cpuinfo = gemini_show_cpuinfo;
-	ppc_md.irq_cannonicalize = NULL;
+	ppc_md.irq_canonicalize = NULL;
 	ppc_md.init_IRQ = gemini_init_IRQ;
 	ppc_md.get_irq = openpic_get_irq;
 	ppc_md.init = NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/lopec_setup.c linux-2.5.68-bk5/arch/ppc/platforms/lopec_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/lopec_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/lopec_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -67,7 +67,7 @@
 }
 
 static u32
-lopec_irq_cannonicalize(u32 irq)
+lopec_irq_canonicalize(u32 irq)
 {
 	if (irq == 2)
 		return 9;
@@ -360,7 +360,7 @@
 
 	ppc_md.setup_arch = lopec_setup_arch;
 	ppc_md.show_cpuinfo = lopec_show_cpuinfo;
-	ppc_md.irq_cannonicalize = lopec_irq_cannonicalize;
+	ppc_md.irq_canonicalize = lopec_irq_canonicalize;
 	ppc_md.init_IRQ = lopec_init_IRQ;
 	ppc_md.get_irq = openpic_get_irq;
 
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/mcpn765_setup.c linux-2.5.68-bk5/arch/ppc/platforms/mcpn765_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/mcpn765_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/mcpn765_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -201,7 +201,7 @@
 }
 
 static u32
-mcpn765_irq_cannonicalize(u32 irq)
+mcpn765_irq_canonicalize(u32 irq)
 {
 	if (irq == 2)
 		return 9;
@@ -434,7 +434,7 @@
 
 	ppc_md.setup_arch = mcpn765_setup_arch;
 	ppc_md.show_cpuinfo = mcpn765_show_cpuinfo;
-	ppc_md.irq_cannonicalize = mcpn765_irq_cannonicalize;
+	ppc_md.irq_canonicalize = mcpn765_irq_canonicalize;
 	ppc_md.init_IRQ = mcpn765_init_IRQ;
 	ppc_md.get_irq = openpic_get_irq;
 	ppc_md.init = mcpn765_init2;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/pmac_setup.c linux-2.5.68-bk5/arch/ppc/platforms/pmac_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/pmac_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/pmac_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -619,7 +619,7 @@
 	ppc_md.setup_arch     = pmac_setup_arch;
 	ppc_md.show_cpuinfo   = pmac_show_cpuinfo;
 	ppc_md.show_percpuinfo = pmac_show_percpuinfo;
-	ppc_md.irq_cannonicalize = NULL;
+	ppc_md.irq_canonicalize = NULL;
 	ppc_md.init_IRQ       = pmac_pic_init;
 	ppc_md.get_irq        = pmac_get_irq; /* Changed later on ... */
 	
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/pplus_setup.c linux-2.5.68-bk5/arch/ppc/platforms/pplus_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/pplus_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/pplus_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -206,7 +206,7 @@
 }
 
 static unsigned int
-pplus_irq_cannonicalize(u_int irq)
+pplus_irq_canonicalize(u_int irq)
 {
 	if (irq == 2)
 	{
@@ -469,7 +469,7 @@
 	ppc_md.setup_arch     = pplus_setup_arch;
 	ppc_md.show_percpuinfo = NULL;
 	ppc_md.show_cpuinfo    = pplus_show_cpuinfo;
-	ppc_md.irq_cannonicalize = pplus_irq_cannonicalize;
+	ppc_md.irq_canonicalize = pplus_irq_canonicalize;
 	ppc_md.init_IRQ       = pplus_init_IRQ;
 	/* this gets changed later on if we have an OpenPIC -- Cort */
 	ppc_md.get_irq        = i8259_irq;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/prep_setup.c linux-2.5.68-bk5/arch/ppc/platforms/prep_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/prep_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/prep_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -976,7 +976,7 @@
 }
 
 static unsigned int __prep
-prep_irq_cannonicalize(u_int irq)
+prep_irq_canonicalize(u_int irq)
 {
 	if (irq == 2)
 	{
@@ -1150,7 +1150,7 @@
 	ppc_md.setup_arch     = prep_setup_arch;
 	ppc_md.show_percpuinfo = prep_show_percpuinfo;
 	ppc_md.show_cpuinfo   = NULL; /* set in prep_setup_arch() */
-	ppc_md.irq_cannonicalize = prep_irq_cannonicalize;
+	ppc_md.irq_canonicalize = prep_irq_canonicalize;
 	ppc_md.init_IRQ       = prep_init_IRQ;
 	/* this gets changed later on if we have an OpenPIC -- Cort */
 	ppc_md.get_irq        = i8259_irq;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/sandpoint_setup.c linux-2.5.68-bk5/arch/ppc/platforms/sandpoint_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/sandpoint_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/sandpoint_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -349,7 +349,7 @@
 }
 
 static u32
-sandpoint_irq_cannonicalize(u32 irq)
+sandpoint_irq_canonicalize(u32 irq)
 {
 	if (irq == 2)
 	{
@@ -602,7 +602,7 @@
 
 	ppc_md.setup_arch = sandpoint_setup_arch;
 	ppc_md.show_cpuinfo = sandpoint_show_cpuinfo;
-	ppc_md.irq_cannonicalize = sandpoint_irq_cannonicalize;
+	ppc_md.irq_canonicalize = sandpoint_irq_canonicalize;
 	ppc_md.init_IRQ = sandpoint_init_IRQ;
 	ppc_md.get_irq = sandpoint_get_irq;
 	ppc_md.init = sandpoint_init2;
diff -urN linux-2.5.68-bk4/arch/ppc/platforms/zx4500_setup.c linux-2.5.68-bk5/arch/ppc/platforms/zx4500_setup.c
--- linux-2.5.68-bk4/arch/ppc/platforms/zx4500_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/platforms/zx4500_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -331,7 +331,7 @@
 
 	ppc_md.setup_arch = zx4500_setup_arch;
 	ppc_md.show_cpuinfo = zx4500_show_cpuinfo;
-	ppc_md.irq_cannonicalize = NULL;
+	ppc_md.irq_canonicalize = NULL;
 	ppc_md.init_IRQ = zx4500_init_IRQ;
 	ppc_md.get_irq = openpic_get_irq;
 	ppc_md.init = NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/syslib/m8260_setup.c linux-2.5.68-bk5/arch/ppc/syslib/m8260_setup.c
--- linux-2.5.68-bk4/arch/ppc/syslib/m8260_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/syslib/m8260_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -243,7 +243,7 @@
 
 	ppc_md.setup_arch		= m8260_setup_arch;
 	ppc_md.show_percpuinfo		= m8260_show_percpuinfo;
-	ppc_md.irq_cannonicalize	= NULL;
+	ppc_md.irq_canonicalize	= NULL;
 	ppc_md.init_IRQ			= m8260_init_IRQ;
 	ppc_md.get_irq			= m8260_get_irq;
 	ppc_md.init			= NULL;
diff -urN linux-2.5.68-bk4/arch/ppc/syslib/m8xx_setup.c linux-2.5.68-bk5/arch/ppc/syslib/m8xx_setup.c
--- linux-2.5.68-bk4/arch/ppc/syslib/m8xx_setup.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc/syslib/m8xx_setup.c	2003-04-24 04:34:51.000000000 -0700
@@ -377,7 +377,7 @@
 
 	ppc_md.setup_arch		= m8xx_setup_arch;
 	ppc_md.show_percpuinfo		= m8xx_show_percpuinfo;
-	ppc_md.irq_cannonicalize	= NULL;
+	ppc_md.irq_canonicalize	= NULL;
 	ppc_md.init_IRQ			= m8xx_init_IRQ;
 	ppc_md.get_irq			= m8xx_get_irq;
 	ppc_md.init			= NULL;
diff -urN linux-2.5.68-bk4/arch/ppc64/kernel/ioctl32.c linux-2.5.68-bk5/arch/ppc64/kernel/ioctl32.c
--- linux-2.5.68-bk4/arch/ppc64/kernel/ioctl32.c	2003-04-19 19:51:18.000000000 -0700
+++ linux-2.5.68-bk5/arch/ppc64/kernel/ioctl32.c	2003-04-24 04:34:51.000000000 -0700
@@ -1799,7 +1799,7 @@
 	if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
 		return -EINVAL;
 	                                                
-	if (tty->driver.ioctl != vt_ioctl)
+	if (tty->driver->ioctl != vt_ioctl)
 		return -EINVAL;
 	
 	/*
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/auxio.c linux-2.5.68-bk5/arch/sparc/kernel/auxio.c
--- linux-2.5.68-bk4/arch/sparc/kernel/auxio.c	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/auxio.c	2003-04-24 04:34:51.000000000 -0700
@@ -6,13 +6,19 @@
 #include <linux/stddef.h>
 #include <linux/init.h>
 #include <linux/config.h>
+#include <linux/spinlock.h>
 #include <asm/oplib.h>
 #include <asm/io.h>
 #include <asm/auxio.h>
 #include <asm/string.h>		/* memset(), Linux has no bzero() */
 
 /* Probe and map in the Auxiliary I/O register */
-unsigned char *auxio_register;
+
+/* auxio_register is not static because it is referenced 
+ * in entry.S::floppy_tdone
+ */
+unsigned long auxio_register = 0UL;
+static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
 
 void __init auxio_probe(void)
 {
@@ -23,7 +29,6 @@
 	switch (sparc_cpu_model) {
 	case sun4d:
 	case sun4:
-		auxio_register = 0;
 		return;
 	default:
 		break;
@@ -37,12 +42,10 @@
 		if(!auxio_nd) {
 #ifdef CONFIG_PCI
 			/* There may be auxio on Ebus */
-			auxio_register = 0;
 			return;
 #else
 			if(prom_searchsiblings(node, "leds")) {
 				/* VME chassis sun4m machine, no auxio exists. */
-				auxio_register = 0;
 				return;
 			}
 			prom_printf("Cannot find auxio node, cannot continue...\n");
@@ -56,14 +59,46 @@
 	r.flags = auxregs[0].which_io & 0xF;
 	r.start = auxregs[0].phys_addr;
 	r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1;
-	auxio_register = (unsigned char *) sbus_ioremap(&r, 0,
-	    auxregs[0].reg_size, "auxio");
+	auxio_register = sbus_ioremap(&r, 0, auxregs[0].reg_size, "auxio");
 	/* Fix the address on sun4m and sun4c. */
 	if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
 	   sparc_cpu_model == sun4c)
-		auxio_register = (unsigned char *) ((int)auxio_register | 3);
+		auxio_register |= 3;
+
+	set_auxio(AUXIO_LED, 0);
+}
+
+unsigned char get_auxio(void)
+{
+	if(auxio_register) 
+		return sbus_readb(auxio_register);
+	return 0;
+}
 
-	TURN_ON_LED;
+void set_auxio(unsigned char bits_on, unsigned char bits_off)
+{
+	unsigned char regval;
+	unsigned long flags;
+	spin_lock_irqsave(&auxio_lock, flags);
+	switch(sparc_cpu_model) {
+	case sun4c:
+		regval = sbus_readb(auxio_register);
+		sbus_writeb(((regval | bits_on) & ~bits_off) | AUXIO_ORMEIN,
+			auxio_register);
+		break;
+	case sun4m:
+		if(!auxio_register)
+			break;     /* VME chassic sun4m, no auxio. */
+		regval = sbus_readb(auxio_register);
+		sbus_writeb(((regval | bits_on) & ~bits_off) | AUXIO_ORMEIN4M,
+			auxio_register);
+		break;
+	case sun4d:
+		break;
+	default:
+		panic("Can't set AUXIO register on this machine.");
+	};
+	spin_unlock_irqrestore(&auxio_lock, flags);
 }
 
 
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/entry.S linux-2.5.68-bk5/arch/sparc/kernel/entry.S
--- linux-2.5.68-bk4/arch/sparc/kernel/entry.S	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/entry.S	2003-04-24 04:34:51.000000000 -0700
@@ -40,6 +40,14 @@
 
 #define NR_SYSCALLS 256      /* Each OS is different... */
 
+/* These are just handy. */
+#define _SV	save	%sp, -STACKFRAME_SZ, %sp
+#define _RS     restore 
+
+#define FLUSH_ALL_KERNEL_WINDOWS \
+	_SV; _SV; _SV; _SV; _SV; _SV; _SV; \
+	_RS; _RS; _RS; _RS; _RS; _RS; _RS;
+
 /* First, KGDB low level things.  This is a rewrite
  * of the routines found in the sparc-stub.c asm() statement
  * from the gdb distribution.  This is also dual-purpose
@@ -73,11 +81,11 @@
 	/* Make sure kgdb sees the same state we just saved. */
 	LOAD_PT_GLOBALS(sp)
 	LOAD_PT_INS(sp)
-	ld	[%sp + REGWIN_SZ + PT_Y], %l4
-	ld	[%sp + REGWIN_SZ + PT_WIM], %l3
-	ld	[%sp + REGWIN_SZ + PT_PSR], %l0
-	ld	[%sp + REGWIN_SZ + PT_PC], %l1
-	ld	[%sp + REGWIN_SZ + PT_NPC], %l2
+	ld	[%sp + STACKFRAME_SZ + PT_Y], %l4
+	ld	[%sp + STACKFRAME_SZ + PT_WIM], %l3
+	ld	[%sp + STACKFRAME_SZ + PT_PSR], %l0
+	ld	[%sp + STACKFRAME_SZ + PT_PC], %l1
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %l2
 	rd	%tbr, %l5	/* Never changes... */
 
 	/* Make kgdb exception frame. */	
@@ -97,7 +105,7 @@
 	WRITE_PAUSE
 
 	call	C_LABEL(handle_exception)
-	 add	%sp, REGWIN_SZ, %o0	! Pass address of registers
+	 add	%sp, STACKFRAME_SZ, %o0	! Pass address of registers
 
 	/* Load new kgdb register set. */
 	LOAD_KGDB_GLOBALS(sp)
@@ -266,7 +274,7 @@
 	mov	11, %o0			! floppy irq level (unused anyway)
 	mov	%g0, %o1		! devid is not used in fast interrupts
 	call	C_LABEL(sparc_floppy_irq)
-	 add	%sp, REGWIN_SZ, %o2	! struct pt_regs *regs
+	 add	%sp, STACKFRAME_SZ, %o2	! struct pt_regs *regs
 
 	RESTORE_ALL
 	
@@ -315,7 +323,7 @@
 	mov	%l7, %o0		! irq level
 patch_handler_irq:
 	call	C_LABEL(handler_irq)
-	 add	%sp, REGWIN_SZ, %o1	! pt_regs ptr
+	 add	%sp, STACKFRAME_SZ, %o1	! pt_regs ptr
 	or	%l0, PSR_PIL, %g2	! restore PIL after handler_irq
 	wr	%g2, PSR_ET, %psr	! keep ET up
 	WRITE_PAUSE
@@ -332,7 +340,7 @@
 	wr	%g2, PSR_ET, %psr
 	WRITE_PAUSE
 	call	C_LABEL(smp4m_percpu_timer_interrupt)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 	wr	%l0, PSR_ET, %psr
 	WRITE_PAUSE
 	RESTORE_ALL
@@ -439,7 +447,7 @@
 	wr	%g2, PSR_ET, %psr
 	WRITE_PAUSE
 	call	C_LABEL(smp4d_percpu_timer_interrupt)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 	wr	%l0, PSR_ET, %psr
 	WRITE_PAUSE
 	RESTORE_ALL
@@ -501,7 +509,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(do_illegal_instruction)
@@ -521,7 +529,7 @@
 	wr	%l0, PSR_ET, %psr
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(do_priv_instruction)
@@ -544,7 +552,7 @@
 
 	ld	[%l1], %o1
 	call	C_LABEL(kernel_unaligned_trap)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	RESTORE_ALL
 
@@ -556,7 +564,7 @@
 
 	ld	[%l1], %o1
 	call	C_LABEL(user_unaligned_trap)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	RESTORE_ALL
 
@@ -569,7 +577,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(do_fpd_trap)
@@ -608,7 +616,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(do_fpe_trap)
@@ -625,7 +633,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_tag_overflow)
@@ -642,7 +650,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_watchpoint)
@@ -659,7 +667,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_reg_access)
@@ -676,7 +684,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_cp_disabled)
@@ -693,7 +701,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_cp_exception)
@@ -710,7 +718,7 @@
 	wr	%l0, PSR_ET, %psr		! re-enable traps
 	WRITE_PAUSE
 
-	add	%sp, REGWIN_SZ, %o0
+	add	%sp, STACKFRAME_SZ, %o0
 	mov	%l1, %o1
 	mov	%l2, %o2
 	call	C_LABEL(handle_hw_divzero)
@@ -734,10 +742,10 @@
 	 nop
 
 	/* Advance over the trap instruction. */
-	ld	[%sp + REGWIN_SZ + PT_NPC], %l1
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1
 	add	%l1, 0x4, %l2
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
-	st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
+	st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 	RESTORE_ALL
 
@@ -749,10 +757,10 @@
 	FLUSH_ALL_KERNEL_WINDOWS
 
 	/* Advance over the trap instruction. */
-	ld	[%sp + REGWIN_SZ + PT_NPC], %l1
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1
 	add	%l1, 0x4, %l2
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
-	st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
+	st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 	RESTORE_ALL
 
@@ -821,7 +829,7 @@
 	sub	%o0, 0x4, %o0
 	lda	[%o0] ASI_CONTROL, %o3	! async error
 	call	C_LABEL(sparc_lvl15_nmi)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	RESTORE_ALL
 
@@ -1155,7 +1163,7 @@
 	WRITE_PAUSE
 
 	call	C_LABEL(do_sun4c_fault)
-	 add	%sp, REGWIN_SZ, %o0	! arg1 = pt_regs ptr
+	 add	%sp, STACKFRAME_SZ, %o0	! arg1 = pt_regs ptr
 
 	RESTORE_ALL
 
@@ -1189,7 +1197,7 @@
 	WRITE_PAUSE
 
 	call	C_LABEL(do_sparc_fault)
-	 add	%sp, REGWIN_SZ, %o0	! arg1 = pt_regs ptr
+	 add	%sp, STACKFRAME_SZ, %o0	! arg1 = pt_regs ptr
 
 	RESTORE_ALL
 
@@ -1227,7 +1235,7 @@
 	.globl	C_LABEL(sys_nis_syscall)
 C_LABEL(sys_nis_syscall):
 	mov	%o7, %l5
-	add	%sp, REGWIN_SZ, %o0		! pt_regs *regs arg
+	add	%sp, STACKFRAME_SZ, %o0		! pt_regs *regs arg
 	call	C_LABEL(c_sys_nis_syscall)
 	 mov	%l5, %o7
 
@@ -1235,7 +1243,7 @@
 	.globl	C_LABEL(sys_ptrace)
 C_LABEL(sys_ptrace):
 	call	C_LABEL(do_ptrace)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1253,7 +1261,7 @@
 	.globl	C_LABEL(sys_execve)
 C_LABEL(sys_execve):
 	mov	%o7, %l5
-	add	%sp, REGWIN_SZ, %o0		! pt_regs *regs arg
+	add	%sp, STACKFRAME_SZ, %o0		! pt_regs *regs arg
 	call	C_LABEL(sparc_execve)
 	 mov	%l5, %o7
 
@@ -1261,7 +1269,7 @@
 	.globl	C_LABEL(sys_pipe)
 C_LABEL(sys_pipe):
 	mov	%o7, %l5
-	add	%sp, REGWIN_SZ, %o0		! pt_regs *regs arg
+	add	%sp, STACKFRAME_SZ, %o0		! pt_regs *regs arg
 	call	C_LABEL(sparc_pipe)
 	 mov	%l5, %o7
 
@@ -1286,7 +1294,7 @@
 C_LABEL(sys_sigpause):
 	/* Note: %o0 already has correct value... */
 	call	C_LABEL(do_sigpause)
-	 add	%sp, REGWIN_SZ, %o1
+	 add	%sp, STACKFRAME_SZ, %o1
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1305,7 +1313,7 @@
 	.globl	C_LABEL(sys_sigsuspend)
 C_LABEL(sys_sigsuspend):
 	call	C_LABEL(do_sigsuspend)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1325,7 +1333,7 @@
 C_LABEL(sys_rt_sigsuspend):
 	/* Note: %o0, %o1 already have correct value... */
 	call	C_LABEL(do_rt_sigsuspend)
-	 add	%sp, REGWIN_SZ, %o2
+	 add	%sp, STACKFRAME_SZ, %o2
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1344,7 +1352,7 @@
 	.globl	C_LABEL(sys_sigreturn)
 C_LABEL(sys_sigreturn):
 	call	C_LABEL(do_sigreturn)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1365,7 +1373,7 @@
 	.globl	C_LABEL(sys_rt_sigreturn)
 C_LABEL(sys_rt_sigreturn):
 	call	C_LABEL(do_rt_sigreturn)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	ld	[%curptr + TI_TASK], %l5
 	ld	[%l5 + AOFF_task_ptrace], %l5
@@ -1401,7 +1409,7 @@
 	WRITE_PAUSE
 	mov	%fp, %o1			! arg1:	usp
 	std	%g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
-	add	%sp, REGWIN_SZ, %o2		! arg2:	pt_regs ptr
+	add	%sp, STACKFRAME_SZ, %o2		! arg2:	pt_regs ptr
 	mov	0, %o3
 	call	C_LABEL(sparc_do_fork)
 	 mov	%l5, %o7
@@ -1425,7 +1433,7 @@
 	andn	%o1, 7, %o1			! no, align to 8 bytes
 1:
 	std	%g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
-	add	%sp, REGWIN_SZ, %o2		! arg2:	pt_regs ptr
+	add	%sp, STACKFRAME_SZ, %o2		! arg2:	pt_regs ptr
 	mov	0, %o3
 	call	C_LABEL(sparc_do_fork)
 	 mov	%l5, %o7
@@ -1447,7 +1455,7 @@
 	sethi	%hi(C_LABEL(sparc_do_fork)), %l1
 	mov	0, %o3
 	jmpl	%l1 + %lo(C_LABEL(sparc_do_fork)), %g0
-	 add	%sp, REGWIN_SZ, %o2
+	 add	%sp, STACKFRAME_SZ, %o2
 
         .align  4
 linux_sparc_ni_syscall:
@@ -1478,7 +1486,7 @@
 	call	schedule_tail
 	 mov	%g3, %o0
 	b	C_LABEL(ret_sys_call)
-	 ld	[%sp + REGWIN_SZ + PT_I0], %o0
+	 ld	[%sp + STACKFRAME_SZ + PT_I0], %o0
 
 	/* Linux native and SunOS system calls enter here... */
 	.align	4
@@ -1514,14 +1522,14 @@
 	call	%l7
 	 mov	%i5, %o5
 
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 
 	.globl	C_LABEL(ret_sys_call)
 C_LABEL(ret_sys_call):
 	ld	[%curptr + TI_TASK], %l6
 	ld	[%l6 + AOFF_task_ptrace], %l6
 	cmp	%o0, -ENOIOCTLCMD
-	ld	[%sp + REGWIN_SZ + PT_PSR], %g3
+	ld	[%sp + STACKFRAME_SZ + PT_PSR], %g3
 	set	PSR_C, %g2
 	bgeu	1f
 	 andcc	%l6, 0x02, %l6	
@@ -1529,35 +1537,35 @@
 	/* System call success, clear Carry condition code. */
 	andn	%g3, %g2, %g3
 	clr	%l6
-	st	%g3, [%sp + REGWIN_SZ + PT_PSR]	
+	st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]	
 	bne	linux_syscall_trace2
-	 ld	[%sp + REGWIN_SZ + PT_NPC], %l1 /* pc = npc */
+	 ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
 	add	%l1, 0x4, %l2			/* npc = npc+4 */
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
 	b	ret_trap_entry
-	 st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 1:
 	/* System call failure, set Carry condition code.
 	 * Also, get abs(errno) to return to the process.
 	 */
 	sub	%g0, %o0, %o0
 	or	%g3, %g2, %g3
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 	mov	1, %l6
-	st	%g3, [%sp + REGWIN_SZ + PT_PSR]
+	st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]
 	bne	linux_syscall_trace2
-	 ld	[%sp + REGWIN_SZ + PT_NPC], %l1 /* pc = npc */
+	 ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
 	add	%l1, 0x4, %l2			/* npc = npc+4 */
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
 	b	ret_trap_entry
-	 st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 linux_syscall_trace2:
 	call	C_LABEL(syscall_trace)
 	 add	%l1, 0x4, %l2			/* npc = npc+4 */
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
 	b	ret_trap_entry
-	 st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 
 	/*
@@ -1595,19 +1603,19 @@
 	mov	%i0, %l5
 
 	call	C_LABEL(do_solaris_syscall)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 	set	PSR_C, %g2
 	cmp	%o0, -ENOIOCTLCMD
 	bgeu	1f
-	 ld	[%sp + REGWIN_SZ + PT_PSR], %g3
+	 ld	[%sp + STACKFRAME_SZ + PT_PSR], %g3
 
 	/* System call success, clear Carry condition code. */		
 	andn	%g3, %g2, %g3
 	clr	%l6
 	b	2f
-	 st	%g3, [%sp + REGWIN_SZ + PT_PSR]	
+	 st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]	
 
 1:
 	/* System call failure, set Carry condition code.
@@ -1615,9 +1623,9 @@
 	 */
 	sub	%g0, %o0, %o0
 	mov	1, %l6
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 	or	%g3, %g2, %g3
-	st	%g3, [%sp + REGWIN_SZ + PT_PSR]
+	st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]
 
 	/* Advance the pc and npc over the trap instruction.
 	 * If the npc is unaligned (has a 1 in the lower byte), it means
@@ -1626,19 +1634,19 @@
 	 * nPC (setcontext).
 	 */
 2:
-	ld	[%sp + REGWIN_SZ + PT_NPC], %l1	/* pc  = npc   */
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1	/* pc  = npc   */
 	andcc	%l1, 1, %g0
 	bne	1f
 	 add	%l1, 0x4, %l2			/* npc = npc+4 */
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
 	b	ret_trap_entry
-	 st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 	/* kernel knows what it is doing, fixup npc and continue */
 1:
 	sub	%l1, 1, %l1
  	b	ret_trap_entry	
-	 st	%l1, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l1, [%sp + STACKFRAME_SZ + PT_NPC]
 
 #ifndef CONFIG_SUNOS_EMUL
 	.align	4
@@ -1651,7 +1659,7 @@
 	nop
 	mov	%i0, %l5
 	call	C_LABEL(do_sunos_syscall)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 #endif
 
 	/* {net, open}bsd system calls enter here... */
@@ -1688,17 +1696,17 @@
 	call	%l7
 	 mov	%i5, %o5
 
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 	set	PSR_C, %g2
 	cmp	%o0, -ENOIOCTLCMD
 	bgeu	1f
-	 ld	[%sp + REGWIN_SZ + PT_PSR], %g3
+	 ld	[%sp + STACKFRAME_SZ + PT_PSR], %g3
 
 	/* System call success, clear Carry condition code. */		
 	andn	%g3, %g2, %g3
 	clr	%l6
 	b	2f
-	 st	%g3, [%sp + REGWIN_SZ + PT_PSR]	
+	 st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]	
 
 1:
 	/* System call failure, set Carry condition code.
@@ -1712,17 +1720,17 @@
 	ld	[%o3 + %o0], %o0
 #endif
 	mov	1, %l6
-	st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 	or	%g3, %g2, %g3
-	st	%g3, [%sp + REGWIN_SZ + PT_PSR]
+	st	%g3, [%sp + STACKFRAME_SZ + PT_PSR]
 
 	/* Advance the pc and npc over the trap instruction. */
 2:
-	ld	[%sp + REGWIN_SZ + PT_NPC], %l1	/* pc  = npc   */
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %l1	/* pc  = npc   */
 	add	%l1, 0x4, %l2			/* npc = npc+4 */
-	st	%l1, [%sp + REGWIN_SZ + PT_PC]
+	st	%l1, [%sp + STACKFRAME_SZ + PT_PC]
 	b	ret_trap_entry
-	 st	%l2, [%sp + REGWIN_SZ + PT_NPC]
+	 st	%l2, [%sp + STACKFRAME_SZ + PT_NPC]
 
 /* Saving and restoring the FPU state is best done from lowlevel code.
  *
@@ -1810,7 +1818,7 @@
 
 	.globl	C_LABEL(ndelay)
 C_LABEL(ndelay):
-	save	%sp, -REGWIN_SZ, %sp
+	save	%sp, -STACKFRAME_SZ, %sp
 	mov	%i0, %o0
 	call	.umul
 	 mov	5, %o1
@@ -1819,7 +1827,7 @@
 
 	.globl	C_LABEL(udelay)
 C_LABEL(udelay):
-	save	%sp, -REGWIN_SZ, %sp
+	save	%sp, -STACKFRAME_SZ, %sp
 	mov	%i0, %o0
 	sethi	%hi(0x10c6), %o1
 	call	.umul
@@ -1856,9 +1864,9 @@
 	wr 	%l0, PSR_ET, %psr
 	WRITE_PAUSE
 
-	st	%i0, [%sp + REGWIN_SZ + PT_G0] ! for restarting syscalls
+	st	%i0, [%sp + STACKFRAME_SZ + PT_G0] ! for restarting syscalls
 	call	C_LABEL(sparc_breakpoint)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	RESTORE_ALL
 
@@ -1953,7 +1961,7 @@
 	WRITE_PAUSE
 
 	call	C_LABEL(pcic_nmi)
-	 add	%sp, REGWIN_SZ, %o1	! struct pt_regs *regs
+	 add	%sp, STACKFRAME_SZ, %o1	! struct pt_regs *regs
 	RESTORE_ALL
 
 	.globl	C_LABEL(pcic_nmi_trap_patch)
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/etrap.S linux-2.5.68-bk5/arch/sparc/kernel/etrap.S
--- linux-2.5.68-bk4/arch/sparc/kernel/etrap.S	2003-04-19 19:51:19.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/etrap.S	2003-04-24 04:34:51.000000000 -0700
@@ -88,7 +88,7 @@
 	/* From kernel, allocate more kernel stack and
 	 * build a pt_regs trap frame.
 	 */
-	sub	%fp, (REGWIN_SZ + TRACEREG_SZ), %t_kstack
+	sub	%fp, (STACKFRAME_SZ + TRACEREG_SZ), %t_kstack
 	STORE_PT_ALL(t_kstack, t_psr, t_pc, t_npc, g2)
 
 	/* See if we are in the trap window. */
@@ -129,7 +129,7 @@
 	jmpl	%t_retpc + 0x8, %g0	! return to caller
 	 mov	%t_kstack, %sp		! and onto new kernel stack
 
-#define STACK_OFFSET (THREAD_SIZE - (TRACEREG_SZ + REGWIN_SZ))
+#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
 
 trap_setup_from_user:
 	/* We can't use %curptr yet. */
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/head.S linux-2.5.68-bk5/arch/sparc/kernel/head.S
--- linux-2.5.68-bk4/arch/sparc/kernel/head.S	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/head.S	2003-04-24 04:34:51.000000000 -0700
@@ -1012,7 +1012,7 @@
 
 		/* I want a kernel stack NOW! */
 		set	C_LABEL(init_thread_union), %g1
-		set	(THREAD_SIZE - REGWIN_SZ), %g2
+		set	(THREAD_SIZE - STACKFRAME_SZ), %g2
 		add	%g1, %g2, %sp
 		mov	0, %fp			/* And for good luck */
 
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/process.c linux-2.5.68-bk5/arch/sparc/kernel/process.c
--- linux-2.5.68-bk4/arch/sparc/kernel/process.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/process.c	2003-04-24 04:34:51.000000000 -0700
@@ -377,60 +377,12 @@
 		current->thread.flags &= ~SPARC_FLAG_KTHREAD;
 
 		/* We must fixup kregs as well. */
+		/* XXX This was not fixed for ti for a while, worked. Unused? */
 		current->thread.kregs = (struct pt_regs *)
-			(((unsigned long)current) +
-			 (THREAD_SIZE - TRACEREG_SZ));
+		    ((char *)current->thread_info + (THREAD_SIZE - TRACEREG_SZ));
 	}
 }
 
-static __inline__ void copy_regs(struct pt_regs *dst, struct pt_regs *src)
-{
-	__asm__ __volatile__("ldd\t[%1 + 0x00], %%g2\n\t"
-			     "ldd\t[%1 + 0x08], %%g4\n\t"
-			     "ldd\t[%1 + 0x10], %%o4\n\t"
-			     "std\t%%g2, [%0 + 0x00]\n\t"
-			     "std\t%%g4, [%0 + 0x08]\n\t"
-			     "std\t%%o4, [%0 + 0x10]\n\t"
-			     "ldd\t[%1 + 0x18], %%g2\n\t"
-			     "ldd\t[%1 + 0x20], %%g4\n\t"
-			     "ldd\t[%1 + 0x28], %%o4\n\t"
-			     "std\t%%g2, [%0 + 0x18]\n\t"
-			     "std\t%%g4, [%0 + 0x20]\n\t"
-			     "std\t%%o4, [%0 + 0x28]\n\t"
-			     "ldd\t[%1 + 0x30], %%g2\n\t"
-			     "ldd\t[%1 + 0x38], %%g4\n\t"
-			     "ldd\t[%1 + 0x40], %%o4\n\t"
-			     "std\t%%g2, [%0 + 0x30]\n\t"
-			     "std\t%%g4, [%0 + 0x38]\n\t"
-			     "ldd\t[%1 + 0x48], %%g2\n\t"
-			     "std\t%%o4, [%0 + 0x40]\n\t"
-			     "std\t%%g2, [%0 + 0x48]\n\t" : :
-			     "r" (dst), "r" (src) :
-			     "g2", "g3", "g4", "g5", "o4", "o5");
-}
-
-static __inline__ void copy_regwin(struct reg_window *dst, struct reg_window *src)
-{
-	__asm__ __volatile__("ldd\t[%1 + 0x00], %%g2\n\t"
-			     "ldd\t[%1 + 0x08], %%g4\n\t"
-			     "ldd\t[%1 + 0x10], %%o4\n\t"
-			     "std\t%%g2, [%0 + 0x00]\n\t"
-			     "std\t%%g4, [%0 + 0x08]\n\t"
-			     "std\t%%o4, [%0 + 0x10]\n\t"
-			     "ldd\t[%1 + 0x18], %%g2\n\t"
-			     "ldd\t[%1 + 0x20], %%g4\n\t"
-			     "ldd\t[%1 + 0x28], %%o4\n\t"
-			     "std\t%%g2, [%0 + 0x18]\n\t"
-			     "std\t%%g4, [%0 + 0x20]\n\t"
-			     "std\t%%o4, [%0 + 0x28]\n\t"
-			     "ldd\t[%1 + 0x30], %%g2\n\t"
-			     "ldd\t[%1 + 0x38], %%g4\n\t"
-			     "std\t%%g2, [%0 + 0x30]\n\t"
-			     "std\t%%g4, [%0 + 0x38]\n\t" : :
-			     "r" (dst), "r" (src) :
-			     "g2", "g3", "g4", "g5", "o4", "o5");
-}
-
 static __inline__ struct sparc_stackf *
 clone_stackframe(struct sparc_stackf *dst, struct sparc_stackf *src)
 {
@@ -495,8 +447,7 @@
 {
 	struct thread_info *ti = p->thread_info;
 	struct pt_regs *childregs;
-	struct reg_window *new_stack;
-	unsigned long stack_offset;
+	char *new_stack;
 
 #ifndef CONFIG_SMP
 	if(last_task_used_math == current) {
@@ -513,15 +464,18 @@
 
 	p->set_child_tid = p->clear_child_tid = NULL;
 
-	/* Calculate offset to stack_frame & pt_regs */
-	stack_offset = THREAD_SIZE - TRACEREG_SZ;
-
-	if(regs->psr & PSR_PS)
-		stack_offset -= REGWIN_SZ;
-	childregs = ((struct pt_regs *) (((unsigned long)ti) + stack_offset));
-	copy_regs(childregs, regs);
-	new_stack = (((struct reg_window *) childregs) - 1);
-	copy_regwin(new_stack, (((struct reg_window *) regs) - 1));
+	/*
+	 *  p->thread_info         new_stack   childregs
+	 *  !                      !           !             {if(PSR_PS) }
+	 *  V                      V (stk.fr.) V  (pt_regs)  { (stk.fr.) }
+	 *  +----- - - - - - ------+===========+============={+==========}+
+	 */
+	new_stack = (char*)ti + THREAD_SIZE;
+	if (regs->psr & PSR_PS)
+		new_stack -= STACKFRAME_SZ;
+	new_stack -= STACKFRAME_SZ + TRACEREG_SZ;
+	memcpy(new_stack, (char *)regs - STACKFRAME_SZ, STACKFRAME_SZ + TRACEREG_SZ);
+	childregs = (struct pt_regs *) (new_stack + STACKFRAME_SZ);
 
 	/*
 	 * A new process must start with interrupts closed in 2.5,
@@ -542,14 +496,11 @@
 		extern struct pt_regs fake_swapper_regs;
 
 		p->thread.kregs = &fake_swapper_regs;
-		new_stack = (struct reg_window *)
-			((((unsigned long)ti) + (THREAD_SIZE)) - REGWIN_SZ);
+		new_stack += STACKFRAME_SZ + TRACEREG_SZ;
 		childregs->u_regs[UREG_FP] = (unsigned long) new_stack;
 		p->thread.flags |= SPARC_FLAG_KTHREAD;
 		p->thread.current_ds = KERNEL_DS;
-		memcpy((void *)new_stack,
-		       (void *)regs->u_regs[UREG_FP],
-		       sizeof(struct reg_window));
+		memcpy(new_stack, (void *)regs->u_regs[UREG_FP], STACKFRAME_SZ);
 		childregs->u_regs[UREG_G6] = (unsigned long) ti;
 	} else {
 		p->thread.kregs = childregs;
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/rtrap.S linux-2.5.68-bk5/arch/sparc/kernel/rtrap.S
--- linux-2.5.68-bk4/arch/sparc/kernel/rtrap.S	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/rtrap.S	2003-04-24 04:34:51.000000000 -0700
@@ -72,16 +72,16 @@
 signal_p:
 	andcc	%g2, (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING), %g0
 	bz,a	ret_trap_continue
-	 ld	[%sp + REGWIN_SZ + PT_PSR], %t_psr
+	 ld	[%sp + STACKFRAME_SZ + PT_PSR], %t_psr
 
 	clr	%o0
 	mov	%l5, %o2
 	mov	%l6, %o3
 	call	C_LABEL(do_signal)
-	 add	%sp, REGWIN_SZ, %o1	! pt_regs ptr
+	 add	%sp, STACKFRAME_SZ, %o1	! pt_regs ptr
 
 	/* Fall through. */
-	ld	[%sp + REGWIN_SZ + PT_PSR], %t_psr
+	ld	[%sp + STACKFRAME_SZ + PT_PSR], %t_psr
 	clr	%l6
 ret_trap_continue:
 	wr	%t_psr, 0x0, %psr
@@ -98,7 +98,7 @@
 
 	mov	1, %o1
 	call	C_LABEL(try_to_clear_window_buffer)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	b	signal_p
 	 ld	[%curptr + TI_FLAGS], %g2
@@ -145,7 +145,7 @@
 	 nop
 
 	b	ret_trap_unaligned_pc
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 1:
 	LOAD_PT_YREG(sp, g1)
@@ -158,9 +158,9 @@
 	rett	%t_npc
 	
 ret_trap_unaligned_pc:
-	ld	[%sp + REGWIN_SZ + PT_PC], %o1
-	ld	[%sp + REGWIN_SZ + PT_NPC], %o2
-	ld	[%sp + REGWIN_SZ + PT_PSR], %o3
+	ld	[%sp + STACKFRAME_SZ + PT_PC], %o1
+	ld	[%sp + STACKFRAME_SZ + PT_NPC], %o2
+	ld	[%sp + STACKFRAME_SZ + PT_PSR], %o3
 
 	wr	%t_wim, 0x0, %wim		! or else...
 
@@ -218,7 +218,7 @@
 	WRITE_PAUSE
 
 	call	C_LABEL(window_ret_fault)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	b	signal_p
 	 ld	[%curptr + TI_FLAGS], %g2
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/signal.c linux-2.5.68-bk5/arch/sparc/kernel/signal.c
--- linux-2.5.68-bk4/arch/sparc/kernel/signal.c	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/signal.c	2003-04-24 04:34:51.000000000 -0700
@@ -753,7 +753,7 @@
 
 	synchronize_user_stack();
 	sfp = (svr4_signal_frame_t __user *)
-		get_sigframe(sa, regs, SVR4_SF_ALIGNED + REGWIN_SZ);
+		get_sigframe(sa, regs, SVR4_SF_ALIGNED + sizeof(struct reg_window));
 
 	if (invalid_frame_pointer(sfp, sizeof(*sfp)))
 		goto sigill_and_return;
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/smp.c linux-2.5.68-bk5/arch/sparc/kernel/smp.c
--- linux-2.5.68-bk4/arch/sparc/kernel/smp.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/smp.c	2003-04-24 04:34:51.000000000 -0700
@@ -100,13 +100,6 @@
 	local_flush_tlb_all();
 }
 
-/* Only broken Intel needs this, thus it should not even be referenced
- * globally...
- */
-void __init initialize_secondary(void)
-{
-}
-
 extern int cpu_idle(void);
 
 /* Activate a secondary processor. */
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/sparc_ksyms.c linux-2.5.68-bk5/arch/sparc/kernel/sparc_ksyms.c
--- linux-2.5.68-bk4/arch/sparc/kernel/sparc_ksyms.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/sparc_ksyms.c	2003-04-24 04:34:51.000000000 -0700
@@ -158,7 +158,8 @@
 EXPORT_SYMBOL(mostek_lock);
 EXPORT_SYMBOL(mstk48t02_regs);
 #if CONFIG_SUN_AUXIO
-EXPORT_SYMBOL(auxio_register);
+EXPORT_SYMBOL(set_auxio);
+EXPORT_SYMBOL(get_auxio);
 #endif
 EXPORT_SYMBOL(request_fast_irq);
 EXPORT_SYMBOL(io_remap_page_range);
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/sunos_asm.S linux-2.5.68-bk5/arch/sparc/kernel/sunos_asm.S
--- linux-2.5.68-bk4/arch/sparc/kernel/sunos_asm.S	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/sunos_asm.S	2003-04-24 04:34:51.000000000 -0700
@@ -16,7 +16,7 @@
 	.align 4
 
 	/* When calling ret_sys_call, %o0 should contain the same
-	 * value as in [%sp + REGWIN_SZ + PT_I0] */
+	 * value as in [%sp + STACKFRAME_SZ + PT_I0] */
 
 	/* SunOS getpid() returns pid in %o0 and ppid in %o1 */
 	.globl	C_LABEL(sunos_getpid)
@@ -25,10 +25,10 @@
 	 nop
 
 	call	C_LABEL(sys_getpid)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I1]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I1]
 
 	b	C_LABEL(ret_sys_call)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 
 	/* SunOS getuid() returns uid in %o0 and euid in %o1 */
 	.globl	C_LABEL(sunos_getuid)
@@ -37,10 +37,10 @@
 	 nop
 
 	call	C_LABEL(sys_getuid16)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I1]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I1]
 
 	b	C_LABEL(ret_sys_call)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 
 	/* SunOS getgid() returns gid in %o0 and egid in %o1 */
 	.globl	C_LABEL(sunos_getgid)
@@ -49,20 +49,20 @@
 	 nop
 
 	call	C_LABEL(sys_getgid16)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I1]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I1]
 
 	b	C_LABEL(ret_sys_call)
-	 st	%o0, [%sp + REGWIN_SZ + PT_I0]
+	 st	%o0, [%sp + STACKFRAME_SZ + PT_I0]
 
 	/* SunOS's execv() call only specifies the argv argument, the
 	 * environment settings are the same as the calling processes.
 	 */
 	.globl	C_LABEL(sunos_execv)
 C_LABEL(sunos_execv):
-	st	%g0, [%sp + REGWIN_SZ + PT_I2]
+	st	%g0, [%sp + STACKFRAME_SZ + PT_I2]
 
 	call	C_LABEL(sparc_execve)
-	 add	%sp, REGWIN_SZ, %o0
+	 add	%sp, STACKFRAME_SZ, %o0
 
 	b	C_LABEL(ret_sys_call)
-	 ld	[%sp + REGWIN_SZ + PT_I0], %o0
+	 ld	[%sp + STACKFRAME_SZ + PT_I0], %o0
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/trampoline.S linux-2.5.68-bk5/arch/sparc/kernel/trampoline.S
--- linux-2.5.68-bk4/arch/sparc/kernel/trampoline.S	2003-04-19 19:51:08.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/trampoline.S	2003-04-24 04:34:51.000000000 -0700
@@ -63,8 +63,8 @@
 	and	%g4, 0xc, %g4
 	ld	[%g5 + %g4], %g6
 
-	sethi	%hi(THREAD_SIZE - REGWIN_SZ), %sp
-	or	%sp, %lo(THREAD_SIZE - REGWIN_SZ), %sp
+	sethi	%hi(THREAD_SIZE - STACKFRAME_SZ), %sp
+	or	%sp, %lo(THREAD_SIZE - STACKFRAME_SZ), %sp
 	add	%g6, %sp, %sp
 
 	/* Turn on traps (PSR_ET). */
@@ -142,8 +142,8 @@
 	srl	%g3, 1, %g4
 	ld	[%g5 + %g4], %g6
 
-	sethi	%hi(THREAD_SIZE - REGWIN_SZ), %sp
-	or	%sp, %lo(THREAD_SIZE - REGWIN_SZ), %sp
+	sethi	%hi(THREAD_SIZE - STACKFRAME_SZ), %sp
+	or	%sp, %lo(THREAD_SIZE - STACKFRAME_SZ), %sp
 	add	%g6, %sp, %sp
 
 	/* Turn on traps (PSR_ET). */
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/windows.c linux-2.5.68-bk5/arch/sparc/kernel/windows.c
--- linux-2.5.68-bk4/arch/sparc/kernel/windows.c	2003-04-19 19:49:52.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/windows.c	2003-04-24 04:34:51.000000000 -0700
@@ -120,7 +120,7 @@
 		unsigned long sp = tp->rwbuf_stkptrs[window];
 
 		if((sp & 7) ||
-		   copy_to_user((char *) sp, &tp->reg_window[window], REGWIN_SZ))
+		   copy_to_user((char *) sp, &tp->reg_window[window], sizeof(struct reg_window)))
 			do_exit(SIGILL);
 	}
 	tp->w_saved = 0;
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/wof.S linux-2.5.68-bk5/arch/sparc/kernel/wof.S
--- linux-2.5.68-bk4/arch/sparc/kernel/wof.S	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/wof.S	2003-04-24 04:34:51.000000000 -0700
@@ -238,7 +238,7 @@
 spnwin_patch3:	and	%twin_tmp, 0xff, %twin_tmp	! patched on 7win Sparcs
 		st	%twin_tmp, [%curptr + TI_UWINMASK]
 
-#define STACK_OFFSET	(THREAD_SIZE - TRACEREG_SZ - REGWIN_SZ)
+#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
 
 	sethi	%hi(STACK_OFFSET), %sp
 	or	%sp, %lo(STACK_OFFSET), %sp
diff -urN linux-2.5.68-bk4/arch/sparc/kernel/wuf.S linux-2.5.68-bk5/arch/sparc/kernel/wuf.S
--- linux-2.5.68-bk4/arch/sparc/kernel/wuf.S	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/kernel/wuf.S	2003-04-24 04:34:51.000000000 -0700
@@ -140,7 +140,7 @@
 C_LABEL(fwin_mmu_patchme):	b	C_LABEL(sun4c_fwin_stackchk)
 				 andcc	%sp, 0x7, %g0
 
-#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - REGWIN_SZ)
+#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
 
 fwin_user_stack_is_bolixed:
 	/* LOCATION: Window 'W' */
diff -urN linux-2.5.68-bk4/arch/sparc/mm/sun4c.c linux-2.5.68-bk5/arch/sparc/mm/sun4c.c
--- linux-2.5.68-bk4/arch/sparc/mm/sun4c.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/mm/sun4c.c	2003-04-24 04:34:51.000000000 -0700
@@ -248,7 +248,7 @@
 	_unused = sun4c_get_context();
 	sun4c_set_context(_unused);
 #ifdef CONFIG_SUN_AUXIO
-	_unused = *AUXREG;
+	_unused = get_auxio();
 #endif
 }
 
diff -urN linux-2.5.68-bk4/arch/sparc/prom/misc.c linux-2.5.68-bk5/arch/sparc/prom/misc.c
--- linux-2.5.68-bk4/arch/sparc/prom/misc.c	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc/prom/misc.c	2003-04-24 04:34:51.000000000 -0700
@@ -68,7 +68,7 @@
 	install_linux_ticker();
 	spin_unlock_irqrestore(&prom_lock, flags);
 #ifdef CONFIG_SUN_AUXIO
-	TURN_ON_LED;
+	set_auxio(AUXIO_LED, 0);
 #endif
 	if(!serial_console && prom_palette)
 		prom_palette (0);
diff -urN linux-2.5.68-bk4/arch/sparc64/kernel/auxio.c linux-2.5.68-bk5/arch/sparc64/kernel/auxio.c
--- linux-2.5.68-bk4/arch/sparc64/kernel/auxio.c	2003-04-19 19:50:06.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc64/kernel/auxio.c	2003-04-24 04:34:51.000000000 -0700
@@ -1,28 +1,114 @@
 /* auxio.c: Probing for the Sparc AUXIO register at boot time.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ *
+ * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net)
  */
 
 #include <linux/config.h>
-#include <linux/stddef.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
 #include <linux/init.h>
-#include <linux/delay.h>
 #include <linux/ioport.h>
 
 #include <asm/oplib.h>
 #include <asm/io.h>
-#include <asm/auxio.h>
 #include <asm/sbus.h>
 #include <asm/ebus.h>
-#include <asm/fhc.h>
-#include <asm/spitfire.h>
-#include <asm/starfire.h>
+#include <asm/auxio.h>
+
+/* This cannot be static, as it is referenced in entry.S */
+unsigned long auxio_register = 0UL;
+
+enum auxio_type {
+	AUXIO_TYPE_NODEV,
+	AUXIO_TYPE_SBUS,
+	AUXIO_TYPE_EBUS
+};
+
+static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
+static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+
+static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
+{
+	if(auxio_register) {
+		unsigned char regval;
+		unsigned long flags;
+		unsigned char newval;
+
+		spin_lock_irqsave(&auxio_lock, flags);
+
+		regval =  sbus_readb(auxio_register);
+		newval =  regval | bits_on;
+		newval &= ~bits_off;
+		newval &= ~AUXIO_AUX1_MASK;
+		sbus_writeb(newval, auxio_register);
+		
+		spin_unlock_irqrestore(&auxio_lock, flags);
+	}
+}
+
+static void __auxio_ebus_set(u8 bits_on, u8 bits_off)
+{
+	if(auxio_register) {
+		unsigned char regval;
+		unsigned long flags;
+		unsigned char newval;
+
+		spin_lock_irqsave(&auxio_lock, flags);
+
+		regval =  (u8)readl(auxio_register);
+		newval =  regval | bits_on;
+		newval &= ~bits_off;
+		writel((u32)newval, auxio_register);
+
+		spin_unlock_irqrestore(&auxio_lock, flags);
+	}
+}
+
+static inline void __auxio_ebus_set_led(int on)
+{
+	(on) ? __auxio_ebus_set(AUXIO_PCIO_LED, 0) :
+		__auxio_ebus_set(0, AUXIO_PCIO_LED) ;
+}
 
-/* Probe and map in the Auxiliary I/O register */
-unsigned long auxio_register = 0;
+static inline void __auxio_sbus_set_led(int on)
+{
+	(on) ? __auxio_sbus_set(AUXIO_AUX1_LED, 0) :
+		__auxio_sbus_set(0, AUXIO_AUX1_LED) ;
+}
+
+void auxio_set_led(int on)
+{
+	switch(auxio_devtype) {
+	case AUXIO_TYPE_SBUS:
+		__auxio_sbus_set_led(on);
+		break;
+	case AUXIO_TYPE_EBUS:
+		__auxio_ebus_set_led(on);
+		break;
+	default:
+		break;
+	}
+}
+
+static inline void __auxio_sbus_set_lte(int on)
+{
+	(on) ? __auxio_sbus_set(AUXIO_AUX1_LTE, 0) : 
+		__auxio_sbus_set(0, AUXIO_AUX1_LTE) ;
+}
+
+void auxio_set_lte(int on)
+{
+	switch(auxio_devtype) {
+	case AUXIO_TYPE_SBUS:
+		__auxio_sbus_set_lte(on);
+		break;
+	case AUXIO_TYPE_EBUS:
+		/* FALL-THROUGH */
+	default:
+		break;
+	}
+}
 
 void __init auxio_probe(void)
 {
@@ -37,11 +123,15 @@
         }
 
 found_sdev:
-	if (!sdev) {
+	if (sdev) {
+		auxio_devtype  = AUXIO_TYPE_SBUS;
+		auxio_register = sbus_ioremap(&sdev->resource[0], 0,
+		  		sdev->reg_addrs[0].reg_size, "auxiliaryIO");
+	}
 #ifdef CONFIG_PCI
+	else {
 		struct linux_ebus *ebus;
 		struct linux_ebus_device *edev = 0;
-		unsigned long led_auxio;
 
 		for_each_ebus(ebus) {
 			for_each_ebusdev(edev, ebus) {
@@ -50,19 +140,12 @@
 			}
 		}
 	ebus_done:
-
 		if (edev) {
-			led_auxio = edev->resource[0].start;
-			outl(0x01, led_auxio);
-			return;
+			auxio_devtype  = AUXIO_TYPE_EBUS;
+			auxio_register = (unsigned long)
+				ioremap(edev->resource[0].start, sizeof(u32));
 		}
-#endif
-		auxio_register = 0UL;
-		return;
 	}
-
-	/* Map the register both read and write */
-	auxio_register = sbus_ioremap(&sdev->resource[0], 0,
-				      sdev->reg_addrs[0].reg_size, "auxiliaryIO");
-	TURN_ON_LED;
+	auxio_set_led(AUXIO_LED_ON);
+#endif
 }
diff -urN linux-2.5.68-bk4/arch/sparc64/kernel/entry.S linux-2.5.68-bk5/arch/sparc64/kernel/entry.S
--- linux-2.5.68-bk4/arch/sparc64/kernel/entry.S	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc64/kernel/entry.S	2003-04-24 04:34:51.000000000 -0700
@@ -20,6 +20,7 @@
 #include <asm/processor.h>
 #include <asm/visasm.h>
 #include <asm/estate.h>
+#include <asm/auxio.h>
 
 /* #define SYSCALL_TRACING	1 */
 
@@ -662,9 +663,11 @@
 	sethi		%hi(auxio_register), %g1
 	ldx		[%g1 + %lo(auxio_register)], %g7
 	lduba		[%g7] ASI_PHYS_BYPASS_EC_E, %g5
-	or		%g5, 0xc2, %g5
+	or		%g5, AUXIO_AUX1_FTCNT, %g5
+/*	andn		%g5, AUXIO_AUX1_MASK, %g5 */
 	stba		%g5, [%g7] ASI_PHYS_BYPASS_EC_E
-	andn		%g5, 0x02, %g5
+	andn		%g5, AUXIO_AUX1_FTCNT, %g5
+/*	andn		%g5, AUXIO_AUX1_MASK, %g5 */
 
 	nop; nop;  nop; nop;  nop; nop;
 	nop; nop;  nop; nop;  nop; nop;
diff -urN linux-2.5.68-bk4/arch/sparc64/kernel/ioctl32.c linux-2.5.68-bk5/arch/sparc64/kernel/ioctl32.c
--- linux-2.5.68-bk4/arch/sparc64/kernel/ioctl32.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc64/kernel/ioctl32.c	2003-04-24 04:34:51.000000000 -0700
@@ -2109,7 +2109,7 @@
 	if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
 		return -EINVAL;
 	                                                
-	if (tty->driver.ioctl != vt_ioctl)
+	if (tty->driver->ioctl != vt_ioctl)
 		return -EINVAL;
 	
 	/*
diff -urN linux-2.5.68-bk4/arch/sparc64/kernel/power.c linux-2.5.68-bk5/arch/sparc64/kernel/power.c
--- linux-2.5.68-bk4/arch/sparc64/kernel/power.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc64/kernel/power.c	2003-04-24 04:34:51.000000000 -0700
@@ -14,14 +14,13 @@
 
 #include <asm/system.h>
 #include <asm/ebus.h>
+#include <asm/auxio.h>
 
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
 
 #ifdef CONFIG_PCI
 static unsigned long power_reg = 0UL;
-#define POWER_SYSTEM_OFF (1 << 0)
-#define POWER_COURTESY_OFF (1 << 1)
 
 static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
 static int button_pressed;
@@ -51,7 +50,7 @@
 			 * same effect, so until I figure out
 			 * what the difference is...
 			 */
-			writel(POWER_COURTESY_OFF | POWER_SYSTEM_OFF, power_reg);
+			writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
 		} else
 #endif /* CONFIG_PCI */
 			if (poweroff_method != NULL) {
diff -urN linux-2.5.68-bk4/arch/sparc64/kernel/sparc64_ksyms.c linux-2.5.68-bk5/arch/sparc64/kernel/sparc64_ksyms.c
--- linux-2.5.68-bk4/arch/sparc64/kernel/sparc64_ksyms.c	2003-04-19 19:50:41.000000000 -0700
+++ linux-2.5.68-bk5/arch/sparc64/kernel/sparc64_ksyms.c	2003-04-24 04:34:51.000000000 -0700
@@ -197,7 +197,8 @@
 EXPORT_SYMBOL(mstk48t02_regs);
 EXPORT_SYMBOL(request_fast_irq);
 #if CONFIG_SUN_AUXIO
-EXPORT_SYMBOL(auxio_register);
+EXPORT_SYMBOL(auxio_set_led);
+EXPORT_SYMBOL(auxio_set_lte);
 #endif
 #if CONFIG_SBUS
 EXPORT_SYMBOL(sbus_root);
diff -urN linux-2.5.68-bk4/arch/um/drivers/line.c linux-2.5.68-bk5/arch/um/drivers/line.c
--- linux-2.5.68-bk4/arch/um/drivers/line.c	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk5/arch/um/drivers/line.c	2003-04-24 04:34:51.000000000 -0700
@@ -109,7 +109,7 @@
 		buf = new;
 	}
 
-	i = minor(tty->device) - tty->driver.minor_start;
+	i = tty->index;
 	line = &lines[i];
 
 	down(&line->sem);
@@ -219,7 +219,7 @@
 	int n, err = 0;
 
 	if(tty == NULL) n = 0;
-	else n = minor(tty->device) - tty->driver.minor_start;
+	else n = tty->index;
 	line = &lines[n];
 
 	down(&line->sem);
@@ -267,7 +267,7 @@
 	int n;
 
 	if(tty == NULL) n = 0;
-	else n = minor(tty->device) - tty->driver.minor_start;
+	else n = tty->index;
 	line = &lines[n];
 
 	down(&line->sem);
@@ -444,7 +444,7 @@
 
 	for(i = 0; i < nlines; i++){
 		if(!lines[i].valid) 
-			tty_unregister_devfs(driver, driver->minor_start + i);
+			tty_unregister_devfs(driver, i);
 	}
 
 	mconsole_register_dev(&line_driver->mc);
diff -urN linux-2.5.68-bk4/arch/x86_64/Kconfig linux-2.5.68-bk5/arch/x86_64/Kconfig
--- linux-2.5.68-bk4/arch/x86_64/Kconfig	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk5/arch/x86_64/Kconfig	2003-04-24 04:34:51.000000000 -0700
@@ -286,7 +286,7 @@
 
 config SOFTWARE_SUSPEND
 	bool "Software Suspend (EXPERIMENTAL)"
-	depends on EXPERIMENTAL && PM
+	depends on EXPERIMENTAL && PM && SWAP
 	---help---
 	  Enable the possibilty of suspending the machine. It doesn't need APM.
 	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
diff -urN linux-2.5.68-bk4/arch/x86_64/ia32/ia32_ioctl.c linux-2.5.68-bk5/arch/x86_64/ia32/ia32_ioctl.c
--- linux-2.5.68-bk4/arch/x86_64/ia32/ia32_ioctl.c	2003-04-19 19:49:51.000000000 -0700
+++ linux-2.5.68-bk5/arch/x86_64/ia32/ia32_ioctl.c	2003-04-24 04:34:51.000000000 -0700
@@ -1987,7 +1987,7 @@
 	if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
 		return -EINVAL;
 	                                                
-	if (tty->driver.ioctl != vt_ioctl)
+	if (tty->driver->ioctl != vt_ioctl)
 		return -EINVAL;
 	
 	/*
@@ -2847,7 +2847,7 @@
 	real_tty = (struct tty_struct *)file->private_data;
 	if (!real_tty) 	
 		return -EINVAL; 
-	return put_user(kdev_t_to_nr(real_tty->device), ptr); 
+	return put_user(real_tty->device, ptr); 
 } 
 
 
diff -urN linux-2.5.68-bk4/drivers/acpi/dispatcher/dsfield.c linux-2.5.68-bk5/drivers/acpi/dispatcher/dsfield.c
--- linux-2.5.68-bk4/drivers/acpi/dispatcher/dsfield.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/dispatcher/dsfield.c	2003-04-24 04:34:51.000000000 -0700
@@ -249,9 +249,9 @@
 			 * In field_flags, preserve the flag bits other than the ACCESS_TYPE bits
 			 */
 			info->field_flags = (u8) ((info->field_flags & ~(AML_FIELD_ACCESS_TYPE_MASK)) |
-					  ((u8) (arg->common.value.integer32 >> 8)));
+					  ((u8) ((u32) arg->common.value.integer >> 8)));
 
-			info->attribute = (u8) (arg->common.value.integer32);
+			info->attribute = (u8) (arg->common.value.integer);
 			break;
 
 
@@ -356,7 +356,7 @@
 	/* Second arg is the field flags */
 
 	arg = arg->common.next;
-	info.field_flags = arg->common.value.integer8;
+	info.field_flags = (u8) arg->common.value.integer;
 	info.attribute = 0;
 
 	/* Each remaining arg is a Named Field */
@@ -509,12 +509,12 @@
 	/* Third arg is the bank_value */
 
 	arg = arg->common.next;
-	info.bank_value = arg->common.value.integer32;
+	info.bank_value = (u32) arg->common.value.integer;
 
 	/* Fourth arg is the field flags */
 
 	arg = arg->common.next;
-	info.field_flags = arg->common.value.integer8;
+	info.field_flags = (u8) arg->common.value.integer;
 
 	/* Each remaining arg is a Named Field */
 
@@ -580,7 +580,7 @@
 	/* Next arg is the field flags */
 
 	arg = arg->common.next;
-	info.field_flags = arg->common.value.integer8;
+	info.field_flags = (u8) arg->common.value.integer;
 
 	/* Each remaining arg is a Named Field */
 
diff -urN linux-2.5.68-bk4/drivers/acpi/dispatcher/dsmthdat.c linux-2.5.68-bk5/drivers/acpi/dispatcher/dsmthdat.c
--- linux-2.5.68-bk4/drivers/acpi/dispatcher/dsmthdat.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/dispatcher/dsmthdat.c	2003-04-24 04:34:51.000000000 -0700
@@ -87,8 +87,8 @@
 	/* Init the method arguments */
 
 	for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) {
-		ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->arguments[i].name,
-				 NAMEOF_ARG_NTE);
+		ACPI_MOVE_32_TO_32 (&walk_state->arguments[i].name,
+				   NAMEOF_ARG_NTE);
 		walk_state->arguments[i].name.integer |= (i << 24);
 		walk_state->arguments[i].descriptor   = ACPI_DESC_TYPE_NAMED;
 		walk_state->arguments[i].type         = ACPI_TYPE_ANY;
@@ -98,8 +98,8 @@
 	/* Init the method locals */
 
 	for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) {
-		ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->local_variables[i].name,
-				 NAMEOF_LOCAL_NTE);
+		ACPI_MOVE_32_TO_32 (&walk_state->local_variables[i].name,
+				   NAMEOF_LOCAL_NTE);
 
 		walk_state->local_variables[i].name.integer |= (i << 24);
 		walk_state->local_variables[i].descriptor  = ACPI_DESC_TYPE_NAMED;
diff -urN linux-2.5.68-bk4/drivers/acpi/dispatcher/dsobject.c linux-2.5.68-bk5/drivers/acpi/dispatcher/dsobject.c
--- linux-2.5.68-bk4/drivers/acpi/dispatcher/dsobject.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/dispatcher/dsobject.c	2003-04-24 04:34:51.000000000 -0700
@@ -187,7 +187,7 @@
 			return (AE_TYPE);
 		}
 
-		byte_list_length = byte_list->common.value.integer32;
+		byte_list_length = (u32) byte_list->common.value.integer;
 	}
 
 	/*
diff -urN linux-2.5.68-bk4/drivers/acpi/dispatcher/dswexec.c linux-2.5.68-bk5/drivers/acpi/dispatcher/dswexec.c
--- linux-2.5.68-bk4/drivers/acpi/dispatcher/dswexec.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/dispatcher/dswexec.c	2003-04-24 04:34:51.000000000 -0700
@@ -647,7 +647,7 @@
 		acpi_ds_delete_result_if_not_used (op, walk_state->result_obj, walk_state);
 	}
 
-#if _UNDER_DEVELOPMENT
+#ifdef _UNDER_DEVELOPMENT
 
 	if (walk_state->parser_state.aml == walk_state->parser_state.aml_end) {
 		acpi_db_method_end (walk_state);
diff -urN linux-2.5.68-bk4/drivers/acpi/events/evgpe.c linux-2.5.68-bk5/drivers/acpi/events/evgpe.c
--- linux-2.5.68-bk4/drivers/acpi/events/evgpe.c	2003-04-19 19:49:59.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/events/evgpe.c	2003-04-24 04:34:51.000000000 -0700
@@ -76,7 +76,7 @@
 	acpi_native_uint                i;
 
 
-	ACPI_FUNCTION_NAME ("ev_get_gpe_event_info");
+	ACPI_FUNCTION_ENTRY ();
 
 
 	/* A NULL gpe_block means use the FADT-defined GPE block(s) */
diff -urN linux-2.5.68-bk4/drivers/acpi/events/evgpeblk.c linux-2.5.68-bk5/drivers/acpi/events/evgpeblk.c
--- linux-2.5.68-bk4/drivers/acpi/events/evgpeblk.c	2003-04-19 19:49:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/events/evgpeblk.c	2003-04-24 04:34:51.000000000 -0700
@@ -71,7 +71,7 @@
 	struct acpi_gpe_block_info      *gpe_block;
 
 
-	ACPI_FUNCTION_NAME ("ev_valid_gpe_event");
+	ACPI_FUNCTION_ENTRY ();
 
 
 	/* No need for spin lock since we are not changing any list elements */
@@ -81,7 +81,7 @@
 		gpe_block = gpe_xrupt_block->gpe_block_list_head;
 		while (gpe_block) {
 			if ((&gpe_block->event_info[0] <= gpe_event_info) &&
-				(&gpe_block->event_info[gpe_block->register_count * 8] > gpe_event_info)) {
+				(&gpe_block->event_info[((acpi_size) gpe_block->register_count) * 8] > gpe_event_info)) {
 				return (TRUE);
 			}
 
@@ -186,13 +186,13 @@
 	acpi_status                     status;
 
 
-	ACPI_FUNCTION_NAME ("ev_save_method_info");
+	ACPI_FUNCTION_TRACE ("ev_save_method_info");
 
 
 	/* Extract the name from the object and convert to a string */
 
-	ACPI_MOVE_UNALIGNED32_TO_32 (name,
-			 &((struct acpi_namespace_node *) obj_handle)->name.integer);
+	ACPI_MOVE_32_TO_32 (name,
+			   &((struct acpi_namespace_node *) obj_handle)->name.integer);
 	name[ACPI_NAME_SIZE] = 0;
 
 	/*
@@ -213,7 +213,7 @@
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Unknown GPE method type: %s (name not of form _Lnn or _Enn)\n",
 			name));
-		return (AE_OK);
+		return_ACPI_STATUS (AE_OK);
 	}
 
 	/* Convert the last two characters of the name to the GPE Number */
@@ -225,7 +225,7 @@
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Could not extract GPE number from name: %s (name is not of form _Lnn or _Enn)\n",
 			name));
-		return (AE_OK);
+		return_ACPI_STATUS (AE_OK);
 	}
 
 	/* Ensure that we have a valid GPE number for this GPE block */
@@ -237,7 +237,7 @@
 		 * However, it may be valid for a different GPE block, since GPE0 and GPE1
 		 * methods both appear under \_GPE.
 		 */
-		return (AE_OK);
+		return_ACPI_STATUS (AE_OK);
 	}
 
 	/*
@@ -254,13 +254,13 @@
 	 */
 	status = acpi_hw_enable_gpe (gpe_event_info);
 	if (ACPI_FAILURE (status)) {
-		return (status);
+		return_ACPI_STATUS (status);
 	}
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 		"Registered GPE method %s as GPE number 0x%.2X\n",
 		name, gpe_number));
-	return (AE_OK);
+	return_ACPI_STATUS (AE_OK);
 }
 
 
@@ -279,7 +279,7 @@
  *
  ******************************************************************************/
 
-struct acpi_gpe_xrupt_info *
+static struct acpi_gpe_xrupt_info *
 acpi_ev_get_gpe_xrupt_block (
 	u32                             interrupt_level)
 {
@@ -288,12 +288,15 @@
 	acpi_status                     status;
 
 
+	ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block");
+
+
 	/* No need for spin lock since we are not changing any list elements here */
 
 	next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
 	while (next_gpe_xrupt) {
 		if (next_gpe_xrupt->interrupt_level == interrupt_level) {
-			return (next_gpe_xrupt);
+			return_PTR (next_gpe_xrupt);
 		}
 
 		next_gpe_xrupt = next_gpe_xrupt->next;
@@ -303,7 +306,7 @@
 
 	gpe_xrupt = ACPI_MEM_CALLOCATE (sizeof (struct acpi_gpe_xrupt_info));
 	if (!gpe_xrupt) {
-		return (NULL);
+		return_PTR (NULL);
 	}
 
 	gpe_xrupt->interrupt_level = interrupt_level;
@@ -330,9 +333,15 @@
 	if (interrupt_level != acpi_gbl_FADT->sci_int) {
 		status = acpi_os_install_interrupt_handler (interrupt_level,
 				 acpi_ev_gpe_xrupt_handler, gpe_xrupt);
+		if (ACPI_FAILURE (status)) {
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"Could not install GPE interrupt handler at level 0x%X\n",
+				interrupt_level));
+			return_PTR (NULL);
+		}
 	}
 
-	return (gpe_xrupt);
+	return_PTR (gpe_xrupt);
 }
 
 
@@ -349,7 +358,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+static acpi_status
 acpi_ev_delete_gpe_xrupt (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt)
 {
@@ -406,7 +415,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+static acpi_status
 acpi_ev_install_gpe_block (
 	struct acpi_gpe_block_info      *gpe_block,
 	u32                             interrupt_level)
@@ -535,7 +544,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+static acpi_status
 acpi_ev_create_gpe_info_blocks (
 	struct acpi_gpe_block_info      *gpe_block)
 {
diff -urN linux-2.5.68-bk4/drivers/acpi/events/evregion.c linux-2.5.68-bk5/drivers/acpi/events/evregion.c
--- linux-2.5.68-bk4/drivers/acpi/events/evregion.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/events/evregion.c	2003-04-24 04:34:51.000000000 -0700
@@ -315,9 +315,10 @@
 	handler = handler_desc->addr_handler.handler;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
-		"Addrhandler %p (%p), Address %8.8X%8.8X\n",
+		"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
 		&region_obj->region.addr_handler->addr_handler, handler,
-		ACPI_HIDWORD (address), ACPI_LODWORD (address)));
+		ACPI_HIDWORD (address), ACPI_LODWORD (address),
+		acpi_ut_get_region_name (region_obj->region.space_id)));
 
 	if (!(handler_desc->addr_handler.flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
 		/*
diff -urN linux-2.5.68-bk4/drivers/acpi/events/evxfregn.c linux-2.5.68-bk5/drivers/acpi/events/evxfregn.c
--- linux-2.5.68-bk4/drivers/acpi/events/evxfregn.c	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/events/evxfregn.c	2003-04-24 04:34:51.000000000 -0700
@@ -159,16 +159,14 @@
 		}
 	}
 
-	/*
-	 * If the caller hasn't specified a setup routine, use the default
-	 */
+	/* If the caller hasn't specified a setup routine, use the default */
+
 	if (!setup) {
 		setup = acpi_ev_default_region_setup;
 	}
 
-	/*
-	 * Check for an existing internal object
-	 */
+	/* Check for an existing internal object */
+
 	obj_desc = acpi_ns_get_attached_object (node);
 	if (obj_desc) {
 		/*
@@ -181,7 +179,7 @@
 		handler_obj = obj_desc->device.addr_handler;
 		while (handler_obj) {
 			/*
-			 * We have an Address handler, see if user requested this
+			 * Found an Address handler, see if user requested this
 			 * address space.
 			 */
 			if(handler_obj->addr_handler.space_id == space_id) {
@@ -189,9 +187,8 @@
 				goto unlock_and_exit;
 			}
 
-			/*
-			 * Move through the linked list of handlers
-			 */
+			/* Walk the linked list of handlers */
+
 			handler_obj = handler_obj->addr_handler.next;
 		}
 	}
@@ -232,10 +229,10 @@
 		acpi_ut_get_region_name (space_id), space_id, node->name.ascii, node, obj_desc));
 
 	/*
-	 * Now we can install the handler
+	 * Install the handler
 	 *
-	 * At this point we know that there is no existing handler.
-	 * So, we just allocate the object for the handler and link it
+	 * At this point there is no existing handler.
+	 * Just allocate the object for the handler and link it
 	 * into the list.
 	 */
 	handler_obj = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_ADDRESS_HANDLER);
@@ -254,15 +251,15 @@
 	handler_obj->addr_handler.setup     = setup;
 
 	/*
-	 * Now walk the namespace finding all of the regions this
+	 * Walk the namespace finding all of the regions this
 	 * handler will manage.
 	 *
-	 * We start at the device and search the branch toward
+	 * Start at the device and search the branch toward
 	 * the leaf nodes until either the leaf is encountered or
 	 * a device is detected that has an address handler of the
 	 * same type.
 	 *
-	 * In either case we back up and search down the remainder
+	 * In either case, back up and search down the remainder
 	 * of the branch
 	 */
 	status = acpi_ns_walk_namespace (ACPI_TYPE_ANY, device,
@@ -270,9 +267,8 @@
 			 acpi_ev_addr_handler_helper,
 			 handler_obj, NULL);
 
-	/*
-	 * Place this handler 1st on the list
-	 */
+	/* Place this handler 1st on the list */
+
 	handler_obj->common.reference_count =
 			 (u16) (handler_obj->common.reference_count +
 			 obj_desc->common.reference_count - 1);
@@ -289,12 +285,13 @@
  *
  * FUNCTION:    acpi_remove_address_space_handler
  *
- * PARAMETERS:  space_id        - The address space ID
+ * PARAMETERS:  Device          - Handle for the device
+ *              space_id        - The address space ID
  *              Handler         - Address of the handler
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Install a handler for accesses on an Operation Region
+ * DESCRIPTION: Remove a previously installed handler.
  *
  ******************************************************************************/
 
@@ -342,19 +339,16 @@
 		goto unlock_and_exit;
 	}
 
-	/*
-	 * find the address handler the user requested
-	 */
+	/* Find the address handler the user requested */
+
 	handler_obj = obj_desc->device.addr_handler;
 	last_obj_ptr = &obj_desc->device.addr_handler;
 	while (handler_obj) {
-		/*
-		 * We have a handler, see if user requested this one
-		 */
+		/* We have a handler, see if user requested this one */
+
 		if (handler_obj->addr_handler.space_id == space_id) {
-			/*
-			 * Got it, first dereference this in the Regions
-			 */
+			/* Matched space_id, first dereference this in the Regions */
+
 			ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
 				"Removing address handler %p(%p) for region %s on Device %p(%p)\n",
 				handler_obj, handler, acpi_ut_get_region_name (space_id),
@@ -375,46 +369,37 @@
 				acpi_ev_detach_region (region_obj, TRUE);
 
 				/*
-				 * Walk the list, since we took the first region and it
-				 * was removed from the list by the dissassociate call
-				 * we just get the first item on the list again
+				 * Walk the list: Just grab the head because the
+				 * detach_region removed the previous head.
 				 */
 				region_obj = handler_obj->addr_handler.region_list;
 
 			}
 
-			/*
-			 * Remove this Handler object from the list
-			 */
+			/* Remove this Handler object from the list */
+
 			*last_obj_ptr = handler_obj->addr_handler.next;
 
-			/*
-			 * Now we can delete the handler object
-			 */
-			acpi_ut_remove_reference (handler_obj);
-			acpi_ut_remove_reference (handler_obj);
+			/* Now we can delete the handler object */
 
+			acpi_ut_remove_reference (handler_obj);
 			goto unlock_and_exit;
 		}
 
-		/*
-		 * Move through the linked list of handlers
-		 */
+		/* Walk the linked list of handlers */
+
 		last_obj_ptr = &handler_obj->addr_handler.next;
 		handler_obj = handler_obj->addr_handler.next;
 	}
 
+	/* The handler does not exist */
 
-	/*
-	 * The handler does not exist
-	 */
 	ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
 		"Unable to remove address handler %p for %s(%X), dev_node %p, obj %p\n",
 		handler, acpi_ut_get_region_name (space_id), space_id, node, obj_desc));
 
 	status = AE_NOT_EXIST;
 
-
 unlock_and_exit:
 	(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
 	return_ACPI_STATUS (status);
diff -urN linux-2.5.68-bk4/drivers/acpi/executer/exfldio.c linux-2.5.68-bk5/drivers/acpi/executer/exfldio.c
--- linux-2.5.68-bk4/drivers/acpi/executer/exfldio.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/executer/exfldio.c	2003-04-24 04:34:51.000000000 -0700
@@ -568,9 +568,10 @@
  *
  * PARAMETERS:  Datum               - Where the Datum is returned
  *              Buffer              - Raw field buffer
+ *              buffer_length       - Entire length (used for big-endian only)
  *              byte_granularity    - 1/2/4/8 Granularity of the field
  *                                    (aka Datum Size)
- *              Offset              - Datum offset into the buffer
+ *              buffer_offset       - Datum offset into the buffer
  *
  * RETURN:      none
  *
@@ -580,35 +581,44 @@
  ******************************************************************************/
 
 void
-acpi_ex_get_buffer_datum(
+acpi_ex_get_buffer_datum (
 	acpi_integer                    *datum,
 	void                            *buffer,
+	u32                             buffer_length,
 	u32                             byte_granularity,
-	u32                             offset)
+	u32                             buffer_offset)
 {
+	u32                             index;
+
 
 	ACPI_FUNCTION_ENTRY ();
 
 
+	/* Get proper index into buffer (handles big/little endian) */
+
+	index = ACPI_BUFFER_INDEX (buffer_length, buffer_offset, byte_granularity);
+
+	/* Move the requested number of bytes */
+
 	switch (byte_granularity) {
 	case ACPI_FIELD_BYTE_GRANULARITY:
 
-		*datum = ((u8 *) buffer) [offset];
+		*datum = ((u8 *) buffer) [index];
 		break;
 
 	case ACPI_FIELD_WORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED16_TO_32 (datum, &(((u16 *) buffer) [offset]));
+		ACPI_MOVE_16_TO_64 (datum, &(((u16 *) buffer) [index]));
 		break;
 
 	case ACPI_FIELD_DWORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED32_TO_32 (datum, &(((u32 *) buffer) [offset]));
+		ACPI_MOVE_32_TO_64 (datum, &(((u32 *) buffer) [index]));
 		break;
 
 	case ACPI_FIELD_QWORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED64_TO_64 (datum, &(((u64 *) buffer) [offset]));
+		ACPI_MOVE_64_TO_64 (datum, &(((u64 *) buffer) [index]));
 		break;
 
 	default:
@@ -624,9 +634,10 @@
  *
  * PARAMETERS:  merged_datum        - Value to store
  *              Buffer              - Receiving buffer
+ *              buffer_length       - Entire length (used for big-endian only)
  *              byte_granularity    - 1/2/4/8 Granularity of the field
  *                                    (aka Datum Size)
- *              Offset              - Datum offset into the buffer
+ *              buffer_offset       - Datum offset into the buffer
  *
  * RETURN:      none
  *
@@ -639,32 +650,40 @@
 acpi_ex_set_buffer_datum (
 	acpi_integer                    merged_datum,
 	void                            *buffer,
+	u32                             buffer_length,
 	u32                             byte_granularity,
-	u32                             offset)
+	u32                             buffer_offset)
 {
+	u32                             index;
 
 	ACPI_FUNCTION_ENTRY ();
 
 
+	/* Get proper index into buffer (handles big/little endian) */
+
+	index = ACPI_BUFFER_INDEX (buffer_length, buffer_offset, byte_granularity);
+
+	/* Move the requested number of bytes */
+
 	switch (byte_granularity) {
 	case ACPI_FIELD_BYTE_GRANULARITY:
 
-		((u8 *) buffer) [offset] = (u8) merged_datum;
+		((u8 *) buffer) [index] = (u8) merged_datum;
 		break;
 
 	case ACPI_FIELD_WORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED16_TO_16 (&(((u16 *) buffer)[offset]), &merged_datum);
+		ACPI_MOVE_64_TO_16 (&(((u16 *) buffer)[index]), &merged_datum);
 		break;
 
 	case ACPI_FIELD_DWORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED32_TO_32 (&(((u32 *) buffer)[offset]), &merged_datum);
+		ACPI_MOVE_64_TO_32 (&(((u32 *) buffer)[index]), &merged_datum);
 		break;
 
 	case ACPI_FIELD_QWORD_GRANULARITY:
 
-		ACPI_MOVE_UNALIGNED64_TO_64 (&(((u64 *) buffer)[offset]), &merged_datum);
+		ACPI_MOVE_64_TO_64 (&(((u64 *) buffer)[index]), &merged_datum);
 		break;
 
 	default:
@@ -762,8 +781,8 @@
 
 		/* Store the datum to the caller buffer */
 
-		acpi_ex_set_buffer_datum (merged_datum, buffer, obj_desc->common_field.access_byte_width,
-				datum_offset);
+		acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
+				obj_desc->common_field.access_byte_width, datum_offset);
 
 		return_ACPI_STATUS (AE_OK);
 	}
@@ -835,7 +854,7 @@
 		 * Store the merged field datum in the caller's buffer, according to
 		 * the granularity of the field (size of each datum).
 		 */
-		acpi_ex_set_buffer_datum (merged_datum, buffer,
+		acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
 				obj_desc->common_field.access_byte_width, datum_offset);
 
 		/*
@@ -916,7 +935,7 @@
 
 	/* Get a single datum from the caller's buffer */
 
-	acpi_ex_get_buffer_datum (&previous_raw_datum, buffer,
+	acpi_ex_get_buffer_datum (&previous_raw_datum, buffer, buffer_length,
 			obj_desc->common_field.access_byte_width, datum_offset);
 
 	/*
@@ -979,7 +998,7 @@
 		 * Get the next raw buffer datum.  It may contain bits of the previous
 		 * field datum
 		 */
-		acpi_ex_get_buffer_datum (&this_raw_datum, buffer,
+		acpi_ex_get_buffer_datum (&this_raw_datum, buffer, buffer_length,
 				obj_desc->common_field.access_byte_width, datum_offset);
 
 		/* Create the field datum based on the field alignment */
diff -urN linux-2.5.68-bk4/drivers/acpi/executer/exregion.c linux-2.5.68-bk5/drivers/acpi/executer/exregion.c
--- linux-2.5.68-bk4/drivers/acpi/executer/exregion.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/executer/exregion.c	2003-04-24 04:34:51.000000000 -0700
@@ -83,7 +83,7 @@
 	struct acpi_mem_space_context   *mem_info = region_context;
 	u32                             length;
 	acpi_size                       window_size;
-#ifndef _HW_ALIGNMENT_SUPPORT
+#ifndef ACPI_MISALIGNED_TRANSFERS
 	u32                             remainder;
 #endif
 
@@ -116,7 +116,7 @@
 	}
 
 
-#ifndef _HW_ALIGNMENT_SUPPORT
+#ifndef ACPI_MISALIGNED_TRANSFERS
 	/*
 	 * Hardware does not support non-aligned data transfers, we must verify
 	 * the request.
@@ -283,6 +283,7 @@
 	void                            *region_context)
 {
 	acpi_status                     status = AE_OK;
+	u32                             value32;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_io_space_handler");
@@ -297,13 +298,13 @@
 	switch (function) {
 	case ACPI_READ:
 
-		*value = 0;
-		status = acpi_os_read_port ((acpi_io_address) address, value, bit_width);
+		status = acpi_os_read_port ((acpi_io_address) address, &value32, bit_width);
+		*value = value32;
 		break;
 
 	case ACPI_WRITE:
 
-		status = acpi_os_write_port ((acpi_io_address) address, *value, bit_width);
+		status = acpi_os_write_port ((acpi_io_address) address, (u32) *value, bit_width);
 		break;
 
 	default:
diff -urN linux-2.5.68-bk4/drivers/acpi/hardware/hwacpi.c linux-2.5.68-bk5/drivers/acpi/hardware/hwacpi.c
--- linux-2.5.68-bk4/drivers/acpi/hardware/hwacpi.c	2003-04-19 19:48:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/hardware/hwacpi.c	2003-04-24 04:34:51.000000000 -0700
@@ -141,7 +141,7 @@
 		/* BIOS should have disabled ALL fixed and GP events */
 
 		status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd,
-				  (acpi_integer) acpi_gbl_FADT->acpi_enable, 8);
+				  (u32) acpi_gbl_FADT->acpi_enable, 8);
 		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Attempting to enable ACPI mode\n"));
 		break;
 
@@ -152,7 +152,7 @@
 		 * enable bits to default
 		 */
 		status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd,
-				 (acpi_integer) acpi_gbl_FADT->acpi_disable, 8);
+				 (u32) acpi_gbl_FADT->acpi_disable, 8);
 		ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
 				 "Attempting to enable Legacy (non-ACPI) mode\n"));
 		break;
diff -urN linux-2.5.68-bk4/drivers/acpi/hardware/hwgpe.c linux-2.5.68-bk5/drivers/acpi/hardware/hwgpe.c
--- linux-2.5.68-bk4/drivers/acpi/hardware/hwgpe.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/hardware/hwgpe.c	2003-04-24 04:34:51.000000000 -0700
@@ -424,7 +424,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+static acpi_status
 acpi_hw_disable_non_wakeup_gpe_block (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt_info,
 	struct acpi_gpe_block_info      *gpe_block)
@@ -515,7 +515,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+static acpi_status
 acpi_hw_enable_non_wakeup_gpe_block (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt_info,
 	struct acpi_gpe_block_info      *gpe_block)
diff -urN linux-2.5.68-bk4/drivers/acpi/hardware/hwregs.c linux-2.5.68-bk5/drivers/acpi/hardware/hwregs.c
--- linux-2.5.68-bk4/drivers/acpi/hardware/hwregs.c	2003-04-19 19:50:43.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/hardware/hwregs.c	2003-04-24 04:34:51.000000000 -0700
@@ -654,7 +654,7 @@
 
 		/* SMI_CMD is currently always in IO space */
 
-		status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, (acpi_integer) value, 8);
+		status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, value, 8);
 		break;
 
 
@@ -812,7 +812,7 @@
 		mem_address = (reg->address
 				  + (acpi_physical_address) offset);
 
-		status = acpi_os_write_memory (mem_address, (acpi_integer) value, width);
+		status = acpi_os_write_memory (mem_address, value, width);
 		break;
 
 
@@ -821,7 +821,7 @@
 		io_address = (acpi_io_address) (reg->address
 				   + (acpi_physical_address) offset);
 
-		status = acpi_os_write_port (io_address, (acpi_integer) value, width);
+		status = acpi_os_write_port (io_address, value, width);
 		break;
 
 
diff -urN linux-2.5.68-bk4/drivers/acpi/hardware/hwsleep.c linux-2.5.68-bk5/drivers/acpi/hardware/hwsleep.c
--- linux-2.5.68-bk4/drivers/acpi/hardware/hwsleep.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/hardware/hwsleep.c	2003-04-24 04:34:51.000000000 -0700
@@ -226,7 +226,7 @@
 
 	/* Clear wake status */
 
-	status = acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_LOCK);
+	status = acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
@@ -238,7 +238,7 @@
 
 	/* Disable BM arbitration */
 
-	status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_LOCK);
+	status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_DO_NOT_LOCK);
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
@@ -327,11 +327,6 @@
 
 	} while (!in_value);
 
-	status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
-
 	return_ACPI_STATUS (AE_OK);
 }
 
@@ -366,7 +361,7 @@
 
 	ACPI_FLUSH_CPU_CACHE();
 
-	status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, (acpi_integer) acpi_gbl_FADT->S4bios_req, 8);
+	status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, (u32) acpi_gbl_FADT->S4bios_req, 8);
 
 	do {
 		acpi_os_stall(1000);
diff -urN linux-2.5.68-bk4/drivers/acpi/namespace/nsaccess.c linux-2.5.68-bk5/drivers/acpi/namespace/nsaccess.c
--- linux-2.5.68-bk4/drivers/acpi/namespace/nsaccess.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/namespace/nsaccess.c	2003-04-24 04:34:51.000000000 -0700
@@ -527,7 +527,7 @@
 
 		/* Extract one ACPI name from the front of the pathname */
 
-		ACPI_MOVE_UNALIGNED32_TO_32 (&simple_name, path);
+		ACPI_MOVE_32_TO_32 (&simple_name, path);
 
 		/* Try to find the single (4 character) ACPI name */
 
diff -urN linux-2.5.68-bk4/drivers/acpi/namespace/nsnames.c linux-2.5.68-bk5/drivers/acpi/namespace/nsnames.c
--- linux-2.5.68-bk4/drivers/acpi/namespace/nsnames.c	2003-04-19 19:51:21.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/namespace/nsnames.c	2003-04-24 04:34:51.000000000 -0700
@@ -98,7 +98,7 @@
 
 		/* Put the name into the buffer */
 
-		ACPI_MOVE_UNALIGNED32_TO_32 ((name_buffer + index), &parent_node->name);
+		ACPI_MOVE_32_TO_32 ((name_buffer + index), &parent_node->name);
 		parent_node = acpi_ns_get_parent_node (parent_node);
 
 		/* Prefix name with the path separator */
diff -urN linux-2.5.68-bk4/drivers/acpi/namespace/nsutils.c linux-2.5.68-bk5/drivers/acpi/namespace/nsutils.c
--- linux-2.5.68-bk4/drivers/acpi/namespace/nsutils.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/namespace/nsutils.c	2003-04-24 04:34:51.000000000 -0700
@@ -76,31 +76,38 @@
 	acpi_status                     lookup_status)
 {
 	acpi_status                     status;
-	char                            *name;
+	char                            *name = NULL;
 
 
-	/* Convert path to external format */
-
-	status = acpi_ns_externalize_name (ACPI_UINT32_MAX, internal_name, NULL, &name);
-
 	acpi_os_printf ("%8s-%04d: *** Error: Looking up ",
 		module_name, line_number);
 
-	/* Print target name */
+	if (lookup_status == AE_BAD_CHARACTER) {
+		/* There is a non-ascii character in the name */
 
-	if (ACPI_SUCCESS (status)) {
-		acpi_os_printf ("[%s]", name);
+		acpi_os_printf ("[0x%4.4X] (NON-ASCII)\n", *(ACPI_CAST_PTR (u32, internal_name)));
 	}
 	else {
-		acpi_os_printf ("[COULD NOT EXTERNALIZE NAME]");
+		/* Convert path to external format */
+
+		status = acpi_ns_externalize_name (ACPI_UINT32_MAX, internal_name, NULL, &name);
+
+		/* Print target name */
+
+		if (ACPI_SUCCESS (status)) {
+			acpi_os_printf ("[%s]", name);
+		}
+		else {
+			acpi_os_printf ("[COULD NOT EXTERNALIZE NAME]");
+		}
+
+		if (name) {
+			ACPI_MEM_FREE (name);
+		}
 	}
 
 	acpi_os_printf (" in namespace, %s\n",
 		acpi_format_exception (lookup_status));
-
-	if (name) {
-		ACPI_MEM_FREE (name);
-	}
 }
 
 
@@ -609,7 +616,7 @@
 			/* <count> 4-byte names */
 
 			names_index = prefix_length + 2;
-			num_segments = (u32) (u8) internal_name[(acpi_native_uint) (prefix_length + 1)];
+			num_segments = (acpi_native_uint) (u8) internal_name[(acpi_native_uint) (prefix_length + 1)];
 			break;
 
 		case AML_DUAL_NAME_PREFIX:
diff -urN linux-2.5.68-bk4/drivers/acpi/namespace/nsxfeval.c linux-2.5.68-bk5/drivers/acpi/namespace/nsxfeval.c
--- linux-2.5.68-bk4/drivers/acpi/namespace/nsxfeval.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/namespace/nsxfeval.c	2003-04-24 04:34:51.000000000 -0700
@@ -524,8 +524,8 @@
  *
  * DESCRIPTION: Performs a modified depth-first walk of the namespace tree,
  *              starting (and ending) at the object specified by start_handle.
- *              The user_function is called whenever an object that matches
- *              the type parameter is found.  If the user function returns
+ *              The user_function is called whenever an object of type
+ *              Device is found.  If the user function returns
  *              a non-zero value, the search is terminated immediately and this
  *              value is returned to the caller.
  *
diff -urN linux-2.5.68-bk4/drivers/acpi/osl.c linux-2.5.68-bk5/drivers/acpi/osl.c
--- linux-2.5.68-bk4/drivers/acpi/osl.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/osl.c	2003-04-24 04:34:51.000000000 -0700
@@ -237,9 +237,7 @@
 static irqreturn_t
 acpi_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
-	(*acpi_irq_handler)(acpi_irq_context);
-	/* FIXME!! We really should check that the irq was really ours! */
-	return IRQ_HANDLED;
+	return (*acpi_irq_handler)(acpi_irq_context);
 }
 
 acpi_status
@@ -305,7 +303,7 @@
 acpi_status
 acpi_os_read_port(
 	acpi_io_address	port,
-	void		*value,
+	u32		*value,
 	u32		width)
 {
 	u32 dummy;
@@ -334,7 +332,7 @@
 acpi_status
 acpi_os_write_port(
 	acpi_io_address	port,
-	acpi_integer	value,
+	u32		value,
 	u32		width)
 {
 	switch (width)
@@ -358,7 +356,7 @@
 acpi_status
 acpi_os_read_memory(
 	acpi_physical_address	phys_addr,
-	void			*value,
+	u32			*value,
 	u32			width)
 {
 	u32			dummy;
@@ -404,7 +402,7 @@
 acpi_status
 acpi_os_write_memory(
 	acpi_physical_address	phys_addr,
-	acpi_integer		value,
+	u32			value,
 	u32			width)
 {
 	void			*virt_addr;
diff -urN linux-2.5.68-bk4/drivers/acpi/parser/psargs.c linux-2.5.68-bk5/drivers/acpi/parser/psargs.c
--- linux-2.5.68-bk4/drivers/acpi/parser/psargs.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/parser/psargs.c	2003-04-24 04:34:51.000000000 -0700
@@ -412,7 +412,7 @@
 
 		/* Get 2 bytes from the AML stream */
 
-		ACPI_MOVE_UNALIGNED16_TO_32 (&arg->common.value.integer, parser_state->aml);
+		ACPI_MOVE_16_TO_32 (&arg->common.value.integer, parser_state->aml);
 		parser_state->aml += 2;
 		break;
 
@@ -423,7 +423,7 @@
 
 		/* Get 4 bytes from the AML stream */
 
-		ACPI_MOVE_UNALIGNED32_TO_32 (&arg->common.value.integer, parser_state->aml);
+		ACPI_MOVE_32_TO_32 (&arg->common.value.integer, parser_state->aml);
 		parser_state->aml += 4;
 		break;
 
@@ -434,7 +434,7 @@
 
 		/* Get 8 bytes from the AML stream */
 
-		ACPI_MOVE_UNALIGNED64_TO_64 (&arg->common.value.integer, parser_state->aml);
+		ACPI_MOVE_64_TO_64 (&arg->common.value.integer, parser_state->aml);
 		parser_state->aml += 8;
 		break;
 
@@ -533,7 +533,7 @@
 
 		/* Get the 4-character name */
 
-		ACPI_MOVE_UNALIGNED32_TO_32 (&name, parser_state->aml);
+		ACPI_MOVE_32_TO_32 (&name, parser_state->aml);
 		acpi_ps_set_name (field, name);
 		parser_state->aml += ACPI_NAME_SIZE;
 
@@ -557,9 +557,9 @@
 		 * Get access_type and access_attrib and merge into the field Op
 		 * access_type is first operand, access_attribute is second
 		 */
-		field->common.value.integer32 = (ACPI_GET8 (parser_state->aml) << 8);
+		field->common.value.integer = (ACPI_GET8 (parser_state->aml) << 8);
 		parser_state->aml++;
-		field->common.value.integer32 |= ACPI_GET8 (parser_state->aml);
+		field->common.value.integer |= ACPI_GET8 (parser_state->aml);
 		parser_state->aml++;
 		break;
 
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsaddr.c linux-2.5.68-bk5/drivers/acpi/resources/rsaddr.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsaddr.c	2003-04-19 19:49:52.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsaddr.c	2003-04-24 04:34:51.000000000 -0700
@@ -92,7 +92,7 @@
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	*bytes_consumed = temp16 + 3;
 	output_struct->id = ACPI_RSTYPE_ADDRESS16;
@@ -162,36 +162,31 @@
 	 * Get Granularity (Bytes 6-7)
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&output_struct->data.address16.granularity,
-			 buffer);
+	ACPI_MOVE_16_TO_32 (&output_struct->data.address16.granularity, buffer);
 
 	/*
 	 * Get min_address_range (Bytes 8-9)
 	 */
 	buffer += 2;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&output_struct->data.address16.min_address_range,
-			 buffer);
+	ACPI_MOVE_16_TO_32 (&output_struct->data.address16.min_address_range, buffer);
 
 	/*
 	 * Get max_address_range (Bytes 10-11)
 	 */
 	buffer += 2;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&output_struct->data.address16.max_address_range,
-			 buffer);
+	ACPI_MOVE_16_TO_32 (&output_struct->data.address16.max_address_range, buffer);
 
 	/*
 	 * Get address_translation_offset (Bytes 12-13)
 	 */
 	buffer += 2;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&output_struct->data.address16.address_translation_offset,
-			 buffer);
+	ACPI_MOVE_16_TO_32 (&output_struct->data.address16.address_translation_offset, buffer);
 
 	/*
 	 * Get address_length (Bytes 14-15)
 	 */
 	buffer += 2;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&output_struct->data.address16.address_length,
-			 buffer);
+	ACPI_MOVE_16_TO_32 (&output_struct->data.address16.address_length, buffer);
 
 	/*
 	 * Resource Source Index (if present)
@@ -360,36 +355,31 @@
 	/*
 	 * Set the address space granularity
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer,
-			   &linked_list->data.address16.granularity);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.address16.granularity);
 	buffer += 2;
 
 	/*
 	 * Set the address range minimum
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer,
-			   &linked_list->data.address16.min_address_range);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.address16.min_address_range);
 	buffer += 2;
 
 	/*
 	 * Set the address range maximum
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer,
-			   &linked_list->data.address16.max_address_range);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.address16.max_address_range);
 	buffer += 2;
 
 	/*
 	 * Set the address translation offset
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer,
-			   &linked_list->data.address16.address_translation_offset);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.address16.address_translation_offset);
 	buffer += 2;
 
 	/*
 	 * Set the address length
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer,
-			   &linked_list->data.address16.address_length);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.address16.address_length);
 	buffer += 2;
 
 	/*
@@ -413,7 +403,7 @@
 		 * Buffer needs to be set to the length of the sting + one for the
 		 *  terminating null
 		 */
-		buffer += (ACPI_STRLEN (linked_list->data.address16.resource_source.string_ptr) + 1);
+		buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address16.resource_source.string_ptr) + 1);
 	}
 
 	/*
@@ -427,7 +417,7 @@
 	 * minus the header size (3 bytes)
 	 */
 	actual_bytes -= 3;
-	ACPI_MOVE_UNALIGNED16_TO_16 (length_field, &actual_bytes);
+	ACPI_MOVE_SIZE_TO_16 (length_field, &actual_bytes);
 	return_ACPI_STATUS (AE_OK);
 }
 
@@ -479,7 +469,7 @@
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	*bytes_consumed = temp16 + 3;
 
 	output_struct->id = ACPI_RSTYPE_ADDRESS32;
@@ -553,36 +543,31 @@
 	 * Get Granularity (Bytes 6-9)
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.address32.granularity,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.address32.granularity, buffer);
 
 	/*
 	 * Get min_address_range (Bytes 10-13)
 	 */
 	buffer += 4;
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.address32.min_address_range,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.address32.min_address_range, buffer);
 
 	/*
 	 * Get max_address_range (Bytes 14-17)
 	 */
 	buffer += 4;
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.address32.max_address_range,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.address32.max_address_range, buffer);
 
 	/*
 	 * Get address_translation_offset (Bytes 18-21)
 	 */
 	buffer += 4;
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.address32.address_translation_offset,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.address32.address_translation_offset, buffer);
 
 	/*
 	 * Get address_length (Bytes 22-25)
 	 */
 	buffer += 4;
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.address32.address_length,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.address32.address_length, buffer);
 
 	/*
 	 * Resource Source Index (if present)
@@ -749,36 +734,31 @@
 	/*
 	 * Set the address space granularity
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
-			  &linked_list->data.address32.granularity);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.granularity);
 	buffer += 4;
 
 	/*
 	 * Set the address range minimum
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
-			  &linked_list->data.address32.min_address_range);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.min_address_range);
 	buffer += 4;
 
 	/*
 	 * Set the address range maximum
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
-			  &linked_list->data.address32.max_address_range);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.max_address_range);
 	buffer += 4;
 
 	/*
 	 * Set the address translation offset
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
-			  &linked_list->data.address32.address_translation_offset);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.address_translation_offset);
 	buffer += 4;
 
 	/*
 	 * Set the address length
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
-			  &linked_list->data.address32.address_length);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.address_length);
 	buffer += 4;
 
 	/*
@@ -802,7 +782,7 @@
 		 * Buffer needs to be set to the length of the sting + one for the
 		 *  terminating null
 		 */
-		buffer += (ACPI_STRLEN (linked_list->data.address32.resource_source.string_ptr) + 1);
+		buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address32.resource_source.string_ptr) + 1);
 	}
 
 	/*
@@ -866,7 +846,7 @@
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	*bytes_consumed = temp16 + 3;
 	output_struct->id = ACPI_RSTYPE_ADDRESS64;
@@ -941,36 +921,31 @@
 	 * Get Granularity (Bytes 6-13)
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED64_TO_64 (&output_struct->data.address64.granularity,
-			 buffer);
+	ACPI_MOVE_64_TO_64 (&output_struct->data.address64.granularity, buffer);
 
 	/*
 	 * Get min_address_range (Bytes 14-21)
 	 */
 	buffer += 8;
-	ACPI_MOVE_UNALIGNED64_TO_64 (&output_struct->data.address64.min_address_range,
-			 buffer);
+	ACPI_MOVE_64_TO_64 (&output_struct->data.address64.min_address_range, buffer);
 
 	/*
 	 * Get max_address_range (Bytes 22-29)
 	 */
 	buffer += 8;
-	ACPI_MOVE_UNALIGNED64_TO_64 (&output_struct->data.address64.max_address_range,
-			 buffer);
+	ACPI_MOVE_64_TO_64 (&output_struct->data.address64.max_address_range, buffer);
 
 	/*
 	 * Get address_translation_offset (Bytes 30-37)
 	 */
 	buffer += 8;
-	ACPI_MOVE_UNALIGNED64_TO_64 (&output_struct->data.address64.address_translation_offset,
-			 buffer);
+	ACPI_MOVE_64_TO_64 (&output_struct->data.address64.address_translation_offset, buffer);
 
 	/*
 	 * Get address_length (Bytes 38-45)
 	 */
 	buffer += 8;
-	ACPI_MOVE_UNALIGNED64_TO_64 (&output_struct->data.address64.address_length,
-			 buffer);
+	ACPI_MOVE_64_TO_64 (&output_struct->data.address64.address_length, buffer);
 
 	/*
 	 * Resource Source Index (if present)
@@ -1141,36 +1116,31 @@
 	/*
 	 * Set the address space granularity
 	 */
-	ACPI_MOVE_UNALIGNED64_TO_64 (buffer,
-			   &linked_list->data.address64.granularity);
+	ACPI_MOVE_64_TO_64 (buffer, &linked_list->data.address64.granularity);
 	buffer += 8;
 
 	/*
 	 * Set the address range minimum
 	 */
-	ACPI_MOVE_UNALIGNED64_TO_64 (buffer,
-			   &linked_list->data.address64.min_address_range);
+	ACPI_MOVE_64_TO_64 (buffer, &linked_list->data.address64.min_address_range);
 	buffer += 8;
 
 	/*
 	 * Set the address range maximum
 	 */
-	ACPI_MOVE_UNALIGNED64_TO_64 (buffer,
-			   &linked_list->data.address64.max_address_range);
+	ACPI_MOVE_64_TO_64 (buffer, &linked_list->data.address64.max_address_range);
 	buffer += 8;
 
 	/*
 	 * Set the address translation offset
 	 */
-	ACPI_MOVE_UNALIGNED64_TO_64 (buffer,
-			   &linked_list->data.address64.address_translation_offset);
+	ACPI_MOVE_64_TO_64 (buffer, &linked_list->data.address64.address_translation_offset);
 	buffer += 8;
 
 	/*
 	 * Set the address length
 	 */
-	ACPI_MOVE_UNALIGNED64_TO_64 (buffer,
-			   &linked_list->data.address64.address_length);
+	ACPI_MOVE_64_TO_64 (buffer, &linked_list->data.address64.address_length);
 	buffer += 8;
 
 	/*
@@ -1193,7 +1163,7 @@
 		 * Buffer needs to be set to the length of the sting + one for the
 		 *  terminating null
 		 */
-		buffer += (ACPI_STRLEN (linked_list->data.address64.resource_source.string_ptr) + 1);
+		buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address64.resource_source.string_ptr) + 1);
 	}
 
 	/*
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rscalc.c linux-2.5.68-bk5/drivers/acpi/resources/rscalc.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rscalc.c	2003-04-19 19:49:52.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rscalc.c	2003-04-24 04:34:51.000000000 -0700
@@ -349,7 +349,7 @@
 			buffer = byte_stream_buffer;
 			++buffer;
 
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 			bytes_consumed = temp16 + 3;
 
 			/*
@@ -390,7 +390,7 @@
 			buffer = byte_stream_buffer;
 
 			++buffer;
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 			bytes_consumed = temp16 + 3;
 
@@ -428,7 +428,7 @@
 			buffer = byte_stream_buffer;
 
 			++buffer;
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 			bytes_consumed = temp16 + 3;
 
@@ -466,7 +466,7 @@
 			buffer = byte_stream_buffer;
 
 			++buffer;
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 			bytes_consumed = temp16 + 3;
 
@@ -504,7 +504,7 @@
 			buffer = byte_stream_buffer;
 
 			++buffer;
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 			bytes_consumed = temp16 + 3;
 
@@ -573,7 +573,7 @@
 			/*
 			 * Look at the number of bits set
 			 */
-			ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+			ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 			for (index = 0; index < 16; index++) {
 				if (temp16 & 0x1) {
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsio.c linux-2.5.68-bk5/drivers/acpi/resources/rsio.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsio.c	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsio.c	2003-04-24 04:34:51.000000000 -0700
@@ -106,7 +106,7 @@
 	 * Check min_base Address
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	output_struct->data.io.min_base_address = temp16;
 
@@ -114,7 +114,7 @@
 	 * Check max_base Address
 	 */
 	buffer += 2;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	output_struct->data.io.max_base_address = temp16;
 
@@ -196,7 +196,7 @@
 	 * Check Range Base Address
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	output_struct->data.fixed_io.base_address = temp16;
 
@@ -270,7 +270,7 @@
 	 */
 	temp16 = (u16) linked_list->data.io.min_base_address;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -278,7 +278,7 @@
 	 */
 	temp16 = (u16) linked_list->data.io.max_base_address;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -347,7 +347,7 @@
 	 */
 	temp16 = (u16) linked_list->data.fixed_io.base_address;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsirq.c linux-2.5.68-bk5/drivers/acpi/resources/rsirq.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsirq.c	2003-04-19 19:51:16.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsirq.c	2003-04-24 04:34:51.000000000 -0700
@@ -101,7 +101,7 @@
 	 * Point to the 16-bits of Bytes 1 and 2
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	output_struct->data.irq.number_of_interrupts = 0;
 
@@ -242,7 +242,7 @@
 		temp16 |= 0x1 << temp8;
 	}
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -317,7 +317,7 @@
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	*bytes_consumed = temp16 + 3;
 	output_struct->id = ACPI_RSTYPE_EXT_IRQ;
@@ -374,7 +374,7 @@
 	 * Cycle through every IRQ in the table
 	 */
 	for (index = 0; index < temp8; index++) {
-		ACPI_MOVE_UNALIGNED32_TO_32 (
+		ACPI_MOVE_32_TO_32 (
 			&output_struct->data.extended_irq.interrupts[index], buffer);
 
 		/* Point to the next IRQ */
@@ -533,7 +533,7 @@
 
 	for (index = 0; index < linked_list->data.extended_irq.number_of_interrupts;
 		 index++) {
-		ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
+		ACPI_MOVE_32_TO_32 (buffer,
 				  &linked_list->data.extended_irq.interrupts[index]);
 		buffer += 4;
 	}
@@ -557,7 +557,7 @@
 		 * Buffer needs to be set to the length of the sting + one for the
 		 * terminating null
 		 */
-		buffer += (ACPI_STRLEN (linked_list->data.extended_irq.resource_source.string_ptr) + 1);
+		buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.extended_irq.resource_source.string_ptr) + 1);
 	}
 
 	/*
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsmemory.c linux-2.5.68-bk5/drivers/acpi/resources/rsmemory.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsmemory.c	2003-04-19 19:50:40.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsmemory.c	2003-04-24 04:34:51.000000000 -0700
@@ -92,7 +92,7 @@
 	 */
 	buffer += 1;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	buffer += 2;
 	*bytes_consumed = (acpi_size) temp16 + 3;
 	output_struct->id = ACPI_RSTYPE_MEM24;
@@ -107,28 +107,28 @@
 	/*
 	 * Get min_base_address (Bytes 4-5)
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	buffer += 2;
 	output_struct->data.memory24.min_base_address = temp16;
 
 	/*
 	 * Get max_base_address (Bytes 6-7)
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	buffer += 2;
 	output_struct->data.memory24.max_base_address = temp16;
 
 	/*
 	 * Get Alignment (Bytes 8-9)
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	buffer += 2;
 	output_struct->data.memory24.alignment = temp16;
 
 	/*
 	 * Get range_length (Bytes 10-11)
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	output_struct->data.memory24.range_length = temp16;
 
 	/*
@@ -184,7 +184,7 @@
 	 * The length field is static
 	 */
 	temp16 = 0x09;
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -197,25 +197,25 @@
 	/*
 	 * Set the Range minimum base address
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &linked_list->data.memory24.min_base_address);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.memory24.min_base_address);
 	buffer += 2;
 
 	/*
 	 * Set the Range maximum base address
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &linked_list->data.memory24.max_base_address);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.memory24.max_base_address);
 	buffer += 2;
 
 	/*
 	 * Set the base alignment
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &linked_list->data.memory24.alignment);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.memory24.alignment);
 	buffer += 2;
 
 	/*
 	 * Set the range length
 	 */
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &linked_list->data.memory24.range_length);
+	ACPI_MOVE_32_TO_16 (buffer, &linked_list->data.memory24.range_length);
 	buffer += 2;
 
 	/*
@@ -269,7 +269,7 @@
 	 */
 	buffer += 1;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 	buffer += 2;
 	*bytes_consumed = (acpi_size) temp16 + 3;
 
@@ -296,27 +296,25 @@
 	/*
 	 * Get min_base_address (Bytes 4-7)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.memory32.min_base_address,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.memory32.min_base_address, buffer);
 	buffer += 4;
 
 	/*
 	 * Get max_base_address (Bytes 8-11)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.memory32.max_base_address,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.memory32.max_base_address, buffer);
 	buffer += 4;
 
 	/*
 	 * Get Alignment (Bytes 12-15)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.memory32.alignment, buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.memory32.alignment, buffer);
 	buffer += 4;
 
 	/*
 	 * Get range_length (Bytes 16-19)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.memory32.range_length, buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.memory32.range_length, buffer);
 
 	/*
 	 * Set the Length parameter
@@ -373,7 +371,7 @@
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
 	buffer += 1;
-	ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+	ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 	buffer += 2;
 	*bytes_consumed = (acpi_size) temp16 + 3;
@@ -390,15 +388,13 @@
 	/*
 	 * Get range_base_address (Bytes 4-7)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.fixed_memory32.range_base_address,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.fixed_memory32.range_base_address, buffer);
 	buffer += 4;
 
 	/*
 	 * Get range_length (Bytes 8-11)
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (&output_struct->data.fixed_memory32.range_length,
-			 buffer);
+	ACPI_MOVE_32_TO_32 (&output_struct->data.fixed_memory32.range_length, buffer);
 
 	/*
 	 * Set the Length parameter
@@ -454,7 +450,7 @@
 	 */
 	temp16 = 0x11;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -467,25 +463,25 @@
 	/*
 	 * Set the Range minimum base address
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer, &linked_list->data.memory32.min_base_address);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.memory32.min_base_address);
 	buffer += 4;
 
 	/*
 	 * Set the Range maximum base address
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer, &linked_list->data.memory32.max_base_address);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.memory32.max_base_address);
 	buffer += 4;
 
 	/*
 	 * Set the base alignment
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer, &linked_list->data.memory32.alignment);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.memory32.alignment);
 	buffer += 4;
 
 	/*
 	 * Set the range length
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer, &linked_list->data.memory32.range_length);
+	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.memory32.range_length);
 	buffer += 4;
 
 	/*
@@ -537,7 +533,7 @@
 	 */
 	temp16 = 0x09;
 
-	ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+	ACPI_MOVE_16_TO_16 (buffer, &temp16);
 	buffer += 2;
 
 	/*
@@ -550,14 +546,14 @@
 	/*
 	 * Set the Range base address
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
+	ACPI_MOVE_32_TO_32 (buffer,
 			 &linked_list->data.fixed_memory32.range_base_address);
 	buffer += 4;
 
 	/*
 	 * Set the range length
 	 */
-	ACPI_MOVE_UNALIGNED32_TO_32 (buffer,
+	ACPI_MOVE_32_TO_32 (buffer,
 			 &linked_list->data.fixed_memory32.range_length);
 	buffer += 4;
 
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsmisc.c linux-2.5.68-bk5/drivers/acpi/resources/rsmisc.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsmisc.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsmisc.c	2003-04-24 04:34:51.000000000 -0700
@@ -211,7 +211,7 @@
 
 		/* Dereference */
 
-		ACPI_MOVE_UNALIGNED16_TO_16 (&temp16, buffer);
+		ACPI_MOVE_16_TO_16 (&temp16, buffer);
 
 		/* Calculate bytes consumed */
 
@@ -307,7 +307,7 @@
 
 		temp16 = (u16) linked_list->data.vendor_specific.length;
 
-		ACPI_MOVE_UNALIGNED16_TO_16 (buffer, &temp16);
+		ACPI_MOVE_16_TO_16 (buffer, &temp16);
 		buffer += 2;
 	}
 	else {
diff -urN linux-2.5.68-bk4/drivers/acpi/resources/rsxface.c linux-2.5.68-bk5/drivers/acpi/resources/rsxface.c
--- linux-2.5.68-bk4/drivers/acpi/resources/rsxface.c	2003-04-19 19:50:10.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/resources/rsxface.c	2003-04-24 04:34:51.000000000 -0700
@@ -339,20 +339,20 @@
 }
 
 
-#define COPY_FIELD(out, in, field)  out->field = in->field
-#define COPY_ADDRESS(out, in)                      \
-	COPY_FIELD(out, in, resource_type);             \
-	COPY_FIELD(out, in, producer_consumer);         \
-	COPY_FIELD(out, in, decode);                    \
-	COPY_FIELD(out, in, min_address_fixed);         \
-	COPY_FIELD(out, in, max_address_fixed);         \
-	COPY_FIELD(out, in, attribute);                 \
-	COPY_FIELD(out, in, granularity);               \
-	COPY_FIELD(out, in, min_address_range);         \
-	COPY_FIELD(out, in, max_address_range);         \
-	COPY_FIELD(out, in, address_translation_offset); \
-	COPY_FIELD(out, in, address_length);            \
-	COPY_FIELD(out, in, resource_source);
+#define ACPI_COPY_FIELD(out, in, field)  ((out)->field = (in)->field)
+#define ACPI_COPY_ADDRESS(out, in)                      \
+	ACPI_COPY_FIELD(out, in, resource_type);             \
+	ACPI_COPY_FIELD(out, in, producer_consumer);         \
+	ACPI_COPY_FIELD(out, in, decode);                    \
+	ACPI_COPY_FIELD(out, in, min_address_fixed);         \
+	ACPI_COPY_FIELD(out, in, max_address_fixed);         \
+	ACPI_COPY_FIELD(out, in, attribute);                 \
+	ACPI_COPY_FIELD(out, in, granularity);               \
+	ACPI_COPY_FIELD(out, in, min_address_range);         \
+	ACPI_COPY_FIELD(out, in, max_address_range);         \
+	ACPI_COPY_FIELD(out, in, address_translation_offset); \
+	ACPI_COPY_FIELD(out, in, address_length);            \
+	ACPI_COPY_FIELD(out, in, resource_source);
 
 /******************************************************************************
  *
@@ -385,17 +385,17 @@
 	switch (resource->id) {
 	case ACPI_RSTYPE_ADDRESS16:
 		address16 = (struct acpi_resource_address16 *) &resource->data;
-		COPY_ADDRESS(out, address16);
+		ACPI_COPY_ADDRESS(out, address16);
 		break;
 
 	case ACPI_RSTYPE_ADDRESS32:
 		address32 = (struct acpi_resource_address32 *) &resource->data;
-		COPY_ADDRESS(out, address32);
+		ACPI_COPY_ADDRESS(out, address32);
 		break;
 
 	case ACPI_RSTYPE_ADDRESS64:
 		address64 = (struct acpi_resource_address64 *) &resource->data;
-		COPY_ADDRESS(out, address64);
+		ACPI_COPY_ADDRESS(out, address64);
 		break;
 
 	default:
diff -urN linux-2.5.68-bk4/drivers/acpi/tables/tbutils.c linux-2.5.68-bk5/drivers/acpi/tables/tbutils.c
--- linux-2.5.68-bk4/drivers/acpi/tables/tbutils.c	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/tables/tbutils.c	2003-04-24 04:34:51.000000000 -0700
@@ -133,7 +133,7 @@
 
 	/* Ensure that the signature is 4 ASCII characters */
 
-	ACPI_MOVE_UNALIGNED32_TO_32 (&signature, table_header->signature);
+	ACPI_MOVE_32_TO_32 (&signature, table_header->signature);
 	if (!acpi_ut_valid_acpi_name (signature)) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Table signature at %p [%p] has invalid characters\n",
diff -urN linux-2.5.68-bk4/drivers/acpi/utilities/utdebug.c linux-2.5.68-bk5/drivers/acpi/utilities/utdebug.c
--- linux-2.5.68-bk4/drivers/acpi/utilities/utdebug.c	2003-04-19 19:50:04.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/utilities/utdebug.c	2003-04-24 04:34:51.000000000 -0700
@@ -559,8 +559,7 @@
 
 			case DB_WORD_DISPLAY:
 
-				ACPI_MOVE_UNALIGNED16_TO_32 (&temp32,
-						   &buffer[i + j]);
+				ACPI_MOVE_16_TO_32 (&temp32, &buffer[i + j]);
 				acpi_os_printf ("%04X ", temp32);
 				j += 2;
 				break;
@@ -568,8 +567,7 @@
 
 			case DB_DWORD_DISPLAY:
 
-				ACPI_MOVE_UNALIGNED32_TO_32 (&temp32,
-						   &buffer[i + j]);
+				ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j]);
 				acpi_os_printf ("%08X ", temp32);
 				j += 4;
 				break;
@@ -577,12 +575,10 @@
 
 			case DB_QWORD_DISPLAY:
 
-				ACPI_MOVE_UNALIGNED32_TO_32 (&temp32,
-						   &buffer[i + j]);
+				ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j]);
 				acpi_os_printf ("%08X", temp32);
 
-				ACPI_MOVE_UNALIGNED32_TO_32 (&temp32,
-						   &buffer[i + j + 4]);
+				ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j + 4]);
 				acpi_os_printf ("%08X ", temp32);
 				j += 8;
 				break;
diff -urN linux-2.5.68-bk4/drivers/acpi/utilities/utmisc.c linux-2.5.68-bk5/drivers/acpi/utilities/utmisc.c
--- linux-2.5.68-bk4/drivers/acpi/utilities/utmisc.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/drivers/acpi/utilities/utmisc.c	2003-04-24 04:34:51.000000000 -0700
@@ -592,7 +592,7 @@
 		(void) acpi_ut_delete_mutex (i);
 	}
 
-	(void) acpi_os_delete_lock (acpi_gbl_gpe_lock);
+	acpi_os_delete_lock (acpi_gbl_gpe_lock);
 	return_VOID;
 }
 
diff -urN linux-2.5.68-bk4/drivers/block/Kconfig linux-2.5.68-bk5/drivers/block/Kconfig
--- linux-2.5.68-bk4/drivers/block/Kconfig	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/Kconfig	2003-04-24 04:34:51.000000000 -0700
@@ -331,7 +331,6 @@
 
 config BLK_DEV_INITRD
 	bool "Initial RAM disk (initrd) support"
-	depends on BLK_DEV_RAM=y
 	help
 	  The initial RAM disk is a RAM disk that is loaded by the boot loader
 	  (loadlin or lilo) and that is mounted as root before the normal boot
diff -urN linux-2.5.68-bk4/drivers/block/Makefile linux-2.5.68-bk5/drivers/block/Makefile
--- linux-2.5.68-bk4/drivers/block/Makefile	2003-04-19 19:50:37.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/Makefile	2003-04-24 04:34:51.000000000 -0700
@@ -20,6 +20,7 @@
 obj-$(CONFIG_ATARI_SLM)		+= acsi_slm.o
 obj-$(CONFIG_AMIGA_Z2RAM)	+= z2ram.o
 obj-$(CONFIG_BLK_DEV_RAM)	+= rd.o
+obj-$(CONFIG_BLK_DEV_INITRD)	+= initrd.o
 obj-$(CONFIG_BLK_DEV_LOOP)	+= loop.o
 obj-$(CONFIG_BLK_DEV_PS2)	+= ps2esdi.o
 obj-$(CONFIG_BLK_DEV_XD)	+= xd.o
diff -urN linux-2.5.68-bk4/drivers/block/genhd.c linux-2.5.68-bk5/drivers/block/genhd.c
--- linux-2.5.68-bk4/drivers/block/genhd.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/genhd.c	2003-04-24 04:34:51.000000000 -0700
@@ -623,10 +623,10 @@
 }
 
 struct seq_operations diskstats_op = {
-	start:	diskstats_start,
-	next:	diskstats_next,
-	stop:	diskstats_stop,
-	show:	diskstats_show
+	.start	= diskstats_start,
+	.next	= diskstats_next,
+	.stop	= diskstats_stop,
+	.show	= diskstats_show
 };
 
 
diff -urN linux-2.5.68-bk4/drivers/block/initrd.c linux-2.5.68-bk5/drivers/block/initrd.c
--- linux-2.5.68-bk4/drivers/block/initrd.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.68-bk5/drivers/block/initrd.c	2003-04-24 04:34:51.000000000 -0700
@@ -0,0 +1,100 @@
+
+#include <linux/blkdev.h>
+#include <linux/genhd.h>
+#include <linux/initrd.h>
+#include <linux/init.h>
+#include <linux/major.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+
+
+unsigned long initrd_start, initrd_end;
+int initrd_below_start_ok;
+
+static int initrd_users;
+static spinlock_t initrd_users_lock = SPIN_LOCK_UNLOCKED;
+
+static struct gendisk *initrd_disk;
+
+static ssize_t initrd_read(struct file *file, char *buf,
+			   size_t count, loff_t *ppos)
+{
+	int left = initrd_end - initrd_start - *ppos;
+
+	if (count > left)
+		count = left;
+	if (count == 0)
+		return 0;
+	if (copy_to_user(buf, (char *)initrd_start + *ppos, count))
+		return -EFAULT;
+
+	*ppos += count;
+	return count;
+}
+
+static int initrd_release(struct inode *inode,struct file *file)
+{
+
+	blkdev_put(inode->i_bdev, BDEV_FILE);
+
+	spin_lock(&initrd_users_lock);
+	if (!--initrd_users) {
+		spin_unlock(&initrd_users_lock);
+		del_gendisk(initrd_disk);
+		free_initrd_mem(initrd_start, initrd_end);
+		initrd_start = 0;
+	} else
+		spin_unlock(&initrd_users_lock);
+
+	return 0;
+}
+
+static struct file_operations initrd_fops = {
+	.read =		initrd_read,
+	.release =	initrd_release,
+};
+
+static int initrd_open(struct inode *inode, struct file *filp)
+{
+	if (!initrd_start) 
+		return -ENODEV;
+
+	spin_lock(&initrd_users_lock);
+	initrd_users++;
+	spin_unlock(&initrd_users_lock);
+
+	filp->f_op = &initrd_fops;
+	return 0;
+}
+
+static struct block_device_operations initrd_bdops = {
+	.owner =	THIS_MODULE,
+	.open =		initrd_open,
+};
+
+static int __init initrd_init(void)
+{
+	initrd_disk = alloc_disk(1);
+	if (!initrd_disk)
+		return -ENOMEM;
+
+	initrd_disk->major = RAMDISK_MAJOR;
+	initrd_disk->first_minor = INITRD_MINOR;
+	initrd_disk->fops = &initrd_bdops;	
+
+	sprintf(initrd_disk->disk_name, "initrd");
+	sprintf(initrd_disk->devfs_name, "rd/initrd");
+
+	set_capacity(initrd_disk, (initrd_end-initrd_start+511) >> 9);
+	add_disk(initrd_disk);
+	return 0;
+}
+
+static void __exit initrd_exit(void)
+{
+	put_disk(initrd_disk);
+}
+
+module_init(initrd_init);
+module_exit(initrd_exit);
diff -urN linux-2.5.68-bk4/drivers/block/ll_rw_blk.c linux-2.5.68-bk5/drivers/block/ll_rw_blk.c
--- linux-2.5.68-bk4/drivers/block/ll_rw_blk.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/ll_rw_blk.c	2003-04-24 04:34:51.000000000 -0700
@@ -2187,6 +2187,15 @@
 		complete(waiting);
 }
 
+void end_request(struct request *req, int uptodate)
+{
+	if (!end_that_request_first(req, uptodate, req->hard_cur_sectors)) {
+		add_disk_randomness(req->rq_disk);
+		blkdev_dequeue_request(req);
+		end_that_request_last(req);
+	}
+}
+
 int __init blk_dev_init(void)
 {
 	int total_ram = nr_free_pages() << (PAGE_SHIFT - 10);
@@ -2229,6 +2238,7 @@
 EXPORT_SYMBOL(end_that_request_first);
 EXPORT_SYMBOL(end_that_request_chunk);
 EXPORT_SYMBOL(end_that_request_last);
+EXPORT_SYMBOL(end_request);
 EXPORT_SYMBOL(blk_init_queue);
 EXPORT_SYMBOL(blk_cleanup_queue);
 EXPORT_SYMBOL(blk_queue_make_request);
diff -urN linux-2.5.68-bk4/drivers/block/rd.c linux-2.5.68-bk5/drivers/block/rd.c
--- linux-2.5.68-bk4/drivers/block/rd.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/rd.c	2003-04-24 04:34:51.000000000 -0700
@@ -56,20 +56,12 @@
 #include <linux/bio.h>
 #include <linux/buffer_head.h>		/* for invalidate_bdev() */
 #include <linux/backing-dev.h>
-#include <linux/initrd.h>
 #include <linux/blkpg.h>
 #include <asm/uaccess.h>
 
 /* The RAM disk size is now a parameter */
 #define NUM_RAMDISKS 16		/* This cannot be overridden (yet) */ 
 
-#ifdef CONFIG_BLK_DEV_INITRD
-static int initrd_users;
-static spinlock_t initrd_users_lock = SPIN_LOCK_UNLOCKED;
-unsigned long initrd_start, initrd_end;
-int initrd_below_start_ok;
-#endif
-
 /* Various static variables go here.  Most are used only in the RAM disk code.
  */
 
@@ -269,53 +261,6 @@
 	return error;
 }
 
-
-#ifdef CONFIG_BLK_DEV_INITRD
-
-static struct block_device_operations rd_bd_op;
-static struct gendisk *initrd_disk;
-
-static ssize_t initrd_read(struct file *file, char *buf,
-			   size_t count, loff_t *ppos)
-{
-	int left;
-
-	left = initrd_end - initrd_start - *ppos;
-	if (count > left) count = left;
-	if (count == 0) return 0;
-	if (copy_to_user(buf, (char *)initrd_start + *ppos, count))
-		return -EFAULT;
-	*ppos += count;
-	return count;
-}
-
-
-static int initrd_release(struct inode *inode,struct file *file)
-{
-	extern void free_initrd_mem(unsigned long, unsigned long);
-
-	blkdev_put(inode->i_bdev, BDEV_FILE);
-
-	spin_lock(&initrd_users_lock);
-	if (!--initrd_users) {
-		spin_unlock(&initrd_users_lock);
-		del_gendisk(initrd_disk);
-		free_initrd_mem(initrd_start, initrd_end);
-		initrd_start = 0;
-	} else {
-		spin_unlock(&initrd_users_lock);
-	}
-	return 0;
-}
-
-
-static struct file_operations initrd_fops = {
-	.read =		initrd_read,
-	.release =	initrd_release,
-};
-
-#endif
-
 static struct backing_dev_info rd_backing_dev_info = {
 	.ra_pages	= 0,	/* No readahead */
 	.memory_backed	= 1,	/* Does not contribute to dirty memory */
@@ -325,18 +270,6 @@
 {
 	int unit = minor(inode->i_rdev);
 
-#ifdef CONFIG_BLK_DEV_INITRD
-	if (unit == INITRD_MINOR) {
-		spin_lock(&initrd_users_lock);
-		initrd_users++;
-		spin_unlock(&initrd_users_lock);
-		if (!initrd_start) 
-			return -ENODEV;
-		filp->f_op = &initrd_fops;
-		return 0;
-	}
-#endif
-
 	/*
 	 * Immunize device against invalidate_buffers() and prune_icache().
 	 */
@@ -375,9 +308,7 @@
 		del_gendisk(rd_disks[i]);
 		put_disk(rd_disks[i]);
 	}
-#ifdef CONFIG_BLK_DEV_INITRD
-	put_disk(initrd_disk);
-#endif
+
 	devfs_remove("rd");
 	unregister_blkdev(RAMDISK_MAJOR, "ramdisk" );
 }
@@ -396,17 +327,6 @@
 		rd_blocksize = BLOCK_SIZE;
 	}
 
-#ifdef CONFIG_BLK_DEV_INITRD
-	initrd_disk = alloc_disk(1);
-	if (!initrd_disk)
-		return -ENOMEM;
-	initrd_disk->major = RAMDISK_MAJOR;
-	initrd_disk->first_minor = INITRD_MINOR;
-	initrd_disk->fops = &rd_bd_op;	
-	sprintf(initrd_disk->disk_name, "initrd");
-	sprintf(initrd_disk->devfs_name, "rd/initrd");
-#endif
-
 	for (i = 0; i < NUM_RAMDISKS; i++) {
 		rd_disks[i] = alloc_disk(1);
 		if (!rd_disks[i])
@@ -436,12 +356,6 @@
 		add_disk(rd_disks[i]);
 	}
 
-#ifdef CONFIG_BLK_DEV_INITRD
-	/* We ought to separate initrd operations here */
-	set_capacity(initrd_disk, (initrd_end-initrd_start+511)>>9);
-	add_disk(initrd_disk);
-#endif
-
 	/* rd_size is given in kB */
 	printk("RAMDISK driver initialized: "
 	       "%d RAM disks of %dK size %d blocksize\n",
@@ -451,9 +365,6 @@
 out:
 	while (i--)
 		put_disk(rd_disks[i]);
-#ifdef CONFIG_BLK_DEV_INITRD
-	put_disk(initrd_disk);
-#endif
 	return err;
 }
 
diff -urN linux-2.5.68-bk4/drivers/block/umem.c linux-2.5.68-bk5/drivers/block/umem.c
--- linux-2.5.68-bk4/drivers/block/umem.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/block/umem.c	2003-04-24 04:34:51.000000000 -0700
@@ -52,6 +52,7 @@
 
 #include <linux/fcntl.h>        /* O_ACCMODE */
 #include <linux/hdreg.h>  /* HDIO_GETGEO */
+#include <linux/devfs_fs_kernel.h>
 
 #include <linux/umem.h>
 
diff -urN linux-2.5.68-bk4/drivers/bluetooth/hci_ldisc.c linux-2.5.68-bk5/drivers/bluetooth/hci_ldisc.c
--- linux-2.5.68-bk4/drivers/bluetooth/hci_ldisc.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/bluetooth/hci_ldisc.c	2003-04-24 04:34:51.000000000 -0700
@@ -145,7 +145,7 @@
 		int len;
 	
 		set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-		len = tty->driver.write(tty, 0, skb->data, skb->len);
+		len = tty->driver->write(tty, 0, skb->data, skb->len);
 		hdev->stat.byte_tx += len;
 
 		skb_pull(skb, len);
@@ -193,8 +193,8 @@
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 
 	if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
 		hu->proto->flush(hu);
@@ -286,8 +286,8 @@
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 
 	return 0;
 }
@@ -384,8 +384,8 @@
 	hu->hdev.stat.byte_rx += count;
 	spin_unlock(&hu->rx_lock);
 
-	if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver.unthrottle)
-		tty->driver.unthrottle(tty);
+	if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver->unthrottle)
+		tty->driver->unthrottle(tty);
 }
 
 static int hci_uart_register_dev(struct hci_uart *hu)
diff -urN linux-2.5.68-bk4/drivers/char/amiserial.c linux-2.5.68-bk5/drivers/char/amiserial.c
--- linux-2.5.68-bk4/drivers/char/amiserial.c	2003-04-19 19:51:18.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/amiserial.c	2003-04-24 04:34:51.000000000 -0700
@@ -50,7 +50,7 @@
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ tty->name, (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -153,7 +153,7 @@
 
 
 static inline int serial_paranoia_check(struct async_struct *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -162,11 +162,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -208,7 +208,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 
 	local_irq_save(flags);
@@ -228,7 +228,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 
 	local_irq_save(flags);
@@ -881,7 +881,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty || !info->xmit.buf)
@@ -905,7 +905,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit.head == info->xmit.tail
@@ -931,7 +931,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit.buf || !tmp_buf)
@@ -1009,7 +1009,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
 }
@@ -1018,7 +1018,7 @@
 {
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
 }
@@ -1028,7 +1028,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	local_irq_save(flags);
 	info->xmit.head = info->xmit.tail = 0;
@@ -1048,7 +1048,7 @@
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
         unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	info->x_char = ch;
@@ -1089,7 +1089,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 
 	if (I_IXOFF(tty))
@@ -1114,7 +1114,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 
 	if (I_IXOFF(tty)) {
@@ -1323,7 +1323,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_break"))
+	if (serial_paranoia_check(info, tty->name, "rs_break"))
 		return;
 
 	local_irq_save(flags);
@@ -1344,7 +1344,7 @@
 	struct serial_icounter_struct icount;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1519,7 +1519,7 @@
 	struct serial_state *state;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1598,8 +1598,8 @@
 		rs_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1628,7 +1628,7 @@
 	unsigned long orig_jiffies, char_time;
 	int lsr;
 
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 	if (info->xmit_fifo_size == 0)
@@ -1689,7 +1689,7 @@
 	struct async_struct * info = (struct async_struct *)tty->driver_data;
 	struct serial_state *state = info->state;
 
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -1741,7 +1741,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1895,7 +1895,7 @@
 	unsigned long		page;
 
 	MOD_INC_USE_COUNT;
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS)) {
 		MOD_DEC_USE_COUNT;
 		return -ENODEV;
@@ -1907,12 +1907,11 @@
 	}
 	tty->driver_data = info;
 	info->tty = tty;
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
@@ -1961,7 +1960,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -1971,7 +1970,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...", info->line);
+	printk("rs_open %s successful...", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/char/cyclades.c linux-2.5.68-bk5/drivers/char/cyclades.c
--- linux-2.5.68-bk4/drivers/char/cyclades.c	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/cyclades.c	2003-04-24 04:34:51.000000000 -0700
@@ -892,7 +892,7 @@
 
 static inline int
 serial_paranoia_check(struct cyclades_port *info,
-                        kdev_t device, const char *routine)
+                        char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
     static const char *badmagic =
@@ -903,18 +903,18 @@
         "cyc Warning: cyclades_port out of range for (%s) in %s\n";
 
     if (!info) {
-        printk(badinfo, cdevname(device), routine);
+        printk(badinfo, name, routine);
         return 1;
     }
 
     if( (long)info < (long)(&cy_port[0])
     || (long)(&cy_port[NR_PORTS]) < (long)info ){
-        printk(badrange, cdevname(device), routine);
+        printk(badrange, name, routine);
         return 1;
     }
 
     if (info->magic != CYCLADES_MAGIC) {
-        printk(badmagic, cdevname(device), routine);
+        printk(badmagic, name, routine);
         return 1;
     }
 #endif
@@ -2378,7 +2378,7 @@
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
         if (info->flags & ASYNC_NORMAL_ACTIVE){
             return -EBUSY;
         }
@@ -2579,7 +2579,7 @@
   unsigned long page;
 
     MOD_INC_USE_COUNT;
-    line = minor(tty->device) - tty->driver.minor_start;
+    line = tty->index;
     if ((line < 0) || (NR_PORTS <= line)){
 	MOD_DEC_USE_COUNT;
         return -ENODEV;
@@ -2634,7 +2634,7 @@
 #endif
     tty->driver_data = info;
     info->tty = tty;
-    if (serial_paranoia_check(info, tty->device, "cy_open")){
+    if (serial_paranoia_check(info, tty->name, "cy_open")){
         return -ENODEV;
     }
 #ifdef CY_DEBUG_OPEN
@@ -2683,7 +2683,7 @@
     }
 
     if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-        if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+        if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
             *tty->termios = info->normal_termios;
         else 
             *tty->termios = info->callout_termios;
@@ -2711,7 +2711,7 @@
   int card,chip,channel,index;
   unsigned long orig_jiffies, char_time;
 	
-    if (serial_paranoia_check(info, tty->device, "cy_wait_until_sent"))
+    if (serial_paranoia_check(info, tty->name, "cy_wait_until_sent"))
 	return;
 
     if (info->xmit_fifo_size == 0)
@@ -2795,7 +2795,7 @@
     printk("cyc:cy_close ttyC%d\n", info->line);
 #endif
 
-    if (!info || serial_paranoia_check(info, tty->device, "cy_close")){
+    if (!info || serial_paranoia_check(info, tty->name, "cy_close")){
         return;
     }
 
@@ -2904,8 +2904,8 @@
 
     CY_UNLOCK(info, flags);
     shutdown(info);
-    if (tty->driver.flush_buffer)
-        tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+        tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
         tty->ldisc.flush_buffer(tty);
     CY_LOCK(info, flags);
@@ -2961,7 +2961,7 @@
     printk("cyc:cy_write ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_write")){
+    if (serial_paranoia_check(info, tty->name, "cy_write")){
         return 0;
     }
         
@@ -3047,7 +3047,7 @@
     printk("cyc:cy_put_char ttyC%d\n", info->line);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_put_char"))
+    if (serial_paranoia_check(info, tty->name, "cy_put_char"))
         return;
 
     if (!tty || !info->xmit_buf)
@@ -3081,7 +3081,7 @@
     printk("cyc:cy_flush_chars ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_flush_chars"))
+    if (serial_paranoia_check(info, tty->name, "cy_flush_chars"))
         return;
 
     if (info->xmit_cnt <= 0 || tty->stopped
@@ -3108,7 +3108,7 @@
     printk("cyc:cy_write_room ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_write_room"))
+    if (serial_paranoia_check(info, tty->name, "cy_write_room"))
         return 0;
     ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
     if (ret < 0)
@@ -3123,7 +3123,7 @@
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
   int card, channel;
                                 
-    if (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer"))
+    if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer"))
         return 0;
 
     card = info->card;
@@ -4012,7 +4012,7 @@
     struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
     unsigned long flags;
 
-    if (serial_paranoia_check(info, tty->device, "cy_break"))
+    if (serial_paranoia_check(info, tty->name, "cy_break"))
 	return;
 
     CY_LOCK(info, flags);
@@ -4231,7 +4231,7 @@
   int ret_val = 0;
   unsigned long flags;
 
-    if (serial_paranoia_check(info, tty->device, "cy_ioctl"))
+    if (serial_paranoia_check(info, tty->name, "cy_ioctl"))
 	return -ENODEV;
 
 #ifdef CY_DEBUG_OTHER
@@ -4469,7 +4469,7 @@
            tty->ldisc.chars_in_buffer(tty), info->line);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_throttle")){
+    if (serial_paranoia_check(info, tty->name, "cy_throttle")){
             return;
     }
 
@@ -4525,7 +4525,7 @@
            tty->ldisc.chars_in_buffer(tty), info->line);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_unthrottle")){
+    if (serial_paranoia_check(info, tty->name, "cy_unthrottle")){
             return;
     }
 
@@ -4579,7 +4579,7 @@
     printk("cyc:cy_stop ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_stop"))
+    if (serial_paranoia_check(info, tty->name, "cy_stop"))
         return;
         
     cinfo = &cy_card[info->card];
@@ -4619,7 +4619,7 @@
     printk("cyc:cy_start ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_start"))
+    if (serial_paranoia_check(info, tty->name, "cy_start"))
         return;
         
     cinfo = &cy_card[info->card];
@@ -4657,7 +4657,7 @@
     printk("cyc:cy_flush_buffer ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_flush_buffer"))
+    if (serial_paranoia_check(info, tty->name, "cy_flush_buffer"))
         return;
 
     card = info->card;
@@ -4696,7 +4696,7 @@
     printk("cyc:cy_hangup ttyC%d\n", info->line); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_hangup"))
+    if (serial_paranoia_check(info, tty->name, "cy_hangup"))
         return;
 
     cy_flush_buffer(tty);
diff -urN linux-2.5.68-bk4/drivers/char/dz.c linux-2.5.68-bk5/drivers/char/dz.c
--- linux-2.5.68-bk4/drivers/char/dz.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/dz.c	2003-04-24 04:34:51.000000000 -0700
@@ -1112,8 +1112,8 @@
 	 */
 	shutdown(info);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer (tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer (tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer (tty);
 	tty->closing = 0;
@@ -1183,7 +1183,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & DZ_NORMAL_ACTIVE)
 			return -EBUSY;
     
@@ -1271,7 +1271,7 @@
 	struct dz_serial *info;
 	int retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 
 	/*
 	 * The dz lines for the mouse/keyboard must be opened using their
@@ -1301,7 +1301,7 @@
 		return retval;
 
 	if ((info->count == 1) && (info->flags & DZ_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -1335,7 +1335,7 @@
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
 	serial_driver.name = "ttyS";
 #else
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #endif
 	serial_driver.major = TTY_MAJOR;
 	serial_driver.minor_start = 64;
@@ -1376,7 +1376,7 @@
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
 	callout_driver.name = "cua";
 #else
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #endif
 	callout_driver.major = TTYAUX_MAJOR;
 	callout_driver.subtype = SERIAL_TYPE_CALLOUT;
@@ -1425,10 +1425,8 @@
 		printk("ttyS%02d at 0x%08x (irq = %d)\n", info->line,
 		       info->port, SERIAL);
 
-		tty_register_device(&serial_driver,
-		                   serial_driver.minor_start + info->line);
-		tty_register_device(&callout_driver,
-		                   callout_driver.minor_start + info->line);
+		tty_register_device(&serial_driver, info->line);
+		tty_register_device(&callout_driver, info->line);
 	}
 
 	/* Reset the chip */
diff -urN linux-2.5.68-bk4/drivers/char/epca.c linux-2.5.68-bk5/drivers/char/epca.c
--- linux-2.5.68-bk4/drivers/char/epca.c	2003-04-19 19:49:58.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/epca.c	2003-04-24 04:34:51.000000000 -0700
@@ -503,7 +503,7 @@
 	struct channel *ch;
 	unsigned long flags;
 
-	if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+	if (tty->driver->subtype == SERIAL_TYPE_INFO) 
 	{
 		return;
 	}
@@ -574,8 +574,8 @@
 			tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
 		}
 	
-		if (tty->driver.flush_buffer)
-			tty->driver.flush_buffer(tty);
+		if (tty->driver->flush_buffer)
+			tty->driver->flush_buffer(tty);
 
 		if (tty->ldisc.flush_buffer)
 			tty->ldisc.flush_buffer(tty);
@@ -681,8 +681,8 @@
 
 		save_flags(flags);
 		cli();
-		if (tty->driver.flush_buffer)
-			tty->driver.flush_buffer(tty);
+		if (tty->driver->flush_buffer)
+			tty->driver->flush_buffer(tty);
 
 		if (tty->ldisc.flush_buffer)
 			tty->ldisc.flush_buffer(tty);
@@ -729,7 +729,7 @@
 
 	/* Stop users from hurting themselves on control minor */
 
-	if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+	if (tty->driver->subtype == SERIAL_TYPE_INFO) 
 	{
 		return (0) ;
 	}
@@ -1238,7 +1238,7 @@
 	   device isn't being used.
 	-------------------------------------------------------------------- */
 
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) 
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) 
 	{ /* A cud device has been opened */
 		if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
@@ -1368,12 +1368,12 @@
 
 	/* Nothing "real" happens in open of control device */
 
-	if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+	if (tty->driver->subtype == SERIAL_TYPE_INFO) 
 	{
 		return (0) ;
 	}
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if (line < 0 || line >= nbdevs) 
 	{
 		printk(KERN_ERR "<Error> - pc_open : line out of range in pc_open\n");
@@ -1453,7 +1453,7 @@
 	/* Should this be here except for SPLIT termios ? */
 	if (ch->count == 1) 
 	{
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = ch->normal_termios;
 		else 
 			*tty->termios = ch->callout_termios;
@@ -2712,7 +2712,7 @@
 			the driver will wait on carrier detect.
 		------------------------------------------------------------------- */
 
-		if ((ts->c_cflag & CLOCAL) || (tty->driver.subtype == SERIAL_TYPE_CALLOUT))
+		if ((ts->c_cflag & CLOCAL) || (tty->driver->subtype == SERIAL_TYPE_CALLOUT))
 		{ /* Begin it is a cud device or a ttyD device with CLOCAL on */
 			ch->asyncflags &= ~ASYNC_CHECK_CD;
 		} /* End it is a cud device or a ttyD device with CLOCAL on */
@@ -2888,7 +2888,7 @@
 	if (bc->orun) 
 	{
 		bc->orun = 0;
-		printk(KERN_WARNING "overrun! DigiBoard device minor = %d\n",minor(tty->device));
+		printk(KERN_WARNING "overrun! DigiBoard device %s\n",tty->name);
 	}
 
 	rxwinon(ch);
@@ -2960,7 +2960,7 @@
 	struct channel *ch = (struct channel *) tty->driver_data;
 	
 	/* The control device has it's own set of commands */
-	if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+	if (tty->driver->subtype == SERIAL_TYPE_INFO) 
 	{ /* Begin if subtype is the control device */
 
 		switch (cmd) 
diff -urN linux-2.5.68-bk4/drivers/char/esp.c linux-2.5.68-bk5/drivers/char/esp.c
--- linux-2.5.68-bk4/drivers/char/esp.c	2003-04-19 19:48:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/esp.c	2003-04-24 04:34:51.000000000 -0700
@@ -135,7 +135,7 @@
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ tty->name, (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -175,7 +175,7 @@
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct esp_struct *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char badmagic[] = KERN_WARNING
@@ -184,11 +184,11 @@
 		"Warning: null esp_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != ESP_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -219,7 +219,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -237,7 +237,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1256,7 +1256,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty || !info->xmit_buf)
@@ -1279,7 +1279,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf)
@@ -1301,7 +1301,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf || !tmp_buf)
@@ -1368,7 +1368,7 @@
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = ESP_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -1380,7 +1380,7 @@
 {
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -1389,7 +1389,7 @@
 {
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	cli();
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -1418,7 +1418,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	cli();
@@ -1440,7 +1440,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	cli();
@@ -1841,7 +1841,7 @@
 	struct esp_struct * info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "esp_break"))
+	if (serial_paranoia_check(info, tty->name, "esp_break"))
 		return;
 
 	save_flags(flags); cli();
@@ -1864,7 +1864,7 @@
 	struct async_icount cprev, cnow;	/* kernel counter temps */
 	struct serial_icounter_struct *p_cuser;	/* user space */
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -2037,7 +2037,7 @@
 	struct esp_struct * info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -2112,8 +2112,8 @@
 		rs_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -2140,7 +2140,7 @@
 	unsigned long orig_jiffies, char_time;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 	orig_jiffies = jiffies;
@@ -2179,7 +2179,7 @@
 {
 	struct esp_struct * info = (struct esp_struct *)tty->driver_data;
 	
-	if (serial_paranoia_check(info, tty->device, "esp_hangup"))
+	if (serial_paranoia_check(info, tty->name, "esp_hangup"))
 		return;
 	
 	rs_flush_buffer(tty);
@@ -2226,7 +2226,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2354,7 +2354,7 @@
 	struct esp_struct	*info;
 	int 			retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 
@@ -2366,13 +2366,12 @@
 		info = info->next_port;
 
 	if (!info) {
-		serial_paranoia_check(info, tty->device, "esp_open");
+		serial_paranoia_check(info, tty->name, "esp_open");
 		return -ENODEV;
 	}
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("esp_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->count);
+	printk("esp_open %s, count = %d\n", tty->name, info->count);
 #endif
 	MOD_INC_USE_COUNT;
 	info->count++;
@@ -2402,7 +2401,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -2413,7 +2412,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("esp_open ttys%d successful...", info->line);
+	printk("esp_open %s successful...", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/char/ftape/lowlevel/ftape-buffer.c linux-2.5.68-bk5/drivers/char/ftape/lowlevel/ftape-buffer.c
--- linux-2.5.68-bk4/drivers/char/ftape/lowlevel/ftape-buffer.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/ftape/lowlevel/ftape-buffer.c	2003-04-24 04:34:51.000000000 -0700
@@ -50,7 +50,7 @@
 		struct page *page;
 
 		for (page = virt_to_page(addr); page < virt_to_page(addr+size); page++)
-			mem_map_reserve(page);
+			SetPageReserved(page);
 	}
 	return (void *)addr;
 }
@@ -62,7 +62,7 @@
 
 		for (page = virt_to_page((unsigned long)addr);
 		     page < virt_to_page((unsigned long)addr+size); page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		free_pages((unsigned long) addr, get_order(size));
 	}
 }
diff -urN linux-2.5.68-bk4/drivers/char/generic_serial.c linux-2.5.68-bk5/drivers/char/generic_serial.c
--- linux-2.5.68-bk4/drivers/char/generic_serial.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/generic_serial.c	2003-04-24 04:34:51.000000000 -0700
@@ -112,7 +112,7 @@
 
 	if (!tty) return 0;
 
-	port = tty->driver;
+	port = tty->driver_data;
 
 	if (!port) return 0;
 
@@ -622,7 +622,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == GS_TYPE_CALLOUT) {
+	if (tty->driver->subtype == GS_TYPE_CALLOUT) {
 		if (port->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -794,8 +794,8 @@
 
 	port->flags &= ~GS_ACTIVE;
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
diff -urN linux-2.5.68-bk4/drivers/char/hvc_console.c linux-2.5.68-bk5/drivers/char/hvc_console.c
--- linux-2.5.68-bk4/drivers/char/hvc_console.c	2003-04-19 19:50:44.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/hvc_console.c	2003-04-24 04:34:51.000000000 -0700
@@ -69,7 +69,7 @@
 
 static int hvc_open(struct tty_struct *tty, struct file * filp)
 {
-	int line = minor(tty->device) - tty->driver.minor_start;
+	int line = tty->index;
 	struct hvc_struct *hp;
 	unsigned long flags;
 
@@ -253,7 +253,7 @@
 
 	hvc_driver.magic = TTY_DRIVER_MAGIC;
 	hvc_driver.driver_name = "hvc";
-	hvc_driver.name = "hvc/%d";
+	hvc_driver.name = "hvc/";
 	hvc_driver.major = HVC_MAJOR;
 	hvc_driver.minor_start = HVC_MINOR;
 	hvc_driver.num = hvc_count(&hvc_offset);
@@ -277,7 +277,7 @@
 	for (i = 0; i < hvc_driver.num; i++) {
 		hvc_struct[i].lock = SPIN_LOCK_UNLOCKED;
 		hvc_struct[i].index = i;
-		tty_register_device(&hvc_driver, hvc_driver.minor_start + i);
+		tty_register_device(&hvc_driver, i);
 	}
 
 	if (tty_register_driver(&hvc_driver))
diff -urN linux-2.5.68-bk4/drivers/char/ip2main.c linux-2.5.68-bk5/drivers/char/ip2main.c
--- linux-2.5.68-bk4/drivers/char/ip2main.c	2003-04-19 19:51:22.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/ip2main.c	2003-04-24 04:34:51.000000000 -0700
@@ -366,7 +366,7 @@
 
 #if defined(MODULE) && defined(IP2DEBUG_OPEN)
 #define DBG_CNT(s) printk(KERN_DEBUG "(%s): [%x] refc=%d, ttyc=%d, modc=%x -> %s\n", \
-		    cdevname(tty->device),(pCh->flags),ref_count, \
+		    tty->name,(pCh->flags),ref_count, \
 		    tty->count,/*GET_USE_COUNT(module)*/0,s)
 #else
 #define DBG_CNT(s)
@@ -1564,9 +1564,9 @@
 	wait_queue_t wait;
 	int rc = 0;
 	int do_clocal = 0;
-	i2ChanStrPtr  pCh = DevTable[minor(tty->device)];
+	i2ChanStrPtr  pCh = DevTable[tty->index];
 
-	ip2trace (minor(tty->device), ITRC_OPEN, ITRC_ENTER, 0 );
+	ip2trace (tty->index, ITRC_OPEN, ITRC_ENTER, 0 );
 
 	if ( pCh == NULL ) {
 		return -ENODEV;
@@ -1578,9 +1578,8 @@
 
 #ifdef IP2DEBUG_OPEN
 	printk(KERN_DEBUG \
-			"IP2:open(tty=%p,pFile=%p):dev=%x,maj=%d,min=%d,ch=%d,idx=%d\n",
-	       tty, pFile, tty->device, major(tty->device), minor(tty->device),
-			 pCh->infl.hd.i2sChannel, pCh->port_index);
+			"IP2:open(tty=%p,pFile=%p):dev=%s,ch=%d,idx=%d\n",
+	       tty, pFile, tty->name, pCh->infl.hd.i2sChannel, pCh->port_index);
 	open_sanity_check ( pCh, pCh->pMyBord );
 #endif
 
@@ -1616,7 +1615,7 @@
 	 *    (These are the only tests the standard serial driver makes for
 	 *    callout devices.)
 	 */
-	if ( tty->driver.subtype == SERIAL_TYPE_CALLOUT ) {
+	if ( tty->driver->subtype == SERIAL_TYPE_CALLOUT ) {
 		if ( pCh->flags & ASYNC_NORMAL_ACTIVE ) {
 			return -EBUSY;
 		}
@@ -1719,7 +1718,7 @@
 	if ( tty->count == 1 ) {
 		i2QueueCommands(PTYPE_INLINE, pCh, 0, 2, CMD_CTSFL_DSAB, CMD_RTSFL_DSAB);
 		if ( pCh->flags & ASYNC_SPLIT_TERMIOS ) {
-			if ( tty->driver.subtype == SERIAL_TYPE_NORMAL ) {
+			if ( tty->driver->subtype == SERIAL_TYPE_NORMAL ) {
 				*tty->termios = pCh->NormalTermios;
 			} else {
 				*tty->termios = pCh->CalloutTermios;
@@ -1771,7 +1770,7 @@
 	ip2trace (CHANN, ITRC_CLOSE, ITRC_ENTER, 0 );
 
 #ifdef IP2DEBUG_OPEN
-	printk(KERN_DEBUG "IP2:close ttyF%02X:\n",minor(tty->device));
+	printk(KERN_DEBUG "IP2:close %s:\n",tty->name);
 #endif
 
 	if ( tty_hung_up_p ( pFile ) ) {
@@ -1827,8 +1826,8 @@
 
 	serviceOutgoingFifo ( pCh->pMyBord );
 
-	if ( tty->driver.flush_buffer ) 
-		tty->driver.flush_buffer(tty);
+	if ( tty->driver->flush_buffer ) 
+		tty->driver->flush_buffer(tty);
 	if ( tty->ldisc.flush_buffer )  
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -2180,7 +2179,7 @@
 static void
 ip2_start ( PTTY tty )
 {
- 	i2ChanStrPtr  pCh = DevTable[minor(tty->device)];
+ 	i2ChanStrPtr  pCh = DevTable[tty->index];
 
  	i2QueueCommands(PTYPE_BYPASS, pCh, 0, 1, CMD_RESUME);
  	i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1, CMD_UNSUSPEND);
@@ -2193,7 +2192,7 @@
 static void
 ip2_stop ( PTTY tty )
 {
- 	i2ChanStrPtr  pCh = DevTable[minor(tty->device)];
+ 	i2ChanStrPtr  pCh = DevTable[tty->index];
 
  	i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1, CMD_SUSPEND);
 #ifdef IP2DEBUG_WRITE
@@ -2221,7 +2220,7 @@
 ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
 {
 	wait_queue_t wait;
-	i2ChanStrPtr pCh = DevTable[minor(tty->device)];
+	i2ChanStrPtr pCh = DevTable[tty->index];
 	struct async_icount cprev, cnow;	/* kernel counter temps */
 	struct serial_icounter_struct *p_cuser;	/* user space */
 	int rc = 0;
diff -urN linux-2.5.68-bk4/drivers/char/isicom.c linux-2.5.68-bk5/drivers/char/isicom.c
--- linux-2.5.68-bk4/drivers/char/isicom.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/isicom.c	2003-04-24 04:34:51.000000000 -0700
@@ -338,7 +338,7 @@
  *
  */
  
-static inline int isicom_paranoia_check(struct isi_port const * port, kdev_t dev, 
+static inline int isicom_paranoia_check(struct isi_port const * port, char *name, 
 					const char * routine)
 {
 #ifdef ISICOM_DEBUG 
@@ -347,11 +347,11 @@
 	static const char * badport = 
 			KERN_WARNING "ISICOM: Warning: NULL isicom port for dev %s in %s.\n";		
 	if (!port) {
-		printk(badport, cdevname(dev), routine);
+		printk(badport, name, routine);
 		return 1;
 	}
 	if (port->magic != ISICOM_MAGIC) {
-		printk(badmagic, cdevname(dev), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}	
 #endif	
@@ -907,7 +907,7 @@
 	
 	/* trying to open a callout device... check for constraints */
 	
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 #ifdef ISICOM_DEBUG
 		printk(KERN_DEBUG "ISICOM: bl_ti_rdy: callout open.\n");	
 #endif		
@@ -1021,7 +1021,7 @@
 #ifdef ISICOM_DEBUG	
 	printk(KERN_DEBUG "ISICOM: open start!!!.\n");
 #endif	
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	
 #ifdef ISICOM_DEBUG	
 	printk(KERN_DEBUG "line = %d.\n", line);
@@ -1049,7 +1049,7 @@
 		return -ENODEV;
 	}	
 	port = &isi_ports[line];	
-	if (isicom_paranoia_check(port, tty->device, "isicom_open"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_open"))
 		return -ENODEV;
 		
 #ifdef ISICOM_DEBUG		
@@ -1072,7 +1072,7 @@
 		return error;
 		
 	if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = port->normal_termios;
 		else 
 			*tty->termios = port->callout_termios;
@@ -1146,7 +1146,7 @@
 	
 	if (!port)
 		return;
-	if (isicom_paranoia_check(port, tty->device, "isicom_close"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_close"))
 		return;
 	
 #ifdef ISICOM_DEBUG		
@@ -1196,8 +1196,8 @@
 		outw(card->port_status, card->base + 0x02);
 	}	
 	isicom_shutdown_port(port);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1232,7 +1232,7 @@
 	printk(KERN_DEBUG "ISICOM: isicom_write for port%d: %d bytes.\n",
 			port->channel+1, count);
 #endif	  	
-	if (isicom_paranoia_check(port, tty->device, "isicom_write"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_write"))
 		return 0;
 	
 	if (!tty || !port->xmit_buf || !tmp_buf)
@@ -1290,7 +1290,7 @@
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	unsigned long flags;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_put_char"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_put_char"))
 		return;
 	
 	if (!tty || !port->xmit_buf)
@@ -1317,7 +1317,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_flush_chars"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_flush_chars"))
 		return;
 	
 	if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1334,7 +1334,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	int free;
-	if (isicom_paranoia_check(port, tty->device, "isicom_write_room"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_write_room"))
 		return 0;
 	
 	free = SERIAL_XMIT_SIZE - port->xmit_cnt - 1;
@@ -1347,7 +1347,7 @@
 static int isicom_chars_in_buffer(struct tty_struct * tty)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
-	if (isicom_paranoia_check(port, tty->device, "isicom_chars_in_buffer"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_chars_in_buffer"))
 		return 0;
 	return port->xmit_cnt;
 }
@@ -1495,7 +1495,7 @@
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	int retval;
 
-	if (isicom_paranoia_check(port, tty->device, "isicom_ioctl"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_ioctl"))
 		return -ENODEV;
 
 	switch(cmd) {
@@ -1556,7 +1556,7 @@
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	unsigned long flags;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_set_termios"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_set_termios"))
 		return;
 	
 	if (tty->termios->c_cflag == old_termios->c_cflag &&
@@ -1581,7 +1581,7 @@
 	struct isi_board * card = port->card;
 	unsigned long flags;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_throttle"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_throttle"))
 		return;
 	
 	/* tell the card that this port cannot handle any more data for now */
@@ -1598,7 +1598,7 @@
 	struct isi_board * card = port->card;
 	unsigned long flags;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_unthrottle"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_unthrottle"))
 		return;
 	
 	/* tell the card that this port is ready to accept more data */
@@ -1613,7 +1613,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 
-	if (isicom_paranoia_check(port, tty->device, "isicom_stop"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_stop"))
 		return;
 	
 	/* this tells the transmitter not to consider this port for
@@ -1626,7 +1626,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_start"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_start"))
 		return;
 	
 	/* this tells the transmitter to consider this port for
@@ -1650,7 +1650,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_hangup"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_hangup"))
 		return;
 	
 	isicom_shutdown_port(port);
@@ -1666,7 +1666,7 @@
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	unsigned long flags;
 	
-	if (isicom_paranoia_check(port, tty->device, "isicom_flush_buffer"))
+	if (isicom_paranoia_check(port, tty->name, "isicom_flush_buffer"))
 		return;
 	
 	save_flags(flags); cli();
diff -urN linux-2.5.68-bk4/drivers/char/istallion.c linux-2.5.68-bk5/drivers/char/istallion.c
--- linux-2.5.68-bk4/drivers/char/istallion.c	2003-04-19 19:50:02.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/istallion.c	2003-04-24 04:34:51.000000000 -0700
@@ -1031,11 +1031,11 @@
 	int		brdnr, portnr, rc;
 
 #if DEBUG
-	printk("stli_open(tty=%x,filp=%x): device=%x\n", (int) tty,
-		(int) filp, tty->device);
+	printk("stli_open(tty=%x,filp=%x): device=%s\n", (int) tty,
+		(int) filp, tty->name);
 #endif
 
-	minordev = minor(tty->device);
+	minordev = tty->index;
 	brdnr = MINOR2BRD(minordev);
 	if (brdnr >= stli_nrbrds)
 		return(-ENODEV);
@@ -1115,7 +1115,7 @@
  *	previous opens still in effect. If we are a normal serial device
  *	then also we might have to wait for carrier.
  */
-	if (tty->driver.subtype == STL_DRVTYPCALLOUT) {
+	if (tty->driver->subtype == STL_DRVTYPCALLOUT) {
 		if (portp->flags & ASYNC_NORMAL_ACTIVE)
 			return(-EBUSY);
 		if (portp->flags & ASYNC_CALLOUT_ACTIVE) {
@@ -1139,7 +1139,7 @@
 	}
 
 	if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == STL_DRVTYPSERIAL)
+		if (tty->driver->subtype == STL_DRVTYPSERIAL)
 			*tty->termios = portp->normaltermios;
 		else
 			*tty->termios = portp->callouttermios;
diff -urN linux-2.5.68-bk4/drivers/char/keyboard.c linux-2.5.68-bk5/drivers/char/keyboard.c
--- linux-2.5.68-bk4/drivers/char/keyboard.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/keyboard.c	2003-04-24 04:34:51.000000000 -0700
@@ -1089,7 +1089,7 @@
 		clear_bit(keycode, key_down);
 
 	if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && 
-		(!L_ECHO(tty) && tty->driver.chars_in_buffer(tty))))) {
+		(!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {
 		/*
 		 * Don't repeat a key if the input buffers are not empty and the
 		 * characters get aren't echoed locally. This makes key repeat 
diff -urN linux-2.5.68-bk4/drivers/char/mem.c linux-2.5.68-bk5/drivers/char/mem.c
--- linux-2.5.68-bk4/drivers/char/mem.c	2003-04-19 19:49:32.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/mem.c	2003-04-24 04:34:51.000000000 -0700
@@ -22,6 +22,7 @@
 #include <linux/tty.h>
 #include <linux/capability.h>
 #include <linux/smp_lock.h>
+#include <linux/devfs_fs_kernel.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff -urN linux-2.5.68-bk4/drivers/char/moxa.c linux-2.5.68-bk5/drivers/char/moxa.c
--- linux-2.5.68-bk4/drivers/char/moxa.c	2003-04-19 19:51:08.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/moxa.c	2003-04-24 04:34:51.000000000 -0700
@@ -189,7 +189,7 @@
 
 #define WAKEUP_CHARS		256
 
-#define PORTNO(x)		(minor((x)->device) - (x)->driver.minor_start)
+#define PORTNO(x)		((x)->index)
 
 static int verbose = 0;
 static int ttymajor = MOXAMAJOR;
@@ -585,7 +585,7 @@
 	tty->driver_data = ch;
 	ch->tty = tty;
 	if (ch->count == 1 && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = ch->normal_termios;
 		else
 			*tty->termios = ch->callout_termios;
@@ -644,8 +644,8 @@
 		ch->count = 1;
 	}
 	if (--ch->count < 0) {
-		printk("moxa_close: bad serial port count, minor=%d\n",
-		       minor(tty->device));
+		printk("moxa_close: bad serial port count, device=%s\n",
+		       tty->name);
 		ch->count = 0;
 	}
 	if (ch->count) {
@@ -671,8 +671,8 @@
 	shut_down(ch);
 	MoxaPortFlushData(port, 2);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1094,7 +1094,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
 			return (-EBUSY);
 		if ((ch->asyncflags & ASYNC_CALLOUT_ACTIVE) &&
diff -urN linux-2.5.68-bk4/drivers/char/mxser.c linux-2.5.68-bk5/drivers/char/mxser.c
--- linux-2.5.68-bk4/drivers/char/mxser.c	2003-04-19 19:50:08.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/mxser.c	2003-04-24 04:34:51.000000000 -0700
@@ -94,7 +94,7 @@
 #define 	UART_MCR_AFE		0x20
 #define 	UART_LSR_SPECIAL	0x1E
 
-#define PORTNO(x)		(minor((x)->device) - (x)->driver.minor_start)
+#define PORTNO(x)		((x)->index)
 
 #define RELEVANT_IFLAG(iflag)	(iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
 
@@ -758,7 +758,7 @@
 		return (retval);
 
 	if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else
 			*tty->termios = info->callout_termios;
@@ -862,8 +862,8 @@
 		}
 	}
 	mxser_shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1574,7 +1574,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return (-EBUSY);
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
diff -urN linux-2.5.68-bk4/drivers/char/n_hdlc.c linux-2.5.68-bk5/drivers/char/n_hdlc.c
--- linux-2.5.68-bk4/drivers/char/n_hdlc.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/n_hdlc.c	2003-04-24 04:34:51.000000000 -0700
@@ -319,9 +319,9 @@
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 
 	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_open() called (major=%u,minor=%u)\n",
+		printk("%s(%d)n_hdlc_tty_open() called (device=%s)\n",
 		__FILE__,__LINE__,
-		major(tty->device), minor(tty->device));
+		tty->name);
 		
 	/* There should not be an existing table for this slot. */
 	if (n_hdlc) {
@@ -348,8 +348,8 @@
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer (tty);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer (tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer (tty);
 		
 	if (debuglevel >= DEBUG_LEVEL_INFO)	
 		printk("%s(%d)n_hdlc_tty_open() success\n",__FILE__,__LINE__);
@@ -403,7 +403,7 @@
 			
 		/* Send the next block of data to device */
 		tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-		actual = tty->driver.write(tty, 0, tbuf->buf, tbuf->count);
+		actual = tty->driver->write(tty, 0, tbuf->buf, tbuf->count);
 		    
 		/* if transmit error, throw frame away by */
 		/* pretending it was accepted by driver */
@@ -780,8 +780,8 @@
 
 	case TIOCOUTQ:
 		/* get the pending tx byte count in the driver */
-		count = tty->driver.chars_in_buffer ?
-				tty->driver.chars_in_buffer(tty) : 0;
+		count = tty->driver->chars_in_buffer ?
+				tty->driver->chars_in_buffer(tty) : 0;
 		/* add size of next output frame in queue */
 		spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock,flags);
 		if (n_hdlc->tx_buf_list.head)
diff -urN linux-2.5.68-bk4/drivers/char/n_r3964.c linux-2.5.68-bk5/drivers/char/n_r3964.c
--- linux-2.5.68-bk4/drivers/char/n_r3964.c	2003-04-19 19:51:11.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/n_r3964.c	2003-04-24 04:34:51.000000000 -0700
@@ -418,9 +418,9 @@
    if(tty==NULL)
       return;
 
-   if(tty->driver.put_char)
+   if(tty->driver->put_char)
    {
-      tty->driver.put_char(tty, ch);
+      tty->driver->put_char(tty, ch);
    }
    pInfo->bcc ^= ch;
 }
@@ -432,9 +432,9 @@
    if(tty==NULL)
       return;
 
-   if(tty->driver.flush_chars)
+   if(tty->driver->flush_chars)
    {
-      tty->driver.flush_chars(tty);
+      tty->driver->flush_chars(tty);
    }
 }
 
@@ -507,8 +507,8 @@
       return;
    }
 
-   if(tty->driver.write_room)
-      room=tty->driver.write_room(tty);
+   if(tty->driver->write_room)
+      room=tty->driver->write_room(tty);
 
    TRACE_PS("transmit_block %x, room %d, length %d", 
           (int)pBlock, room, pBlock->length);
diff -urN linux-2.5.68-bk4/drivers/char/n_tty.c linux-2.5.68-bk5/drivers/char/n_tty.c
--- linux-2.5.68-bk4/drivers/char/n_tty.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/n_tty.c	2003-04-24 04:34:51.000000000 -0700
@@ -117,8 +117,8 @@
 {
 	if (tty->count &&
 	    test_and_clear_bit(TTY_THROTTLED, &tty->flags) && 
-	    tty->driver.unthrottle)
-		tty->driver.unthrottle(tty);
+	    tty->driver->unthrottle)
+		tty->driver->unthrottle(tty);
 }
 
 /*
@@ -183,7 +183,7 @@
 {
 	int	space, spaces;
 
-	space = tty->driver.write_room(tty);
+	space = tty->driver->write_room(tty);
 	if (!space)
 		return -1;
 
@@ -195,7 +195,7 @@
 			if (O_ONLCR(tty)) {
 				if (space < 2)
 					return -1;
-				tty->driver.put_char(tty, '\r');
+				tty->driver->put_char(tty, '\r');
 				tty->column = 0;
 			}
 			tty->canon_column = tty->column;
@@ -217,7 +217,7 @@
 				if (space < spaces)
 					return -1;
 				tty->column += spaces;
-				tty->driver.write(tty, 0, "        ", spaces);
+				tty->driver->write(tty, 0, "        ", spaces);
 				return 0;
 			}
 			tty->column += spaces;
@@ -234,7 +234,7 @@
 			break;
 		}
 	}
-	tty->driver.put_char(tty, c);
+	tty->driver->put_char(tty, c);
 	return 0;
 }
 
@@ -250,7 +250,7 @@
 	int 	i;
 	char	*cp;
 
-	space = tty->driver.write_room(tty);
+	space = tty->driver->write_room(tty);
 	if (!space)
 		return 0;
 	if (nr > space)
@@ -296,9 +296,9 @@
 		}
 	}
 break_out:
-	if (tty->driver.flush_chars)
-		tty->driver.flush_chars(tty);
-	i = tty->driver.write(tty, 0, buf, i);	
+	if (tty->driver->flush_chars)
+		tty->driver->flush_chars(tty);
+	i = tty->driver->write(tty, 0, buf, i);	
 	return i;
 }
 
@@ -306,7 +306,7 @@
 
 static inline void put_char(unsigned char c, struct tty_struct *tty)
 {
-	tty->driver.put_char(tty, c);
+	tty->driver->put_char(tty, c);
 }
 
 /* Must be called only when L_ECHO(tty) is true. */
@@ -452,8 +452,8 @@
 		kill_pg(tty->pgrp, sig, 1);
 	if (flush || !L_NOFLSH(tty)) {
 		n_tty_flush_buffer(tty);
-		if (tty->driver.flush_buffer)
-			tty->driver.flush_buffer(tty);
+		if (tty->driver->flush_buffer)
+			tty->driver->flush_buffer(tty);
 	}
 }
 
@@ -782,8 +782,8 @@
 				break;
 			}
 		}
-		if (tty->driver.flush_chars)
-			tty->driver.flush_chars(tty);
+		if (tty->driver->flush_chars)
+			tty->driver->flush_chars(tty);
 	}
 
 	if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
@@ -800,8 +800,8 @@
 	if (n_tty_receive_room(tty) < TTY_THRESHOLD_THROTTLE) {
 		/* check TTY_THROTTLED first so it indicates our state */
 		if (!test_and_set_bit(TTY_THROTTLED, &tty->flags) &&
-		    tty->driver.throttle)
-			tty->driver.throttle(tty);
+		    tty->driver->throttle)
+			tty->driver->throttle(tty);
 	}
 }
 
@@ -869,7 +869,7 @@
 		tty->raw = 1;
 		if ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) &&
 		    (I_IGNPAR(tty) || !I_INPCK(tty)) &&
-		    (tty->driver.flags & TTY_DRIVER_REAL_RAW))
+		    (tty->driver->flags & TTY_DRIVER_REAL_RAW))
 			tty->real_raw = 1;
 		else
 			tty->real_raw = 0;
@@ -1205,10 +1205,10 @@
 					break;
 				b++; nr--;
 			}
-			if (tty->driver.flush_chars)
-				tty->driver.flush_chars(tty);
+			if (tty->driver->flush_chars)
+				tty->driver->flush_chars(tty);
 		} else {
-			c = tty->driver.write(tty, 1, b, nr);
+			c = tty->driver->write(tty, 1, b, nr);
 			if (c < 0) {
 				retval = c;
 				goto break_out;
@@ -1251,7 +1251,7 @@
 		else
 			tty->minimum_to_wake = 1;
 	}
-	if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
+	if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS)
 		mask |= POLLOUT | POLLWRNORM;
 	return mask;
 }
diff -urN linux-2.5.68-bk4/drivers/char/pcmcia/synclink_cs.c linux-2.5.68-bk5/drivers/char/pcmcia/synclink_cs.c
--- linux-2.5.68-bk4/drivers/char/pcmcia/synclink_cs.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/pcmcia/synclink_cs.c	2003-04-24 04:34:51.000000000 -0700
@@ -848,7 +848,7 @@
 }
 
 static inline int mgslpc_paranoia_check(MGSLPC_INFO *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef MGSLPC_PARANOIA_CHECK
 	static const char *badmagic =
@@ -857,11 +857,11 @@
 		"Warning: null mgslpc_info for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != MGSLPC_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -901,7 +901,7 @@
 	MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
 	unsigned long flags;
 	
-	if (mgslpc_paranoia_check(info, tty->device, "tx_pause"))
+	if (mgslpc_paranoia_check(info, tty->name, "tx_pause"))
 		return;
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("tx_pause(%s)\n",info->device_name);	
@@ -917,7 +917,7 @@
 	MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
 	unsigned long flags;
 	
-	if (mgslpc_paranoia_check(info, tty->device, "tx_release"))
+	if (mgslpc_paranoia_check(info, tty->name, "tx_release"))
 		return;
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("tx_release(%s)\n",info->device_name);	
@@ -1703,7 +1703,7 @@
 			__FILE__,__LINE__,ch,info->device_name);
 	}
 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_put_char"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_put_char"))
 		return;
 
 	if (!tty || !info->tx_buf)
@@ -1734,7 +1734,7 @@
 		printk( "%s(%d):mgslpc_flush_chars() entry on %s tx_count=%d\n",
 			__FILE__,__LINE__,info->device_name,info->tx_count);
 	
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_flush_chars"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_flush_chars"))
 		return;
 
 	if (info->tx_count <= 0 || tty->stopped ||
@@ -1773,7 +1773,7 @@
 		printk( "%s(%d):mgslpc_write(%s) count=%d\n",
 			__FILE__,__LINE__,info->device_name,count);
 	
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_write") ||
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write") ||
 	    !tty || !info->tx_buf)
 		goto cleanup;
 
@@ -1835,7 +1835,7 @@
 	MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
 	int ret;
 				
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_write_room"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write_room"))
 		return 0;
 
 	if (info->params.mode == MGSL_MODE_HDLC) {
@@ -1867,7 +1867,7 @@
 		printk("%s(%d):mgslpc_chars_in_buffer(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
 			 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_chars_in_buffer"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_chars_in_buffer"))
 		return 0;
 		
 	if (info->params.mode == MGSL_MODE_HDLC)
@@ -1893,7 +1893,7 @@
 		printk("%s(%d):mgslpc_flush_buffer(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 	
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_flush_buffer"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_flush_buffer"))
 		return;
 		
 	spin_lock_irqsave(&info->lock,flags); 
@@ -1918,7 +1918,7 @@
 		printk("%s(%d):mgslpc_send_xchar(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, ch );
 			 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_send_xchar"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_send_xchar"))
 		return;
 
 	info->x_char = ch;
@@ -1941,7 +1941,7 @@
 		printk("%s(%d):mgslpc_throttle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_throttle"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1966,7 +1966,7 @@
 		printk("%s(%d):mgslpc_unthrottle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_unthrottle"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -2393,7 +2393,7 @@
 		printk("%s(%d):mgslpc_break(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, break_state);
 			 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_break"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_break"))
 		return;
 
 	spin_lock_irqsave(&info->lock,flags);
@@ -2424,7 +2424,7 @@
 		printk("%s(%d):mgslpc_ioctl %s cmd=%08X\n", __FILE__,__LINE__,
 			info->device_name, cmd );
 	
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_ioctl"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -2516,7 +2516,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgslpc_set_termios %s\n", __FILE__,__LINE__,
-			tty->driver.name );
+			tty->driver->name );
 	
 	/* just return if nothing has changed */
 	if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -2560,7 +2560,7 @@
 {
 	MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
 
-	if (!info || mgslpc_paranoia_check(info, tty->device, "mgslpc_close"))
+	if (!info || mgslpc_paranoia_check(info, tty->name, "mgslpc_close"))
 		return;
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2615,8 +2615,8 @@
  	if (info->flags & ASYNC_INITIALIZED)
  		mgslpc_wait_until_sent(tty, info->timeout);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 		
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
@@ -2642,7 +2642,7 @@
 cleanup:			
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgslpc_close(%s) exit, count=%d\n", __FILE__,__LINE__,
-			tty->driver.name, info->count);
+			tty->driver->name, info->count);
 }
 
 /* Wait until the transmitter is empty.
@@ -2659,7 +2659,7 @@
 		printk("%s(%d):mgslpc_wait_until_sent(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
       
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_wait_until_sent"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_wait_until_sent"))
 		return;
 
 	if (!(info->flags & ASYNC_INITIALIZED))
@@ -2721,7 +2721,7 @@
 		printk("%s(%d):mgslpc_hangup(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
 			 
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_hangup"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_hangup"))
 		return;
 
 	mgslpc_flush_buffer(tty);
@@ -2747,9 +2747,9 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready on %s\n",
-			 __FILE__,__LINE__, tty->driver.name );
+			 __FILE__,__LINE__, tty->driver->name );
 
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		/* this is a callout device */
 		/* just verify that normal device is not in use */
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -2795,7 +2795,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready before block on %s count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 
 	spin_lock_irqsave(&info->lock, flags);
 	if (!tty_hung_up_p(filp)) {
@@ -2839,7 +2839,7 @@
 		
 		if (debug_level >= DEBUG_LEVEL_INFO)
 			printk("%s(%d):block_til_ready blocking on %s count=%d\n",
-				 __FILE__,__LINE__, tty->driver.name, info->count );
+				 __FILE__,__LINE__, tty->driver->name, info->count );
 				 
 		schedule();
 	}
@@ -2853,7 +2853,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready after blocking on %s count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 			 
 	if (!retval)
 		info->flags |= ASYNC_NORMAL_ACTIVE;
@@ -2868,7 +2868,7 @@
 	unsigned long flags;
 
 	/* verify range of specified line number */	
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= mgslpc_device_count)) {
 		printk("%s(%d):mgslpc_open with illegal line #%d.\n",
 			__FILE__,__LINE__,line);
@@ -2887,12 +2887,12 @@
 	
 	tty->driver_data = info;
 	info->tty = tty;
-	if (mgslpc_paranoia_check(info, tty->device, "mgslpc_open"))
+	if (mgslpc_paranoia_check(info, tty->name, "mgslpc_open"))
 		return -ENODEV;
 		
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
-			 __FILE__,__LINE__,tty->driver.name, info->count);
+			 __FILE__,__LINE__,tty->driver->name, info->count);
 
 	/* If port is closing, signal caller to try again */
 	if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -2931,7 +2931,7 @@
 
 	if ((info->count == 1) &&
 	    info->flags & ASYNC_SPLIT_TERMIOS) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
diff -urN linux-2.5.68-bk4/drivers/char/pcxx.c linux-2.5.68-bk5/drivers/char/pcxx.c
--- linux-2.5.68-bk4/drivers/char/pcxx.c	2003-04-19 19:50:01.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/pcxx.c	2003-04-24 04:34:51.000000000 -0700
@@ -405,7 +405,7 @@
 	int boardnum;
 	int retval;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 
 	if(line < 0 || line >= nbdevs) {
 		printk("line out of range in pcxe_open\n");
@@ -482,7 +482,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if (ch->asyncflags & ASYNC_CALLOUT_ACTIVE) {
@@ -517,7 +517,7 @@
 	save_flags(flags);
 	cli();
 	if((ch->count == 1) && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) {
-		if(tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if(tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = ch->normal_termios;
 		else 
 			*tty->termios = ch->callout_termios;
@@ -617,8 +617,8 @@
 			tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
 		}
 	
-		if(tty->driver.flush_buffer)
-			tty->driver.flush_buffer(tty);
+		if(tty->driver->flush_buffer)
+			tty->driver->flush_buffer(tty);
 		if(tty->ldisc.flush_buffer)
 			tty->ldisc.flush_buffer(tty);
 		shutdown(info);
@@ -2070,7 +2070,7 @@
 
 	if(bc->orun) {
 		bc->orun = 0;
-		printk("overrun! DigiBoard device minor=%d\n",minor(tty->device));
+		printk("overrun! DigiBoard device %s\n", tty->name);
 	}
 
 	rxwinon(ch);
diff -urN linux-2.5.68-bk4/drivers/char/pty.c linux-2.5.68-bk5/drivers/char/pty.c
--- linux-2.5.68-bk4/drivers/char/pty.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/pty.c	2003-04-24 04:34:51.000000000 -0700
@@ -52,23 +52,23 @@
 
 #ifdef CONFIG_UNIX98_PTYS
 /* These are global because they are accessed in tty_io.c */
-struct tty_driver ptm_driver[UNIX98_NR_MAJORS];
-struct tty_driver pts_driver[UNIX98_NR_MAJORS];
+struct tty_driver ptm_driver;
+struct tty_driver pts_driver;
 
-static struct tty_struct *ptm_table[UNIX98_NR_MAJORS][NR_PTYS];
-static struct termios *ptm_termios[UNIX98_NR_MAJORS][NR_PTYS];
-static struct termios *ptm_termios_locked[UNIX98_NR_MAJORS][NR_PTYS];
-static struct tty_struct *pts_table[UNIX98_NR_MAJORS][NR_PTYS];
-static struct termios *pts_termios[UNIX98_NR_MAJORS][NR_PTYS];
-static struct termios *pts_termios_locked[UNIX98_NR_MAJORS][NR_PTYS];
-static struct pty_struct ptm_state[UNIX98_NR_MAJORS][NR_PTYS];
+static struct tty_struct *ptm_table[UNIX98_NR_MAJORS*NR_PTYS];
+static struct termios *ptm_termios[UNIX98_NR_MAJORS*NR_PTYS];
+static struct termios *ptm_termios_locked[UNIX98_NR_MAJORS*NR_PTYS];
+static struct tty_struct *pts_table[UNIX98_NR_MAJORS*NR_PTYS];
+static struct termios *pts_termios[UNIX98_NR_MAJORS*NR_PTYS];
+static struct termios *pts_termios_locked[UNIX98_NR_MAJORS*NR_PTYS];
+static struct pty_struct ptm_state[UNIX98_NR_MAJORS*NR_PTYS];
 #endif
 
 static void pty_close(struct tty_struct * tty, struct file * filp)
 {
 	if (!tty)
 		return;
-	if (tty->driver.subtype == PTY_TYPE_MASTER) {
+	if (tty->driver->subtype == PTY_TYPE_MASTER) {
 		if (tty->count > 1)
 			printk("master pty_close: count = %d!!\n", tty->count);
 	} else {
@@ -84,18 +84,12 @@
 	wake_up_interruptible(&tty->link->read_wait);
 	wake_up_interruptible(&tty->link->write_wait);
 	set_bit(TTY_OTHER_CLOSED, &tty->link->flags);
-	if (tty->driver.subtype == PTY_TYPE_MASTER) {
+	if (tty->driver->subtype == PTY_TYPE_MASTER) {
 		set_bit(TTY_OTHER_CLOSED, &tty->flags);
 #ifdef CONFIG_UNIX98_PTYS
-		{
-			unsigned int major = major(tty->device) - UNIX98_PTY_MASTER_MAJOR;
-			if ( major < UNIX98_NR_MAJORS ) {
-				devpts_pty_kill( minor(tty->device)
-			  - tty->driver.minor_start + tty->driver.name_base );
-			}
-		}
+		if (tty->driver == &ptm_driver)
+			devpts_pty_kill(tty->index);
 #endif
-		tty_unregister_device (&tty->link->driver, minor(tty->device));
 		tty_vhangup(tty->link);
 	}
 }
@@ -221,7 +215,7 @@
 	/* The ldisc must report 0 if no characters available to be read */
 	count = to->ldisc.chars_in_buffer(to);
 
-	if (tty->driver.subtype == PTY_TYPE_SLAVE) return count;
+	if (tty->driver->subtype == PTY_TYPE_SLAVE) return count;
 
 	/* Master side driver ... if the other side's read buffer is less than 
 	 * half full, return 0 to allow writers to proceed; otherwise return
@@ -239,8 +233,7 @@
 #ifdef CONFIG_UNIX98_PTYS
 static int pty_get_device_number(struct tty_struct *tty, unsigned int *value)
 {
-	unsigned int result = minor(tty->device)
-		- tty->driver.minor_start + tty->driver.name_base;
+	unsigned int result = tty->index;
 	return put_user(result, value);
 }
 #endif
@@ -314,10 +307,8 @@
 	retval = -ENODEV;
 	if (!tty || !tty->link)
 		goto out;
-	line = minor(tty->device) - tty->driver.minor_start;
-	if ((line < 0) || (line >= NR_PTYS))
-		goto out;
-	pty = (struct pty_struct *)(tty->driver.driver_state) + line;
+	line = tty->index;
+	pty = (struct pty_struct *)(tty->driver->driver_state) + line;
 	tty->driver_data = pty;
 
 	retval = -EIO;
@@ -357,7 +348,7 @@
 	pty_driver.owner = THIS_MODULE;
 	pty_driver.driver_name = "pty_master";
 #ifdef CONFIG_DEVFS_FS
-	pty_driver.name = "pty/m%d";
+	pty_driver.name = "pty/m";
 #else
 	pty_driver.name = "pty";
 #endif
@@ -392,7 +383,7 @@
 	pty_slave_driver.driver_name = "pty_slave";
 	pty_slave_driver.proc_entry = 0;
 #ifdef CONFIG_DEVFS_FS
-	pty_slave_driver.name = "pty/s%d";
+	pty_slave_driver.name = "pty/s";
 #else
 	pty_slave_driver.name = "ttyp";
 #endif
@@ -427,52 +418,41 @@
 #ifdef CONFIG_UNIX98_PTYS
 	devfs_mk_dir("pts");
 	printk("pty: %d Unix98 ptys configured\n", UNIX98_NR_MAJORS*NR_PTYS);
-	for ( i = 0 ; i < UNIX98_NR_MAJORS ; i++ ) {
-		int j;
+	ptm_driver = pty_driver;
+	ptm_driver.name = "ptm";
+	ptm_driver.proc_entry = 0;
+	ptm_driver.major = UNIX98_PTY_MASTER_MAJOR;
+	ptm_driver.minor_start = 0;
+	ptm_driver.num = UNIX98_NR_MAJORS * NR_PTYS;
+	ptm_driver.other = &pts_driver;
+	ptm_driver.flags |= TTY_DRIVER_NO_DEVFS;
+	ptm_driver.table = ptm_table;
+	ptm_driver.termios = ptm_termios;
+	ptm_driver.termios_locked = ptm_termios_locked;
+	ptm_driver.driver_state = ptm_state;
 
-		ptm_driver[i] = pty_driver;
-		ptm_driver[i].name = "ptm";
-		ptm_driver[i].proc_entry = 0;
-		ptm_driver[i].major = UNIX98_PTY_MASTER_MAJOR+i;
-		ptm_driver[i].minor_start = 0;
-		ptm_driver[i].name_base = i*NR_PTYS;
-		ptm_driver[i].num = NR_PTYS;
-		ptm_driver[i].other = &pts_driver[i];
-		ptm_driver[i].flags |= TTY_DRIVER_NO_DEVFS;
-		ptm_driver[i].table = ptm_table[i];
-		ptm_driver[i].termios = ptm_termios[i];
-		ptm_driver[i].termios_locked = ptm_termios_locked[i];
-		ptm_driver[i].driver_state = ptm_state[i];
-
-		for (j = 0; j < NR_PTYS; j++)
-			init_waitqueue_head(&ptm_state[i][j].open_wait);
-		
-		pts_driver[i] = pty_slave_driver;
-#ifdef CONFIG_DEVFS_FS
-		pts_driver[i].name = "pts/%d";
-#else
-		pts_driver[i].name = "pts";
-#endif
-		pts_driver[i].proc_entry = 0;
-		pts_driver[i].major = UNIX98_PTY_SLAVE_MAJOR+i;
-		pts_driver[i].minor_start = 0;
-		pts_driver[i].name_base = i*NR_PTYS;
-		pts_driver[i].num = ptm_driver[i].num;
-		pts_driver[i].other = &ptm_driver[i];
-		pts_driver[i].table = pts_table[i];
-		pts_driver[i].termios = pts_termios[i];
-		pts_driver[i].termios_locked = pts_termios_locked[i];
-		pts_driver[i].driver_state = ptm_state[i];
-		
-		ptm_driver[i].ioctl = pty_unix98_ioctl;
-		
-		if (tty_register_driver(&ptm_driver[i]))
-			panic("Couldn't register Unix98 ptm driver major %d",
-			      ptm_driver[i].major);
-		if (tty_register_driver(&pts_driver[i]))
-			panic("Couldn't register Unix98 pts driver major %d",
-			      pts_driver[i].major);
-	}
+	for (i = 0; i < UNIX98_NR_MAJORS*NR_PTYS; i++)
+		init_waitqueue_head(&ptm_state[i].open_wait);
+	
+	pts_driver = pty_slave_driver;
+	pts_driver.name = "pts";
+	pts_driver.proc_entry = 0;
+	pts_driver.major = UNIX98_PTY_SLAVE_MAJOR;
+	pts_driver.minor_start = 0;
+	pts_driver.num = UNIX98_NR_MAJORS * NR_PTYS;
+	pts_driver.other = &ptm_driver;
+	pts_driver.flags |= TTY_DRIVER_NO_DEVFS;
+	pts_driver.table = pts_table;
+	pts_driver.termios = pts_termios;
+	pts_driver.termios_locked = pts_termios_locked;
+	pts_driver.driver_state = ptm_state;
+	
+	ptm_driver.ioctl = pty_unix98_ioctl;
+	
+	if (tty_register_driver(&ptm_driver))
+		panic("Couldn't register Unix98 ptm driver");
+	if (tty_register_driver(&pts_driver))
+		panic("Couldn't register Unix98 pts driver");
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/char/rio/func.h linux-2.5.68-bk5/drivers/char/rio/func.h
--- linux-2.5.68-bk4/drivers/char/rio/func.h	2003-04-19 19:49:26.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/rio/func.h	2003-04-24 04:34:51.000000000 -0700
@@ -139,7 +139,7 @@
 int riotopen(struct tty_struct * tty, struct file * filp);
 int riotclose(void  *ptr);
 int RIOCookMode(struct ttystatics *);
-int riotioctl(struct rio_info *, dev_t, register int, register caddr_t); 
+int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t); 
 void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
 
 /* riotable.c */
@@ -166,8 +166,8 @@
 #endif
 
 extern int    rio_pcicopy(char *src, char *dst, int n);
-extern int rio_minor (kdev_t device);
-extern int rio_ismodem (kdev_t device);
+extern int rio_minor (struct tty_struct *tty);
+extern int rio_ismodem (struct tty_struct *tty);
 extern void rio_udelay (int usecs);
 
 extern void rio_start_card_running (struct Host * HostP);
diff -urN linux-2.5.68-bk4/drivers/char/rio/rio_linux.c linux-2.5.68-bk5/drivers/char/rio/rio_linux.c
--- linux-2.5.68-bk4/drivers/char/rio/rio_linux.c	2003-04-19 19:50:02.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/rio/rio_linux.c	2003-04-24 04:34:51.000000000 -0700
@@ -293,7 +293,7 @@
 /* This doesn't work. Who's paranoid around here? Not me! */
 
 static inline int rio_paranoia_check(struct rio_port const * port,
-				    kdev_t device, const char *routine)
+				    char *name, const char *routine)
 {
 
   static const char *badmagic =
@@ -302,11 +302,11 @@
     KERN_ERR "rio: Warning: null rio port for device %s in %s\n";
  
   if (!port) {
-    printk (badinfo, cdevname(device), routine);
+    printk (badinfo, name, routine);
     return 1;
   }
   if (port->magic != RIO_MAGIC) {
-    printk (badmagic, cdevname(device), routine);
+    printk (badmagic, name, routine);
     return 1;
   }
 
@@ -372,18 +372,15 @@
 }
 
 
-int rio_minor (kdev_t device)
+int rio_minor(struct tty_struct *tty)
 {
-  return minor (device) + 
-    256 * ((major (device) == RIO_NORMAL_MAJOR1) ||
-	   (major (device) == RIO_CALLOUT_MAJOR1));
+	return tty->index + (tty->driver->termios - rio_termios);
 }
 
 
-int rio_ismodem (kdev_t device)
+int rio_ismodem(struct tty_struct *tty)
 {
-  return (major (device) == RIO_NORMAL_MAJOR0) ||
-         (major (device) == RIO_NORMAL_MAJOR1);
+	return tty->driver == &rio_driver || tty->driver == &rio_driver2;
 }
 
 
@@ -423,7 +420,7 @@
 
   tty = ((struct Port *)ptr)->gs.tty;
 
-  modem = (major(tty->device) == RIO_NORMAL_MAJOR0) || (major(tty->device) == RIO_NORMAL_MAJOR1);
+  modem = rio_ismodem(tty);
 
   rv = RIOParam( (struct Port *) ptr, CONFIG, modem, 1);
 
@@ -942,7 +939,9 @@
   rio_driver.hangup = gs_hangup;
 
   rio_driver2 = rio_driver;
-  rio_driver.major = RIO_NORMAL_MAJOR1;
+  rio_driver2.major = RIO_NORMAL_MAJOR1;
+  rio_driver2.termios += 256;
+  rio_driver2.termios_locked += 256;
 
   rio_callout_driver = rio_driver;
   rio_callout_driver.name = "cusr";
@@ -951,6 +950,8 @@
 
   rio_callout_driver2 = rio_callout_driver;
   rio_callout_driver2.major = RIO_CALLOUT_MAJOR1;
+  rio_callout_driver2.termios += 256;
+  rio_callout_driver2.termios_locked += 256;
 
   rio_dprintk (RIO_DEBUG_INIT, "set_termios = %p\n", gs_set_termios);
 
diff -urN linux-2.5.68-bk4/drivers/char/rio/riotty.c linux-2.5.68-bk5/drivers/char/rio/riotty.c
--- linux-2.5.68-bk4/drivers/char/rio/riotty.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/rio/riotty.c	2003-04-24 04:34:51.000000000 -0700
@@ -159,8 +159,8 @@
 	*/
 	tty->driver_data = NULL;
         
-	SysPort = rio_minor (tty->device);
-	Modem   = rio_ismodem (tty->device);
+	SysPort = rio_minor(tty);
+	Modem   = rio_ismodem(tty);
 
 	if ( p->RIOFailed ) {
 		rio_dprintk (RIO_DEBUG_TTY, "System initialisation failed\n");
@@ -549,7 +549,7 @@
 	else 
 		end_time = jiffies + MAX_SCHEDULE_TIMEOUT;
 
-	Modem = rio_ismodem(tty->device);
+	Modem = rio_ismodem(tty);
 #if 0
 	/* What F.CKING cache? Even then, a higly idle multiprocessor,
 	   system with large caches this won't work . Better find out when 
@@ -882,11 +882,7 @@
 ** its all about.
 */
 int
-riotioctl(p, dev, cmd, arg)
-struct rio_info *		p;
-dev_t dev;
-register int cmd;
-register caddr_t arg;
+riotioctl(struct rio_info *p, struct tty_struct *tty, int cmd, caddr_t arg)
 {
 	register struct		Port *PortP;
 	register struct		ttystatics *tp;
@@ -898,8 +894,8 @@
 	short				vpix_cflag;
 	short				divisor;
 	int					baud;
-	uint				SysPort = dev;
-	int					Modem = rio_ismodem(dev);
+	uint				SysPort = rio_minor(tty);
+	int				Modem = rio_ismodem(tty);
 	int					ioctl_processed;
 
 	rio_dprintk (RIO_DEBUG_TTY, "port ioctl SysPort %d command 0x%x argument 0x%x %s\n",
diff -urN linux-2.5.68-bk4/drivers/char/riscom8.c linux-2.5.68-bk5/drivers/char/riscom8.c
--- linux-2.5.68-bk4/drivers/char/riscom8.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/riscom8.c	2003-04-24 04:34:51.000000000 -0700
@@ -131,7 +131,7 @@
 
 
 static inline int rc_paranoia_check(struct riscom_port const * port,
-				    kdev_t device, const char *routine)
+				    char *name, const char *routine)
 {
 #ifdef RISCOM_PARANOIA_CHECK
 	static const char badmagic[] = KERN_INFO
@@ -140,11 +140,11 @@
 		"rc: Warning: null riscom port for device %s in %s\n";
 
 	if (!port) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (port->magic != RISCOM8_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -991,7 +991,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == RISCOM_TYPE_CALLOUT) {
+	if (tty->driver->subtype == RISCOM_TYPE_CALLOUT) {
 		if (port->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1089,13 +1089,13 @@
 	struct riscom_board * bp;
 	unsigned long flags;
 	
-	board = RC_BOARD(minor(tty->device));
+	board = RC_BOARD(tty->index);
 	if (board >= RC_NBOARD || !(rc_board[board].flags & RC_BOARD_PRESENT))
 		return -ENODEV;
 	
 	bp = &rc_board[board];
-	port = rc_port + board * RC_NPORT + RC_PORT(minor(tty->device));
-	if (rc_paranoia_check(port, tty->device, "rc_open"))
+	port = rc_port + board * RC_NPORT + RC_PORT(tty->index);
+	if (rc_paranoia_check(port, tty->name, "rc_open"))
 		return -ENODEV;
 	
 	if ((error = rc_setup_board(bp))) 
@@ -1112,7 +1112,7 @@
 		return error;
 	
 	if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == RISCOM_TYPE_NORMAL)
+		if (tty->driver->subtype == RISCOM_TYPE_NORMAL)
 			*tty->termios = port->normal_termios;
 		else
 			*tty->termios = port->callout_termios;
@@ -1134,7 +1134,7 @@
 	unsigned long flags;
 	unsigned long timeout;
 	
-	if (!port || rc_paranoia_check(port, tty->device, "close"))
+	if (!port || rc_paranoia_check(port, tty->name, "close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1198,8 +1198,8 @@
 		}
 	}
 	rc_shutdown_port(bp, port);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1226,7 +1226,7 @@
 	int c, total = 0;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_write"))
+	if (rc_paranoia_check(port, tty->name, "rc_write"))
 		return 0;
 	
 	bp = port_Board(port);
@@ -1302,7 +1302,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	unsigned long flags;
 
-	if (rc_paranoia_check(port, tty->device, "rc_put_char"))
+	if (rc_paranoia_check(port, tty->name, "rc_put_char"))
 		return;
 
 	if (!tty || !port->xmit_buf)
@@ -1324,7 +1324,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_flush_chars"))
+	if (rc_paranoia_check(port, tty->name, "rc_flush_chars"))
 		return;
 	
 	if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1343,7 +1343,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	int	ret;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_write_room"))
+	if (rc_paranoia_check(port, tty->name, "rc_write_room"))
 		return 0;
 
 	ret = SERIAL_XMIT_SIZE - port->xmit_cnt - 1;
@@ -1356,7 +1356,7 @@
 {
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_chars_in_buffer"))
+	if (rc_paranoia_check(port, tty->name, "rc_chars_in_buffer"))
 		return 0;
 	
 	return port->xmit_cnt;
@@ -1367,7 +1367,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_flush_buffer"))
+	if (rc_paranoia_check(port, tty->name, "rc_flush_buffer"))
 		return;
 
 	save_flags(flags); cli();
@@ -1531,7 +1531,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	int retval;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_ioctl"))
+	if (rc_paranoia_check(port, tty->name, "rc_ioctl"))
 		return -ENODEV;
 	
 	switch (cmd) {
@@ -1581,7 +1581,7 @@
 	struct riscom_board *bp;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_throttle"))
+	if (rc_paranoia_check(port, tty->name, "rc_throttle"))
 		return;
 	
 	bp = port_Board(port);
@@ -1604,7 +1604,7 @@
 	struct riscom_board *bp;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_unthrottle"))
+	if (rc_paranoia_check(port, tty->name, "rc_unthrottle"))
 		return;
 	
 	bp = port_Board(port);
@@ -1627,7 +1627,7 @@
 	struct riscom_board *bp;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_stop"))
+	if (rc_paranoia_check(port, tty->name, "rc_stop"))
 		return;
 	
 	bp = port_Board(port);
@@ -1645,7 +1645,7 @@
 	struct riscom_board *bp;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_start"))
+	if (rc_paranoia_check(port, tty->name, "rc_start"))
 		return;
 	
 	bp = port_Board(port);
@@ -1684,7 +1684,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	struct riscom_board *bp;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_hangup"))
+	if (rc_paranoia_check(port, tty->name, "rc_hangup"))
 		return;
 	
 	bp = port_Board(port);
@@ -1702,7 +1702,7 @@
 	struct riscom_port *port = (struct riscom_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (rc_paranoia_check(port, tty->device, "rc_set_termios"))
+	if (rc_paranoia_check(port, tty->name, "rc_set_termios"))
 		return;
 	
 	if (tty->termios->c_cflag == old_termios->c_cflag &&
diff -urN linux-2.5.68-bk4/drivers/char/rocket.c linux-2.5.68-bk5/drivers/char/rocket.c
--- linux-2.5.68-bk4/drivers/char/rocket.c	2003-04-19 19:50:11.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/rocket.c	2003-04-24 04:34:51.000000000 -0700
@@ -176,15 +176,15 @@
 static void rp_start(struct tty_struct *tty);
 
 static inline int rocket_paranoia_check(struct r_port *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef ROCKET_PARANOIA_CHECK
 	static const char *badmagic =
-		"Warning: bad magic number for rocketport struct (%d, %d) in %s\n";
+		"Warning: bad magic number for rocketport struct %s in %s\n";
 	if (!info)
 		return 1;
 	if (info->magic != RPORT_MAGIC) {
-		printk(badmagic, major(device), minor(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -710,7 +710,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ROCKET_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ROCKET_CALLOUT_ACTIVE) &&
@@ -822,7 +822,7 @@
 	CHANNEL_t	*cp;
 	unsigned long page;
 	
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= MAX_RP_PORTS))
 		return -ENODEV;
 	if (!tmp_buf) {
@@ -946,7 +946,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ROCKET_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -963,7 +963,7 @@
 	int timeout;
 	CHANNEL_t	*cp;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_close"))
+	if (rocket_paranoia_check(info, tty->name, "rp_close"))
 		return;
 
 #ifdef ROCKET_DEBUG_OPEN
@@ -1048,8 +1048,8 @@
 	if (C_HUPCL(tty)) {
 		sClrDTR(cp);
 	}
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
@@ -1093,7 +1093,7 @@
 	unsigned cflag;
 	
 
-	if (rocket_paranoia_check(info, tty->device, "rp_set_termios"))
+	if (rocket_paranoia_check(info, tty->name, "rp_set_termios"))
 		return;
 
 	cflag = tty->termios->c_cflag;
@@ -1145,7 +1145,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	unsigned long flags;
 	
-	if (rocket_paranoia_check(info, tty->device, "rp_break"))
+	if (rocket_paranoia_check(info, tty->name, "rp_break"))
 		return;
 
 	save_flags(flags); cli();
@@ -1295,7 +1295,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 
 	if (cmd != RCKP_GET_PORTS &&
-	    rocket_paranoia_check(info, tty->device, "rp_ioctl"))
+	    rocket_paranoia_check(info, tty->name, "rp_ioctl"))
 		return -ENODEV;
 
 	switch (cmd) {
@@ -1325,25 +1325,12 @@
 	return 0;
 }
 
-#if (defined(ROCKET_DEBUG_FLOW) || defined(ROCKET_DEBUG_THROTTLE))
-static char *rp_tty_name(struct tty_struct *tty, char *buf)
-{
-	if (tty)
-		sprintf(buf, "%s%d", tty->driver.name,
-			minor(tty->device) - tty->driver.minor_start +
-			tty->driver.name_base);
-	else
-		strcpy(buf, "NULL tty");
-	return buf;
-}
-#endif
-
 static void rp_send_xchar(struct tty_struct *tty, char ch)
 {
 	struct r_port *info = (struct r_port *)tty->driver_data;
 	CHANNEL_t *cp;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_send_xchar"))
+	if (rocket_paranoia_check(info, tty->name, "rp_send_xchar"))
 		return;
 
 	cp = &info->channel;
@@ -1360,11 +1347,11 @@
 #ifdef ROCKET_DEBUG_THROTTLE
 	char	buf[64];
 	
-	printk("throttle %s: %d....\n", rp_tty_name(tty, buf),
+	printk("throttle %s: %d....\n", tty->name,
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (rocket_paranoia_check(info, tty->device, "rp_throttle"))
+	if (rocket_paranoia_check(info, tty->name, "rp_throttle"))
 		return;
 
 	cp = &info->channel;
@@ -1381,11 +1368,11 @@
 #ifdef ROCKET_DEBUG_THROTTLE
 	char	buf[64];
 	
-	printk("unthrottle %s: %d....\n", rp_tty_name(tty, buf),
+	printk("unthrottle %s: %d....\n", tty->name,
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (rocket_paranoia_check(info, tty->device, "rp_throttle"))
+	if (rocket_paranoia_check(info, tty->name, "rp_throttle"))
 		return;
 
 	cp = &info->channel;
@@ -1409,11 +1396,11 @@
 #ifdef ROCKET_DEBUG_FLOW
 	char	buf[64];
 	
-	printk("stop %s: %d %d....\n", rp_tty_name(tty, buf),
+	printk("stop %s: %d %d....\n", tty->name,
 	       info->xmit_cnt, info->xmit_fifo_room);
 #endif
 
-	if (rocket_paranoia_check(info, tty->device, "rp_stop"))
+	if (rocket_paranoia_check(info, tty->name, "rp_stop"))
 		return;
 
 	if (sGetTxCnt(&info->channel))
@@ -1426,11 +1413,11 @@
 #ifdef ROCKET_DEBUG_FLOW
 	char	buf[64];
 	
-	printk("start %s: %d %d....\n", rp_tty_name(tty, buf),
+	printk("start %s: %d %d....\n", tty->name,
 	       info->xmit_cnt, info->xmit_fifo_room);
 #endif
 
-	if (rocket_paranoia_check(info, tty->device, "rp_stop"))
+	if (rocket_paranoia_check(info, tty->name, "rp_stop"))
 		return;
 
 	sEnTransmit(&info->channel);
@@ -1448,7 +1435,7 @@
 	int check_time, exit_time;
 	int txcnt;
 	
-	if (rocket_paranoia_check(info, tty->device, "rp_wait_until_sent"))
+	if (rocket_paranoia_check(info, tty->name, "rp_wait_until_sent"))
 		return;
 
 	cp = &info->channel;
@@ -1498,7 +1485,7 @@
 	CHANNEL_t	*cp;
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	
-	if (rocket_paranoia_check(info, tty->device, "rp_hangup"))
+	if (rocket_paranoia_check(info, tty->name, "rp_hangup"))
 		return;
 
 #if (defined(ROCKET_DEBUG_OPEN) || defined(ROCKET_DEBUG_HANGUP))
@@ -1553,7 +1540,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	CHANNEL_t	*cp;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_put_char"))
+	if (rocket_paranoia_check(info, tty->name, "rp_put_char"))
 		return;
 
 #ifdef ROCKET_DEBUG_WRITE
@@ -1586,7 +1573,7 @@
 	int		c, retval = 0;
 	unsigned long	flags;
 
-	if (count <= 0 || rocket_paranoia_check(info, tty->device, "rp_write"))
+	if (count <= 0 || rocket_paranoia_check(info, tty->name, "rp_write"))
 		return 0;
 
 #ifdef ROCKET_DEBUG_WRITE
@@ -1687,7 +1674,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	int	ret;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_write_room"))
+	if (rocket_paranoia_check(info, tty->name, "rp_write_room"))
 		return 0;
 
 	ret = XMIT_BUF_SIZE - info->xmit_cnt - 1;
@@ -1708,7 +1695,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	CHANNEL_t	*cp;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_chars_in_buffer"))
+	if (rocket_paranoia_check(info, tty->name, "rp_chars_in_buffer"))
 		return 0;
 
 	cp = &info->channel;
@@ -1724,7 +1711,7 @@
 	struct r_port * info = (struct r_port *)tty->driver_data;
 	CHANNEL_t	*cp;
 
-	if (rocket_paranoia_check(info, tty->device, "rp_flush_buffer"))
+	if (rocket_paranoia_check(info, tty->name, "rp_flush_buffer"))
 		return;
 
 	cli();
@@ -2026,7 +2013,7 @@
 	memset(&rocket_driver, 0, sizeof(struct tty_driver));
 	rocket_driver.magic = TTY_DRIVER_MAGIC;
 #ifdef CONFIG_DEVFS_FS
-	rocket_driver.name = "tts/R%d";
+	rocket_driver.name = "tts/R";
 #else
 	rocket_driver.name = "ttyR";
 #endif
@@ -2068,7 +2055,7 @@
 	 */
 	callout_driver = rocket_driver;
 #ifdef CONFIG_DEVFS_FS
-	callout_driver.name = "cua/R%d";
+	callout_driver.name = "cua/R";
 #else
 	callout_driver.name = "cur";
 #endif
diff -urN linux-2.5.68-bk4/drivers/char/ser_a2232.c linux-2.5.68-bk5/drivers/char/ser_a2232.c
--- linux-2.5.68-bk4/drivers/char/ser_a2232.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/ser_a2232.c	2003-04-24 04:34:51.000000000 -0700
@@ -456,7 +456,7 @@
 	int retval;
 	struct a2232_port *port;
 
-	line = minor(tty->device);
+	line = tty->index;
 	port = &a2232_ports[line];
 	
 	tty->driver_data = port;
@@ -480,7 +480,7 @@
 	}
 
 	if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)){
-		if (tty->driver.subtype == A2232_TTY_SUBTYPE_NORMAL)
+		if (tty->driver->subtype == A2232_TTY_SUBTYPE_NORMAL)
 			*tty->termios = port->gs.normal_termios;
 		else 
 			*tty->termios = port->gs.callout_termios;
diff -urN linux-2.5.68-bk4/drivers/char/serial167.c linux-2.5.68-bk5/drivers/char/serial167.c
--- linux-2.5.68-bk4/drivers/char/serial167.c	2003-04-19 19:49:21.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/serial167.c	2003-04-24 04:34:51.000000000 -0700
@@ -237,30 +237,30 @@
 }
 
 static inline int
-serial_paranoia_check(struct cyclades_port *info, kdev_t device,
+serial_paranoia_check(struct cyclades_port *info, char *name,
 		      const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
     static const char *badmagic =
-	"Warning: bad magic number for serial struct (%d, %d) in %s\n";
+	"Warning: bad magic number for serial struct (%s) in %s\n";
     static const char *badinfo =
-	"Warning: null cyclades_port for (%d, %d) in %s\n";
+	"Warning: null cyclades_port for (%s) in %s\n";
     static const char *badrange =
-	"Warning: cyclades_port out of range for (%d, %d) in %s\n";
+	"Warning: cyclades_port out of range for (%s) in %s\n";
 
     if (!info) {
-	printk(badinfo, major(device), minor(device), routine);
+	printk(badinfo, name, routine);
 	return 1;
     }
 
     if( (long)info < (long)(&cy_port[0])
     || (long)(&cy_port[NR_PORTS]) < (long)info ){
-	printk(badrange, major(device), minor(device), routine);
+	printk(badrange, name, routine);
 	return 1;
     }
 
     if (info->magic != CYCLADES_MAGIC) {
-	printk(badmagic, major(device), minor(device), routine);
+	printk(badmagic, name, routine);
 	return 1;
     }
 #endif
@@ -339,10 +339,10 @@
   unsigned long flags;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_stop ttyS%d\n", info->line); /* */
+    printk("cy_stop %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_stop"))
+    if (serial_paranoia_check(info, tty->name, "cy_stop"))
 	return;
 	
     channel = info->line;
@@ -364,10 +364,10 @@
   unsigned long flags;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_start ttyS%d\n", info->line); /* */
+    printk("cy_start %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_start"))
+    if (serial_paranoia_check(info, tty->name, "cy_start"))
 	return;
 	
     channel = info->line;
@@ -1171,10 +1171,10 @@
   unsigned long flags;
 
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_put_char ttyS%d(0x%02x)\n", info->line, ch);
+    printk("cy_put_char %s(0x%02x)\n", tty->name, ch);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_put_char"))
+    if (serial_paranoia_check(info, tty->name, "cy_put_char"))
 	return;
 
     if (!tty || !info->xmit_buf)
@@ -1202,10 +1202,10 @@
   int channel;
 				
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_flush_chars ttyS%d\n", info->line); /* */
+    printk("cy_flush_chars %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_flush_chars"))
+    if (serial_paranoia_check(info, tty->name, "cy_flush_chars"))
 	return;
 
     if (info->xmit_cnt <= 0 || tty->stopped
@@ -1236,10 +1236,10 @@
   int c, total = 0;
 
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_write ttyS%d\n", info->line); /* */
+    printk("cy_write %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_write")){
+    if (serial_paranoia_check(info, tty->name, "cy_write")){
 	return 0;
     }
 	
@@ -1312,10 +1312,10 @@
   int	ret;
 				
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_write_room ttyS%d\n", info->line); /* */
+    printk("cy_write_room %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_write_room"))
+    if (serial_paranoia_check(info, tty->name, "cy_write_room"))
 	return 0;
     ret = PAGE_SIZE - info->xmit_cnt - 1;
     if (ret < 0)
@@ -1330,10 +1330,10 @@
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 				
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_chars_in_buffer ttyS%d %d\n", info->line, info->xmit_cnt); /* */
+    printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer"))
+    if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer"))
 	return 0;
 
     return info->xmit_cnt;
@@ -1347,10 +1347,10 @@
   unsigned long flags;
 				
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_flush_buffer ttyS%d\n", info->line); /* */
+    printk("cy_flush_buffer %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_flush_buffer"))
+    if (serial_paranoia_check(info, tty->name, "cy_flush_buffer"))
 	return;
     local_irq_save(flags);
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -1379,10 +1379,10 @@
 	
     printk("throttle %s: %d....\n", tty_name(tty, buf),
 	   tty->ldisc.chars_in_buffer(tty));
-    printk("cy_throttle ttyS%d\n", info->line);
+    printk("cy_throttle %s\n", tty->name);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){
+    if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){
 	    return;
     }
 
@@ -1415,10 +1415,10 @@
 	
     printk("throttle %s: %d....\n", tty_name(tty, buf),
 	   tty->ldisc.chars_in_buffer(tty));
-    printk("cy_unthrottle ttyS%d\n", info->line);
+    printk("cy_unthrottle %s\n", tty->name);
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){
+    if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){
 	    return;
     }
 
@@ -1743,7 +1743,7 @@
   int ret_val = 0;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_ioctl ttyS%d, cmd = %x arg = %lx\n", info->line, cmd, arg); /* */
+    printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */
 #endif
 
     switch (cmd) {
@@ -1836,7 +1836,7 @@
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_set_termios ttyS%d\n", info->line);
+    printk("cy_set_termios %s\n", tty->name);
 #endif
 
     if (tty->termios->c_cflag == old_termios->c_cflag)
@@ -1865,15 +1865,15 @@
 
 /* CP('C'); */
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_close ttyS%d\n", info->line);
+    printk("cy_close %s\n", tty->name);
 #endif
 
     if (!info
-    || serial_paranoia_check(info, tty->device, "cy_close")){
+    || serial_paranoia_check(info, tty->name, "cy_close")){
         return;
     }
 #ifdef SERIAL_DEBUG_OPEN
-    printk("cy_close ttyS%d, count = %d\n", info->line, info->count);
+    printk("cy_close %s, count = %d\n", tty->name, info->count);
 #endif
 
     if ((tty->count == 1) && (info->count != 1)) {
@@ -1913,8 +1913,8 @@
     if (info->flags & ASYNC_INITIALIZED)
 	tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
     shutdown(info);
-    if (tty->driver.flush_buffer)
-	tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+	tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
 	tty->ldisc.flush_buffer(tty);
     info->event = 0;
@@ -1954,10 +1954,10 @@
   struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
 	
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_hangup ttyS%d\n", info->line); /* */
+    printk("cy_hangup %s\n", tty->name); /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->device, "cy_hangup"))
+    if (serial_paranoia_check(info, tty->name, "cy_hangup"))
 	return;
     
     shutdown(info);
@@ -2008,7 +2008,7 @@
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 	if (info->flags & ASYNC_NORMAL_ACTIVE){
 	    return -EBUSY;
 	}
@@ -2048,8 +2048,8 @@
     retval = 0;
     add_wait_queue(&info->open_wait, &wait);
 #ifdef SERIAL_DEBUG_OPEN
-    printk("block_til_ready before block: ttyS%d, count = %d\n",
-	   info->line, info->count);/**/
+    printk("block_til_ready before block: %s, count = %d\n",
+	   tty->name, info->count);/**/
 #endif
     info->count--;
 #ifdef SERIAL_DEBUG_COUNT
@@ -2098,8 +2098,8 @@
 	    break;
 	}
 #ifdef SERIAL_DEBUG_OPEN
-	printk("block_til_ready blocking: ttyS%d, count = %d\n",
-	       info->line, info->count);/**/
+	printk("block_til_ready blocking: %s, count = %d\n",
+	       tty->name, info->count);/**/
 #endif
 	schedule();
     }
@@ -2113,8 +2113,8 @@
     }
     info->blocked_open--;
 #ifdef SERIAL_DEBUG_OPEN
-    printk("block_til_ready after blocking: ttyS%d, count = %d\n",
-	   info->line, info->count);/**/
+    printk("block_til_ready after blocking: %s, count = %d\n",
+	   tty->name, info->count);/**/
 #endif
     if (retval)
 	    return retval;
@@ -2133,7 +2133,7 @@
   int retval, line;
 
 /* CP('O'); */
-    line = minor(tty->device) - tty->driver.minor_start;
+    line = tty->index;
     if ((line < 0) || (NR_PORTS <= line)){
         return -ENODEV;
     }
@@ -2142,13 +2142,13 @@
         return -ENODEV;
     }
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_open ttyS%d\n", info->line); /* */
+    printk("cy_open %s\n", tty->name); /* */
 #endif
-    if (serial_paranoia_check(info, tty->device, "cy_open")){
+    if (serial_paranoia_check(info, tty->name, "cy_open")){
         return -ENODEV;
     }
 #ifdef SERIAL_DEBUG_OPEN
-    printk("cy_open ttyS%d, count = %d\n", info->line, info->count);/**/
+    printk("cy_open %s, count = %d\n", tty->name, info->count);/**/
 #endif
     info->count++;
 #ifdef SERIAL_DEBUG_COUNT
@@ -2165,7 +2165,7 @@
     }
 
     if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-	if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+	if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 	    *tty->termios = info->normal_termios;
 	else 
 	    *tty->termios = info->callout_termios;
@@ -2396,7 +2396,7 @@
     memset(&cy_serial_driver, 0, sizeof(struct tty_driver));
     cy_serial_driver.magic = TTY_DRIVER_MAGIC;
 #ifdef CONFIG_DEVFS_FS
-    cy_serial_driver.name = "tts/%d";
+    cy_serial_driver.name = "tts/";
 #else
     cy_serial_driver.name = "ttyS";
 #endif
@@ -2435,7 +2435,7 @@
      */
     cy_callout_driver = cy_serial_driver;
 #ifdef CONFIG_DEVFS_FS
-    cy_callout_driver.name = "cua/%d";
+    cy_callout_driver.name = "cua/";
 #else
     cy_callout_driver.name = "cua";
 #endif
diff -urN linux-2.5.68-bk4/drivers/char/serial_tx3912.c linux-2.5.68-bk5/drivers/char/serial_tx3912.c
--- linux-2.5.68-bk4/drivers/char/serial_tx3912.c	2003-04-19 19:49:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/serial_tx3912.c	2003-04-24 04:34:51.000000000 -0700
@@ -547,7 +547,7 @@
 		return -EIO;
 	}
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	rs_dprintk (TX3912_UART_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p)\n", 
 	            (int) current->pid, line, tty, current->tty);
 
@@ -602,7 +602,7 @@
 	/* tty->low_latency = 1; */
 
 	if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = port->gs.normal_termios;
 		else 
 			*tty->termios = port->gs.callout_termios;
diff -urN linux-2.5.68-bk4/drivers/char/sh-sci.c linux-2.5.68-bk5/drivers/char/sh-sci.c
--- linux-2.5.68-bk4/drivers/char/sh-sci.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/sh-sci.c	2003-04-24 04:34:51.000000000 -0700
@@ -812,7 +812,7 @@
 	struct sci_port *port;
 	int retval, line;
 
-	line = minor(tty->device) - SCI_MINOR_START;
+	line = tty->index;
 
 	if ((line < 0) || (line >= SCI_NPORTS))
 		return -ENODEV;
@@ -853,7 +853,7 @@
 	}
 
 	if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = port->gs.normal_termios;
 		else 
 			*tty->termios = port->gs.callout_termios;
@@ -1021,7 +1021,7 @@
 	sci_driver.magic = TTY_DRIVER_MAGIC;
 	sci_driver.driver_name = "sci";
 #ifdef CONFIG_DEVFS_FS
-	sci_driver.name = "ttsc/%d";
+	sci_driver.name = "ttsc/";
 #else
 	sci_driver.name = "ttySC";
 #endif
@@ -1060,7 +1060,7 @@
 
 	sci_callout_driver = sci_driver;
 #ifdef CONFIG_DEVFS_FS
-	sci_callout_driver.name = "cusc/%d";
+	sci_callout_driver.name = "cusc/";
 #else
 	sci_callout_driver.name = "cusc";
 #endif
diff -urN linux-2.5.68-bk4/drivers/char/specialix.c linux-2.5.68-bk5/drivers/char/specialix.c
--- linux-2.5.68-bk4/drivers/char/specialix.c	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/specialix.c	2003-04-24 04:34:51.000000000 -0700
@@ -210,7 +210,7 @@
 
 
 static inline int sx_paranoia_check(struct specialix_port const * port,
-				    kdev_t device, const char *routine)
+				    char *name, const char *routine)
 {
 #ifdef SPECIALIX_PARANOIA_CHECK
 	static const char *badmagic =
@@ -219,11 +219,11 @@
 		KERN_ERR "sx: Warning: null specialix port for device %s in %s\n";
  
 	if (!port) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (port->magic != SPECIALIX_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -1349,7 +1349,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SPECIALIX_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SPECIALIX_TYPE_CALLOUT) {
 		if (port->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1454,20 +1454,20 @@
 	struct specialix_board * bp;
 	unsigned long flags;
 	
-	board = SX_BOARD(minor(tty->device));
+	board = SX_BOARD(tty->index);
 
 	if (board >= SX_NBOARD || !(sx_board[board].flags & SX_BOARD_PRESENT))
 		return -ENODEV;
 	
 	bp = &sx_board[board];
-	port = sx_port + board * SX_NPORT + SX_PORT(minor(tty->device));
+	port = sx_port + board * SX_NPORT + SX_PORT(tty->index);
 
 #ifdef DEBUG_SPECIALIX
 	printk (KERN_DEBUG "Board = %d, bp = %p, port = %p, portno = %d.\n", 
-	        board, bp, port, SX_PORT(minor(tty->device)));
+	        board, bp, port, SX_PORT(tty->index));
 #endif
 
-	if (sx_paranoia_check(port, tty->device, "sx_open"))
+	if (sx_paranoia_check(port, tty->name, "sx_open"))
 		return -ENODEV;
 
 	if ((error = sx_setup_board(bp)))
@@ -1484,7 +1484,7 @@
 		return error;
 
 	if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SPECIALIX_TYPE_NORMAL)
+		if (tty->driver->subtype == SPECIALIX_TYPE_NORMAL)
 			*tty->termios = port->normal_termios;
 		else
 			*tty->termios = port->callout_termios;
@@ -1506,7 +1506,7 @@
 	unsigned long flags;
 	unsigned long timeout;
 	
-	if (!port || sx_paranoia_check(port, tty->device, "close"))
+	if (!port || sx_paranoia_check(port, tty->name, "close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1576,8 +1576,8 @@
 
 	}
 	sx_shutdown_port(bp, port);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1605,7 +1605,7 @@
 	int c, total = 0;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_write"))
+	if (sx_paranoia_check(port, tty->name, "sx_write"))
 		return 0;
 	
 	bp = port_Board(port);
@@ -1679,7 +1679,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	unsigned long flags;
 
-	if (sx_paranoia_check(port, tty->device, "sx_put_char"))
+	if (sx_paranoia_check(port, tty->name, "sx_put_char"))
 		return;
 
 	if (!tty || !port->xmit_buf)
@@ -1704,7 +1704,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_flush_chars"))
+	if (sx_paranoia_check(port, tty->name, "sx_flush_chars"))
 		return;
 	
 	if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1724,7 +1724,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	int	ret;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_write_room"))
+	if (sx_paranoia_check(port, tty->name, "sx_write_room"))
 		return 0;
 
 	ret = SERIAL_XMIT_SIZE - port->xmit_cnt - 1;
@@ -1738,7 +1738,7 @@
 {
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_chars_in_buffer"))
+	if (sx_paranoia_check(port, tty->name, "sx_chars_in_buffer"))
 		return 0;
 	
 	return port->xmit_cnt;
@@ -1750,7 +1750,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_flush_buffer"))
+	if (sx_paranoia_check(port, tty->name, "sx_flush_buffer"))
 		return;
 
 	save_flags(flags); cli();
@@ -1976,7 +1976,7 @@
 	int error;
 	int retval;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_ioctl"))
+	if (sx_paranoia_check(port, tty->name, "sx_ioctl"))
 		return -ENODEV;
 	
 	switch (cmd) {
@@ -2035,7 +2035,7 @@
 	struct specialix_board *bp;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_throttle"))
+	if (sx_paranoia_check(port, tty->name, "sx_throttle"))
 		return;
 	
 	bp = port_Board(port);
@@ -2070,7 +2070,7 @@
 	struct specialix_board *bp;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_unthrottle"))
+	if (sx_paranoia_check(port, tty->name, "sx_unthrottle"))
 		return;
 	
 	bp = port_Board(port);
@@ -2098,7 +2098,7 @@
 	struct specialix_board *bp;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_stop"))
+	if (sx_paranoia_check(port, tty->name, "sx_stop"))
 		return;
 	
 	bp = port_Board(port);
@@ -2117,7 +2117,7 @@
 	struct specialix_board *bp;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_start"))
+	if (sx_paranoia_check(port, tty->name, "sx_start"))
 		return;
 	
 	bp = port_Board(port);
@@ -2158,7 +2158,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	struct specialix_board *bp;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_hangup"))
+	if (sx_paranoia_check(port, tty->name, "sx_hangup"))
 		return;
 	
 	bp = port_Board(port);
@@ -2177,7 +2177,7 @@
 	struct specialix_port *port = (struct specialix_port *)tty->driver_data;
 	unsigned long flags;
 				
-	if (sx_paranoia_check(port, tty->device, "sx_set_termios"))
+	if (sx_paranoia_check(port, tty->name, "sx_set_termios"))
 		return;
 	
 	if (tty->termios->c_cflag == old_termios->c_cflag &&
diff -urN linux-2.5.68-bk4/drivers/char/stallion.c linux-2.5.68-bk5/drivers/char/stallion.c
--- linux-2.5.68-bk4/drivers/char/stallion.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/stallion.c	2003-04-24 04:34:51.000000000 -0700
@@ -1017,11 +1017,11 @@
 	int		brdnr, panelnr, portnr, rc;
 
 #if DEBUG
-	printk("stl_open(tty=%x,filp=%x): device=%x\n", (int) tty,
-		(int) filp, tty->device);
+	printk("stl_open(tty=%x,filp=%x): device=%s\n", (int) tty,
+		(int) filp, tty->name);
 #endif
 
-	minordev = minor(tty->device);
+	minordev = tty->index;
 	brdnr = MINOR2BRD(minordev);
 	if (brdnr >= stl_nrbrds)
 		return(-ENODEV);
@@ -1090,7 +1090,7 @@
  *	previous opens still in effect. If we are a normal serial device
  *	then also we might have to wait for carrier.
  */
-	if (tty->driver.subtype == STL_DRVTYPCALLOUT) {
+	if (tty->driver->subtype == STL_DRVTYPCALLOUT) {
 		if (portp->flags & ASYNC_NORMAL_ACTIVE)
 			return(-EBUSY);
 		if (portp->flags & ASYNC_CALLOUT_ACTIVE) {
@@ -1114,7 +1114,7 @@
 	}
 
 	if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == STL_DRVTYPSERIAL)
+		if (tty->driver->subtype == STL_DRVTYPSERIAL)
 			*tty->termios = portp->normaltermios;
 		else
 			*tty->termios = portp->callouttermios;
diff -urN linux-2.5.68-bk4/drivers/char/sx.c linux-2.5.68-bk5/drivers/char/sx.c
--- linux-2.5.68-bk4/drivers/char/sx.c	2003-04-19 19:49:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/sx.c	2003-04-24 04:34:51.000000000 -0700
@@ -441,7 +441,7 @@
 /* This doesn't work. Who's paranoid around here? Not me! */
 
 static inline int sx_paranoia_check(struct sx_port const * port,
-				    kdev_t device, const char *routine)
+				    char *name, const char *routine)
 {
 
 	static const char *badmagic =
@@ -450,11 +450,11 @@
 	  KERN_ERR "sx: Warning: null sx port for device %s in %s\n";
  
 	if (!port) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (port->magic != SX_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 
@@ -1434,7 +1434,7 @@
 		return -EIO;
 	}
 
-	line = minor(tty->device);
+	line = tty->index;
 	sx_dprintk (SX_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p, np=%d)\n", 
 	            current->pid, line, tty, current->tty, sx_nports);
 
@@ -1500,7 +1500,7 @@
 	/* tty->low_latency = 1; */
 
 	if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = port->gs.normal_termios;
 		else 
 			*tty->termios = port->gs.callout_termios;
diff -urN linux-2.5.68-bk4/drivers/char/synclink.c linux-2.5.68-bk5/drivers/char/synclink.c
--- linux-2.5.68-bk4/drivers/char/synclink.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/synclink.c	2003-04-24 04:34:51.000000000 -0700
@@ -978,7 +978,7 @@
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int mgsl_paranoia_check(struct mgsl_struct *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef MGSL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -987,11 +987,11 @@
 		"Warning: null mgsl_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != MGSL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -1008,7 +1008,7 @@
 	struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_stop"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_stop"))
 		return;
 	
 	if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -1031,7 +1031,7 @@
 	struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
 	unsigned long flags;
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_start"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_start"))
 		return;
 	
 	if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -2048,7 +2048,7 @@
 			__FILE__,__LINE__,ch,info->device_name);
 	}		
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_put_char"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char"))
 		return;
 
 	if (!tty || !info->xmit_buf)
@@ -2086,7 +2086,7 @@
 		printk( "%s(%d):mgsl_flush_chars() entry on %s xmit_cnt=%d\n",
 			__FILE__,__LINE__,info->device_name,info->xmit_cnt);
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_flush_chars"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -2139,7 +2139,7 @@
 		printk( "%s(%d):mgsl_write(%s) count=%d\n",
 			__FILE__,__LINE__,info->device_name,count);
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_write"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_write"))
 		goto cleanup;
 
 	if (!tty || !info->xmit_buf || !tmp_buf)
@@ -2315,7 +2315,7 @@
 	struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
 	int	ret;
 				
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_write_room"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -2353,7 +2353,7 @@
 		printk("%s(%d):mgsl_chars_in_buffer(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
 			 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_chars_in_buffer"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_chars_in_buffer"))
 		return 0;
 		
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2388,7 +2388,7 @@
 		printk("%s(%d):mgsl_flush_buffer(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_flush_buffer"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_flush_buffer"))
 		return;
 		
 	spin_lock_irqsave(&info->irq_spinlock,flags); 
@@ -2420,7 +2420,7 @@
 		printk("%s(%d):mgsl_send_xchar(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, ch );
 			 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_send_xchar"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_send_xchar"))
 		return;
 
 	info->x_char = ch;
@@ -2449,7 +2449,7 @@
 		printk("%s(%d):mgsl_throttle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_throttle"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -2479,7 +2479,7 @@
 		printk("%s(%d):mgsl_unthrottle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_unthrottle"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -2989,7 +2989,7 @@
 		printk("%s(%d):mgsl_break(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, break_state);
 			 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_break"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_break"))
 		return;
 
 	spin_lock_irqsave(&info->irq_spinlock,flags);
@@ -3021,7 +3021,7 @@
 		printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__,
 			info->device_name, cmd );
 	
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_ioctl"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -3125,7 +3125,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_set_termios %s\n", __FILE__,__LINE__,
-			tty->driver.name );
+			tty->driver->name );
 	
 	/* just return if nothing has changed */
 	if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -3182,7 +3182,7 @@
 {
 	struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data;
 
-	if (!info || mgsl_paranoia_check(info, tty->device, "mgsl_close"))
+	if (!info || mgsl_paranoia_check(info, tty->name, "mgsl_close"))
 		return;
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -3237,8 +3237,8 @@
  	if (info->flags & ASYNC_INITIALIZED)
  		mgsl_wait_until_sent(tty, info->timeout);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 		
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
@@ -3264,7 +3264,7 @@
 cleanup:			
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_close(%s) exit, count=%d\n", __FILE__,__LINE__,
-			tty->driver.name, info->count);
+			tty->driver->name, info->count);
 			
 }	/* end of mgsl_close() */
 
@@ -3291,7 +3291,7 @@
 		printk("%s(%d):mgsl_wait_until_sent(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
       
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_wait_until_sent"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_wait_until_sent"))
 		return;
 
 	if (!(info->flags & ASYNC_INITIALIZED))
@@ -3360,7 +3360,7 @@
 		printk("%s(%d):mgsl_hangup(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
 			 
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_hangup"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_hangup"))
 		return;
 
 	mgsl_flush_buffer(tty);
@@ -3397,9 +3397,9 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready on %s\n",
-			 __FILE__,__LINE__, tty->driver.name );
+			 __FILE__,__LINE__, tty->driver->name );
 
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		/* this is a callout device */
 		/* just verify that normal device is not in use */
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -3445,7 +3445,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready before block on %s count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 
 	spin_lock_irqsave(&info->irq_spinlock, flags);
 	if (!tty_hung_up_p(filp)) {
@@ -3489,7 +3489,7 @@
 		
 		if (debug_level >= DEBUG_LEVEL_INFO)
 			printk("%s(%d):block_til_ready blocking on %s count=%d\n",
-				 __FILE__,__LINE__, tty->driver.name, info->count );
+				 __FILE__,__LINE__, tty->driver->name, info->count );
 				 
 		schedule();
 	}
@@ -3503,7 +3503,7 @@
 	
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready after blocking on %s count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 			 
 	if (!retval)
 		info->flags |= ASYNC_NORMAL_ACTIVE;
@@ -3530,7 +3530,7 @@
 	unsigned long flags;
 
 	/* verify range of specified line number */	
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= mgsl_device_count)) {
 		printk("%s(%d):mgsl_open with illegal line #%d.\n",
 			__FILE__,__LINE__,line);
@@ -3549,12 +3549,12 @@
 	
 	tty->driver_data = info;
 	info->tty = tty;
-	if (mgsl_paranoia_check(info, tty->device, "mgsl_open"))
+	if (mgsl_paranoia_check(info, tty->name, "mgsl_open"))
 		return -ENODEV;
 		
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_open(%s), old ref count = %d\n",
-			 __FILE__,__LINE__,tty->driver.name, info->count);
+			 __FILE__,__LINE__,tty->driver->name, info->count);
 
 	/* If port is closing, signal caller to try again */
 	if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -3605,7 +3605,7 @@
 
 	if ((info->count == 1) &&
 	    info->flags & ASYNC_SPLIT_TERMIOS) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -4608,7 +4608,7 @@
 		/* Copy user configuration info to device instance data */
 		info->io_base = (unsigned int)io[i];
 		info->irq_level = (unsigned int)irq[i];
-		info->irq_level = irq_cannonicalize(info->irq_level);
+		info->irq_level = irq_canonicalize(info->irq_level);
 		info->dma_level = (unsigned int)dma[i];
 		info->bus_type = MGSL_BUS_TYPE_ISA;
 		info->io_addr_size = 16;
diff -urN linux-2.5.68-bk4/drivers/char/synclinkmp.c linux-2.5.68-bk5/drivers/char/synclinkmp.c
--- linux-2.5.68-bk4/drivers/char/synclinkmp.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/synclinkmp.c	2003-04-24 04:34:51.000000000 -0700
@@ -710,7 +710,7 @@
 static void* synclinkmp_get_text_ptr() {return synclinkmp_get_text_ptr;}
 
 static inline int sanity_check(SLMP_INFO *info,
-			       kdev_t device, const char *routine)
+			       char *name, const char *routine)
 {
 #ifdef SANITY_CHECK
 	static const char *badmagic =
@@ -719,11 +719,11 @@
 		"Warning: null synclinkmp_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != MGSL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -740,7 +740,7 @@
 	int retval, line;
 	unsigned long flags;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= synclinkmp_device_count)) {
 		printk("%s(%d): open with illegal line #%d.\n",
 			__FILE__,__LINE__,line);
@@ -764,12 +764,12 @@
 
 	tty->driver_data = info;
 	info->tty = tty;
-	if (sanity_check(info, tty->device, "open"))
+	if (sanity_check(info, tty->name, "open"))
 		return -ENODEV;
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s open(), old ref count = %d\n",
-			 __FILE__,__LINE__,tty->driver.name, info->count);
+			 __FILE__,__LINE__,tty->driver->name, info->count);
 
 	/* If port is closing, signal caller to try again */
 	if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -808,7 +808,7 @@
 
 	if ((info->count == 1) &&
 	    info->flags & ASYNC_SPLIT_TERMIOS) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else
 			*tty->termios = info->callout_termios;
@@ -839,7 +839,7 @@
 {
 	SLMP_INFO * info = (SLMP_INFO *)tty->driver_data;
 
-	if (!info || sanity_check(info, tty->device, "close"))
+	if (!info || sanity_check(info, tty->name, "close"))
 		return;
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -895,8 +895,8 @@
  	if (info->flags & ASYNC_INITIALIZED)
  		wait_until_sent(tty, info->timeout);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
@@ -922,7 +922,7 @@
 cleanup:
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s close() exit, count=%d\n", __FILE__,__LINE__,
-			tty->driver.name, info->count);
+			tty->driver->name, info->count);
 }
 
 /* Called by tty_hangup() when a hangup is signaled.
@@ -936,7 +936,7 @@
 		printk("%s(%d):%s hangup()\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (sanity_check(info, tty->device, "hangup"))
+	if (sanity_check(info, tty->name, "hangup"))
 		return;
 
 	flush_buffer(tty);
@@ -958,7 +958,7 @@
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s set_termios()\n", __FILE__,__LINE__,
-			tty->driver.name );
+			tty->driver->name );
 
 	/* just return if nothing has changed */
 	if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -1020,7 +1020,7 @@
 		printk("%s(%d):%s write() count=%d\n",
 		       __FILE__,__LINE__,info->device_name,count);
 
-	if (sanity_check(info, tty->device, "write"))
+	if (sanity_check(info, tty->name, "write"))
 		goto cleanup;
 
 	if (!tty || !info->tx_buf)
@@ -1109,7 +1109,7 @@
 			__FILE__,__LINE__,info->device_name,ch);
 	}
 
-	if (sanity_check(info, tty->device, "put_char"))
+	if (sanity_check(info, tty->name, "put_char"))
 		return;
 
 	if (!tty || !info->tx_buf)
@@ -1142,7 +1142,7 @@
 		printk("%s(%d):%s send_xchar(%d)\n",
 			 __FILE__,__LINE__, info->device_name, ch );
 
-	if (sanity_check(info, tty->device, "send_xchar"))
+	if (sanity_check(info, tty->name, "send_xchar"))
 		return;
 
 	info->x_char = ch;
@@ -1169,7 +1169,7 @@
 		printk("%s(%d):%s wait_until_sent() entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (sanity_check(info, tty->device, "wait_until_sent"))
+	if (sanity_check(info, tty->name, "wait_until_sent"))
 		return;
 
 	if (!(info->flags & ASYNC_INITIALIZED))
@@ -1228,7 +1228,7 @@
 	SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
 	int ret;
 
-	if (sanity_check(info, tty->device, "write_room"))
+	if (sanity_check(info, tty->name, "write_room"))
 		return 0;
 
 	if (info->params.mode == MGSL_MODE_HDLC) {
@@ -1257,7 +1257,7 @@
 		printk( "%s(%d):%s flush_chars() entry tx_count=%d\n",
 			__FILE__,__LINE__,info->device_name,info->tx_count);
 
-	if (sanity_check(info, tty->device, "flush_chars"))
+	if (sanity_check(info, tty->name, "flush_chars"))
 		return;
 
 	if (info->tx_count <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1296,7 +1296,7 @@
 		printk("%s(%d):%s flush_buffer() entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (sanity_check(info, tty->device, "flush_buffer"))
+	if (sanity_check(info, tty->name, "flush_buffer"))
 		return;
 
 	spin_lock_irqsave(&info->lock,flags);
@@ -1317,7 +1317,7 @@
 	SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
 	unsigned long flags;
 
-	if (sanity_check(info, tty->device, "tx_hold"))
+	if (sanity_check(info, tty->name, "tx_hold"))
 		return;
 
 	if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -1337,7 +1337,7 @@
 	SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
 	unsigned long flags;
 
-	if (sanity_check(info, tty->device, "tx_release"))
+	if (sanity_check(info, tty->name, "tx_release"))
 		return;
 
 	if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -1374,7 +1374,7 @@
 		printk("%s(%d):%s ioctl() cmd=%08X\n", __FILE__,__LINE__,
 			info->device_name, cmd );
 
-	if (sanity_check(info, tty->device, "ioctl"))
+	if (sanity_check(info, tty->name, "ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1566,7 +1566,7 @@
 {
 	SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
 
-	if (sanity_check(info, tty->device, "chars_in_buffer"))
+	if (sanity_check(info, tty->name, "chars_in_buffer"))
 		return 0;
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1587,7 +1587,7 @@
 		printk("%s(%d):%s throttle() entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (sanity_check(info, tty->device, "throttle"))
+	if (sanity_check(info, tty->name, "throttle"))
 		return;
 
 	if (I_IXOFF(tty))
@@ -1612,7 +1612,7 @@
 		printk("%s(%d):%s unthrottle() entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
-	if (sanity_check(info, tty->device, "unthrottle"))
+	if (sanity_check(info, tty->name, "unthrottle"))
 		return;
 
 	if (I_IXOFF(tty)) {
@@ -1643,7 +1643,7 @@
 		printk("%s(%d):%s set_break(%d)\n",
 			 __FILE__,__LINE__, info->device_name, break_state);
 
-	if (sanity_check(info, tty->device, "set_break"))
+	if (sanity_check(info, tty->name, "set_break"))
 		return;
 
 	spin_lock_irqsave(&info->lock,flags);
@@ -3199,9 +3199,9 @@
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s block_til_ready()\n",
-			 __FILE__,__LINE__, tty->driver.name );
+			 __FILE__,__LINE__, tty->driver->name );
 
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		/* this is a callout device */
 		/* just verify that normal device is not in use */
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -3247,7 +3247,7 @@
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s block_til_ready() before block, count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 
 	spin_lock_irqsave(&info->lock, flags);
 	if (!tty_hung_up_p(filp)) {
@@ -3291,7 +3291,7 @@
 
 		if (debug_level >= DEBUG_LEVEL_INFO)
 			printk("%s(%d):%s block_til_ready() count=%d\n",
-				 __FILE__,__LINE__, tty->driver.name, info->count );
+				 __FILE__,__LINE__, tty->driver->name, info->count );
 
 		schedule();
 	}
@@ -3305,7 +3305,7 @@
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s block_til_ready() after, count=%d\n",
-			 __FILE__,__LINE__, tty->driver.name, info->count );
+			 __FILE__,__LINE__, tty->driver->name, info->count );
 
 	if (!retval)
 		info->flags |= ASYNC_NORMAL_ACTIVE;
diff -urN linux-2.5.68-bk4/drivers/char/tty_io.c linux-2.5.68-bk5/drivers/char/tty_io.c
--- linux-2.5.68-bk4/drivers/char/tty_io.c	2003-04-19 19:50:00.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/tty_io.c	2003-04-24 04:34:51.000000000 -0700
@@ -126,8 +126,8 @@
 struct tty_ldisc ldiscs[NR_LDISCS];	/* line disc dispatch table	*/
 
 #ifdef CONFIG_UNIX98_PTYS
-extern struct tty_driver ptm_driver[];	/* Unix98 pty masters; for /dev/ptmx */
-extern struct tty_driver pts_driver[];	/* Unix98 pty slaves;  for /dev/ptmx */
+extern struct tty_driver ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
+extern struct tty_driver pts_driver;	/* Unix98 pty slaves;  for /dev/ptmx */
 #endif
 
 extern void disable_early_printk(void);
@@ -172,31 +172,17 @@
 	kfree(tty);
 }
 
-/*
- * This routine returns the name of tty.
- */
-static char *
-_tty_make_name(struct tty_struct *tty, const char *name, char *buf)
-{
-	int idx = (tty)? minor(tty->device) - tty->driver.minor_start:0;
+#define TTY_NUMBER(tty) ((tty)->index + (tty)->driver->name_base)
 
+char *tty_name(struct tty_struct *tty, char *buf)
+{
 	if (!tty) /* Hmm.  NULL pointer.  That's fun. */
 		strcpy(buf, "NULL tty");
 	else
-		sprintf(buf, name,
-			idx + tty->driver.name_base);
-		
+		strcpy(buf, tty->name);
 	return buf;
 }
 
-#define TTY_NUMBER(tty) (minor((tty)->device) - (tty)->driver.minor_start + \
-			 (tty)->driver.name_base)
-
-char *tty_name(struct tty_struct *tty, char *buf)
-{
-	return _tty_make_name(tty, (tty)?tty->driver.name:NULL, buf);
-}
-
 EXPORT_SYMBOL(tty_name);
 
 inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device,
@@ -231,14 +217,14 @@
 		count++;
 	}
 	file_list_unlock();
-	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-	    tty->driver.subtype == PTY_TYPE_SLAVE &&
+	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+	    tty->driver->subtype == PTY_TYPE_SLAVE &&
 	    tty->link && tty->link->count)
 		count++;
 	if (tty->count != count) {
 		printk(KERN_WARNING "Warning: dev (%s) tty->count(%d) "
 				    "!= #fd's(%d) in %s\n",
-		       cdevname(tty->device), tty->count, count, routine);
+		       tty->name, tty->count, count, routine);
 		return count;
        }	
 #endif
@@ -319,29 +305,23 @@
 		module_put(o_ldisc.owner);
 	}
 	
-	if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
-		tty->driver.set_ldisc(tty);
+	if (tty->ldisc.num != o_ldisc.num && tty->driver->set_ldisc)
+		tty->driver->set_ldisc(tty);
 	return retval;
 }
 
 /*
  * This routine returns a tty driver structure, given a device number
  */
-struct tty_driver *get_tty_driver(kdev_t device)
+struct tty_driver *get_tty_driver(dev_t device, int *index)
 {
-	int	major, minor;
 	struct tty_driver *p;
-	
-	minor = minor(device);
-	major = major(device);
 
 	list_for_each_entry(p, &tty_drivers, tty_drivers) {
-		if (p->major != major)
-			continue;
-		if (minor < p->minor_start)
-			continue;
-		if (minor >= p->minor_start + p->num)
+		dev_t base = MKDEV(p->major, p->minor_start);
+		if (device < base || device >= base + p->num)
 			continue;
+		*index = device - base;
 		return p;
 	}
 	return NULL;
@@ -466,8 +446,8 @@
 		local_irq_save(flags); // FIXME: is this safe?
 		if (tty->ldisc.flush_buffer)
 			tty->ldisc.flush_buffer(tty);
-		if (tty->driver.flush_buffer)
-			tty->driver.flush_buffer(tty);
+		if (tty->driver->flush_buffer)
+			tty->driver->flush_buffer(tty);
 		if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
 		    tty->ldisc.write_wakeup)
 			(tty->ldisc.write_wakeup)(tty);
@@ -481,8 +461,8 @@
 	 * Shutdown the current line discipline, and reset it to
 	 * N_TTY.
 	 */
-	if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS)
-		*tty->termios = tty->driver.init_termios;
+	if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS)
+		*tty->termios = tty->driver->init_termios;
 	if (tty->ldisc.num != ldiscs[N_TTY].num) {
 		if (tty->ldisc.close)
 			(tty->ldisc.close)(tty);
@@ -525,11 +505,11 @@
 	 *	So we just call close() the right number of times.
 	 */
 	if (cons_filp) {
-		if (tty->driver.close)
+		if (tty->driver->close)
 			for (n = 0; n < closecount; n++)
-				tty->driver.close(tty, cons_filp);
-	} else if (tty->driver.hangup)
-		(tty->driver.hangup)(tty);
+				tty->driver->close(tty, cons_filp);
+	} else if (tty->driver->hangup)
+		(tty->driver->hangup)(tty);
 	unlock_kernel();
 }
 
@@ -589,7 +569,7 @@
 	tty = current->tty;
 	if (tty) {
 		tty_pgrp = tty->pgrp;
-		if (on_exit && tty->driver.type != TTY_DRIVER_TYPE_PTY)
+		if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
 			tty_vhangup(tty);
 	} else {
 		if (current->tty_old_pgrp) {
@@ -626,8 +606,8 @@
 		tty->ctrl_status |= TIOCPKT_STOP;
 		wake_up_interruptible(&tty->link->read_wait);
 	}
-	if (tty->driver.stop)
-		(tty->driver.stop)(tty);
+	if (tty->driver->stop)
+		(tty->driver->stop)(tty);
 }
 
 void start_tty(struct tty_struct *tty)
@@ -640,8 +620,8 @@
 		tty->ctrl_status |= TIOCPKT_START;
 		wake_up_interruptible(&tty->link->read_wait);
 	}
-	if (tty->driver.start)
-		(tty->driver.start)(tty);
+	if (tty->driver->start)
+		(tty->driver->start)(tty);
 	if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
 	    tty->ldisc.write_wakeup)
 		(tty->ldisc.write_wakeup)(tty);
@@ -768,7 +748,7 @@
 		tty = (struct tty_struct *)file->private_data;
 	if (tty_paranoia_check(tty, inode->i_rdev, "tty_write"))
 		return -EIO;
-	if (!tty || !tty->driver.write || (test_bit(TTY_IO_ERROR, &tty->flags)))
+	if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags)))
 		return -EIO;
 #if 0
 	if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) &&
@@ -802,26 +782,24 @@
 
 static void release_mem(struct tty_struct *tty, int idx);
 
+static inline void tty_line_name(struct tty_driver *driver, int index, char *p)
+{
+	sprintf(p, "%s%d", driver->name, index + driver->name_base);
+}
+
 /*
  * WSH 06/09/97: Rewritten to remove races and properly clean up after a
  * failed open.  The new code protects the open with a semaphore, so it's
  * really quite straightforward.  The semaphore locking can probably be
  * relaxed for the (most common) case of reopening a tty.
  */
-static int init_dev(kdev_t device, struct tty_struct **ret_tty)
+static int init_dev(struct tty_driver *driver, int idx,
+	struct tty_struct **ret_tty)
 {
 	struct tty_struct *tty, *o_tty;
 	struct termios *tp, **tp_loc, *o_tp, **o_tp_loc;
 	struct termios *ltp, **ltp_loc, *o_ltp, **o_ltp_loc;
-	struct tty_driver *driver;	
 	int retval=0;
-	int idx;
-
-	driver = get_tty_driver(device);
-	if (!driver)
-		return -ENODEV;
-
-	idx = minor(device) - driver->minor_start;
 
 	/* 
 	 * Check whether we need to acquire the tty semaphore to avoid
@@ -854,8 +832,10 @@
 	if(!tty)
 		goto fail_no_mem;
 	initialize_tty_struct(tty);
-	tty->device = device;
-	tty->driver = *driver;
+	tty->device = MKDEV(driver->major, driver->minor_start) + idx;
+	tty->driver = driver;
+	tty->index = idx;
+	tty_line_name(driver, idx, tty->name);
 
 	tp_loc = &driver->termios[idx];
 	if (!*tp_loc) {
@@ -880,9 +860,11 @@
 		if (!o_tty)
 			goto free_mem_out;
 		initialize_tty_struct(o_tty);
-		o_tty->device = mk_kdev(driver->other->major,
-					driver->other->minor_start + idx);
-		o_tty->driver = *driver->other;
+		o_tty->device = MKDEV(driver->other->major,
+					driver->other->minor_start) + idx;
+		o_tty->driver = driver->other;
+		o_tty->index = idx;
+		tty_line_name(driver->other, idx, o_tty->name);
 
 		o_tp_loc  = &driver->other->termios[idx];
 		if (!*o_tp_loc) {
@@ -981,7 +963,7 @@
 		tty->link->count++;
 	}
 	tty->count++;
-	tty->driver = *driver; /* N.B. why do this every time?? */
+	tty->driver = driver; /* N.B. why do this every time?? */
 
 success:
 	*ret_tty = tty;
@@ -1026,32 +1008,32 @@
 	struct termios *tp;
 
 	if ((o_tty = tty->link) != NULL) {
-		o_tty->driver.table[idx] = NULL;
-		if (o_tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
-			tp = o_tty->driver.termios[idx];
-			o_tty->driver.termios[idx] = NULL;
+		o_tty->driver->table[idx] = NULL;
+		if (o_tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
+			tp = o_tty->driver->termios[idx];
+			o_tty->driver->termios[idx] = NULL;
 			kfree(tp);
 		}
 		o_tty->magic = 0;
-		(*o_tty->driver.refcount)--;
+		(*o_tty->driver->refcount)--;
 		file_list_lock();
 		list_del(&o_tty->tty_files);
 		file_list_unlock();
 		free_tty_struct(o_tty);
 	}
 
-	tty->driver.table[idx] = NULL;
-	if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
-		tp = tty->driver.termios[idx];
-		tty->driver.termios[idx] = NULL;
+	tty->driver->table[idx] = NULL;
+	if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
+		tp = tty->driver->termios[idx];
+		tty->driver->termios[idx] = NULL;
 		kfree(tp);
 	}
 	tty->magic = 0;
-	(*tty->driver.refcount)--;
+	(*tty->driver->refcount)--;
 	file_list_lock();
 	list_del(&tty->tty_files);
 	file_list_unlock();
-	module_put(tty->driver.owner);
+	module_put(tty->driver->owner);
 	free_tty_struct(tty);
 }
 
@@ -1078,32 +1060,32 @@
 
 	tty_fasync(-1, filp, 0);
 
-	idx = minor(tty->device) - tty->driver.minor_start;
-	pty_master = (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-		      tty->driver.subtype == PTY_TYPE_MASTER);
+	idx = tty->index;
+	pty_master = (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+		      tty->driver->subtype == PTY_TYPE_MASTER);
 	o_tty = tty->link;
 
 #ifdef TTY_PARANOIA_CHECK
-	if (idx < 0 || idx >= tty->driver.num) {
+	if (idx < 0 || idx >= tty->driver->num) {
 		printk(KERN_DEBUG "release_dev: bad idx when trying to "
-				  "free (%s)\n", cdevname(tty->device));
+				  "free (%s)\n", tty->name);
 		return;
 	}
-	if (tty != tty->driver.table[idx]) {
+	if (tty != tty->driver->table[idx]) {
 		printk(KERN_DEBUG "release_dev: driver.table[%d] not tty "
-				  "for (%s)\n", idx, cdevname(tty->device));
+				  "for (%s)\n", idx, tty->name);
 		return;
 	}
-	if (tty->termios != tty->driver.termios[idx]) {
+	if (tty->termios != tty->driver->termios[idx]) {
 		printk(KERN_DEBUG "release_dev: driver.termios[%d] not termios "
 		       "for (%s)\n",
-		       idx, cdevname(tty->device));
+		       idx, tty->name);
 		return;
 	}
-	if (tty->termios_locked != tty->driver.termios_locked[idx]) {
+	if (tty->termios_locked != tty->driver->termios_locked[idx]) {
 		printk(KERN_DEBUG "release_dev: driver.termios_locked[%d] not "
 		       "termios_locked for (%s)\n",
-		       idx, cdevname(tty->device));
+		       idx, tty->name);
 		return;
 	}
 #endif
@@ -1114,24 +1096,24 @@
 #endif
 
 #ifdef TTY_PARANOIA_CHECK
-	if (tty->driver.other) {
-		if (o_tty != tty->driver.other->table[idx]) {
+	if (tty->driver->other) {
+		if (o_tty != tty->driver->other->table[idx]) {
 			printk(KERN_DEBUG "release_dev: other->table[%d] "
 					  "not o_tty for (%s)\n",
-			       idx, cdevname(tty->device));
+			       idx, tty->name);
 			return;
 		}
-		if (o_tty->termios != tty->driver.other->termios[idx]) {
+		if (o_tty->termios != tty->driver->other->termios[idx]) {
 			printk(KERN_DEBUG "release_dev: other->termios[%d] "
 					  "not o_termios for (%s)\n",
-			       idx, cdevname(tty->device));
+			       idx, tty->name);
 			return;
 		}
 		if (o_tty->termios_locked != 
-		      tty->driver.other->termios_locked[idx]) {
+		      tty->driver->other->termios_locked[idx]) {
 			printk(KERN_DEBUG "release_dev: other->termios_locked["
 					  "%d] not o_termios_locked for (%s)\n",
-			       idx, cdevname(tty->device));
+			       idx, tty->name);
 			return;
 		}
 		if (o_tty->link != tty) {
@@ -1141,8 +1123,8 @@
 	}
 #endif
 
-	if (tty->driver.close)
-		tty->driver.close(tty, filp);
+	if (tty->driver->close)
+		tty->driver->close(tty, filp);
 
 	/*
 	 * Sanity check: if tty->count is going to zero, there shouldn't be
@@ -1320,6 +1302,8 @@
 {
 	struct tty_struct *tty;
 	int noctty, retval;
+	struct tty_driver *driver;
+	int index;
 	kdev_t device;
 	unsigned short saved_flags;
 	char	buf[64];
@@ -1331,7 +1315,7 @@
 	if (IS_TTY_DEV(device)) {
 		if (!current->tty)
 			return -ENXIO;
-		device = current->tty->device;
+		device = to_kdev_t(current->tty->device);
 		filp->f_flags |= O_NONBLOCK; /* Don't let /dev/tty block */
 		/* noctty = 1; */
 	}
@@ -1355,34 +1339,26 @@
 
 	if (IS_PTMX_DEV(device)) {
 #ifdef CONFIG_UNIX98_PTYS
-		/* find a free pty. */
-		int major, minor;
-		struct tty_driver *driver;
-
 		/* find a device that is not in use. */
 		retval = -1;
-		for (major = 0 ; major < UNIX98_NR_MAJORS ; major++) {
-			driver = &ptm_driver[major];
-			for (minor = driver->minor_start;
-			     minor < driver->minor_start + driver->num;
-			     minor++) {
-				device = mk_kdev(driver->major, minor);
-				if (!init_dev(device, &tty))
-					goto ptmx_found; /* ok! */
-			}
-		}
+		driver = &ptm_driver;
+		for (index = 0; index < driver->num ; index++)
+			if (!init_dev(driver, index, &tty))
+				goto ptmx_found; /* ok! */
 		return -EIO; /* no free ptys */
-
 	ptmx_found:
 		set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
-		minor -= driver->minor_start;
-		devpts_pty_new(driver->other->name_base + minor, MKDEV(driver->other->major, minor + driver->other->minor_start));
+		devpts_pty_new(index, MKDEV(pts_driver.major, pts_driver.minor_start) + index);
 		noctty = 1;
 #else
 		return -ENODEV;
 #endif  /* CONFIG_UNIX_98_PTYS */
 	} else {
-		retval = init_dev(device, &tty);
+		driver = get_tty_driver(kdev_t_to_nr(device), &index);
+		if (!driver)
+			return -ENODEV;
+
+		retval = init_dev(driver, index, &tty);
 		if (retval)
 			return retval;
 	}
@@ -1390,14 +1366,14 @@
 	filp->private_data = tty;
 	file_move(filp, &tty->tty_files);
 	check_tty_count(tty, "tty_open");
-	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-	    tty->driver.subtype == PTY_TYPE_MASTER)
+	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+	    tty->driver->subtype == PTY_TYPE_MASTER)
 		noctty = 1;
 #ifdef TTY_DEBUG_HANGUP
 	printk(KERN_DEBUG "opening %s...", tty_name(tty, buf));
 #endif
-	if (tty->driver.open)
-		retval = tty->driver.open(tty, filp);
+	if (tty->driver->open)
+		retval = tty->driver->open(tty, filp);
 	else
 		retval = -ENODEV;
 	filp->f_flags = saved_flags;
@@ -1434,8 +1410,8 @@
 		tty->session = current->session;
 		tty->pgrp = current->pgrp;
 	}
-	if ((tty->driver.type == TTY_DRIVER_TYPE_SERIAL) &&
-	    (tty->driver.subtype == SERIAL_TYPE_CALLOUT) &&
+	if ((tty->driver->type == TTY_DRIVER_TYPE_SERIAL) &&
+	    (tty->driver->subtype == SERIAL_TYPE_CALLOUT) &&
 	    (tty->count == 1)) {
 		static int nr_warns;
 		if (nr_warns < 5) {
@@ -1527,8 +1503,8 @@
 	if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg)))
 		return 0;
 #ifdef CONFIG_VT
-	if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
-		unsigned int currcons = minor(tty->device) - tty->driver.minor_start;
+	if (tty->driver->type == TTY_DRIVER_TYPE_CONSOLE) {
+		unsigned int currcons = tty->index;
 		if (vc_resize(currcons, tmp_ws.ws_col, tmp_ws.ws_row))
 			return -ENXIO;
 	}
@@ -1674,10 +1650,10 @@
 {
 	set_current_state(TASK_INTERRUPTIBLE);
 
-	tty->driver.break_ctl(tty, -1);
+	tty->driver->break_ctl(tty, -1);
 	if (!signal_pending(current))
 		schedule_timeout(duration);
-	tty->driver.break_ctl(tty, 0);
+	tty->driver->break_ctl(tty, 0);
 	if (signal_pending(current))
 		return -EINTR;
 	return 0;
@@ -1688,8 +1664,8 @@
 {
 	int retval = -EINVAL;
 
-	if (tty->driver.tiocmget) {
-		retval = tty->driver.tiocmget(tty, file);
+	if (tty->driver->tiocmget) {
+		retval = tty->driver->tiocmget(tty, file);
 
 		if (retval >= 0)
 			retval = put_user(retval, (int *)arg);
@@ -1703,7 +1679,7 @@
 {
 	int retval = -EINVAL;
 
-	if (tty->driver.tiocmset) {
+	if (tty->driver->tiocmset) {
 		unsigned int set, clear, val;
 
 		retval = get_user(val, (unsigned int *)arg);
@@ -1727,7 +1703,7 @@
 		set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2;
 		clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2;
 
-		retval = tty->driver.tiocmset(tty, file, set, clear);
+		retval = tty->driver->tiocmset(tty, file, set, clear);
 	}
 	return retval;
 }
@@ -1746,28 +1722,28 @@
 		return -EINVAL;
 
 	real_tty = tty;
-	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-	    tty->driver.subtype == PTY_TYPE_MASTER)
+	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+	    tty->driver->subtype == PTY_TYPE_MASTER)
 		real_tty = tty->link;
 
 	/*
 	 * Break handling by driver
 	 */
-	if (!tty->driver.break_ctl) {
+	if (!tty->driver->break_ctl) {
 		switch(cmd) {
 		case TIOCSBRK:
 		case TIOCCBRK:
-			if (tty->driver.ioctl)
-				return tty->driver.ioctl(tty, file, cmd, arg);
+			if (tty->driver->ioctl)
+				return tty->driver->ioctl(tty, file, cmd, arg);
 			return -EINVAL;
 			
 		/* These two ioctl's always return success; even if */
 		/* the driver doesn't support them. */
 		case TCSBRK:
 		case TCSBRKP:
-			if (!tty->driver.ioctl)
+			if (!tty->driver->ioctl)
 				return 0;
-			retval = tty->driver.ioctl(tty, file, cmd, arg);
+			retval = tty->driver->ioctl(tty, file, cmd, arg);
 			if (retval == -ENOIOCTLCMD)
 				retval = 0;
 			return retval;
@@ -1840,11 +1816,11 @@
 		 * Break handling
 		 */
 		case TIOCSBRK:	/* Turn break on, unconditionally */
-			tty->driver.break_ctl(tty, -1);
+			tty->driver->break_ctl(tty, -1);
 			return 0;
 			
 		case TIOCCBRK:	/* Turn break off, unconditionally */
-			tty->driver.break_ctl(tty, 0);
+			tty->driver->break_ctl(tty, 0);
 			return 0;
 		case TCSBRK:   /* SVID version: non-zero arg --> no break */
 			/*
@@ -1866,8 +1842,8 @@
 		case TIOCMBIS:
 			return tty_tiocmset(tty, file, cmd, arg);
 	}
-	if (tty->driver.ioctl) {
-		int retval = (tty->driver.ioctl)(tty, file, cmd, arg);
+	if (tty->driver->ioctl) {
+		int retval = (tty->driver->ioctl)(tty, file, cmd, arg);
 		if (retval != -ENOIOCTLCMD)
 			return retval;
 	}
@@ -1917,8 +1893,8 @@
 	session  = tty->session;
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	read_lock(&tasklist_lock);
 	for_each_task_pid(session, PIDTYPE_SID, p, l, pid) {
 		if (p->tty == tty || session > 0) {
@@ -2098,58 +2074,100 @@
  */
 static void tty_default_put_char(struct tty_struct *tty, unsigned char ch)
 {
-	tty->driver.write(tty, 0, &ch, 1);
+	tty->driver->write(tty, 0, &ch, 1);
 }
 
 #ifdef CONFIG_DEVFS_FS
-static void tty_register_devfs(struct tty_driver *driver, unsigned minor)
+static void tty_register_devfs(struct tty_driver *driver, unsigned index)
 {
-	umode_t mode = S_IFCHR | S_IRUSR | S_IWUSR;
-	kdev_t dev = mk_kdev(driver->major, minor);
-	int idx = minor - driver->minor_start;
+	dev_t dev = MKDEV(driver->major, driver->minor_start) + index;
 	char buf[32];
 
-	if ((minor < driver->minor_start) || 
-	    (minor >= driver->minor_start + driver->num)) {
-		printk(KERN_ERR "Attempt to register invalid minor number "
-		       "with devfs (%d:%d).\n", (int)driver->major,(int)minor);
+	if (index >= driver->num) {
+		printk(KERN_ERR "Attempt to register invalid tty line number "
+		       "with devfs (%d).\n", index);
 		return;
 	}
 
-	if (IS_TTY_DEV(dev) || IS_PTMX_DEV(dev)) 
-		mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
-
-	sprintf(buf, driver->name, idx + driver->name_base);
-	devfs_register(NULL, buf, 0, driver->major, minor, mode,
-		       &tty_fops, NULL);
+	tty_line_name(driver, index, buf);
+	devfs_register(NULL, buf, 0, MAJOR(dev), MINOR(dev),
+		S_IFCHR | S_IRUSR | S_IWUSR, &tty_fops, NULL);
 }
 
-static void tty_unregister_devfs(struct tty_driver *driver, unsigned minor)
+static void tty_unregister_devfs(struct tty_driver *driver, int index)
 {
-	devfs_remove(driver->name,
-		     minor - driver->minor_start + driver->name_base);
+	char path[64];
+	tty_line_name(driver, index, path);
+	devfs_remove(path);
 }
 #else
-# define tty_register_devfs(driver, minor)	do { } while (0)
-# define tty_unregister_devfs(driver, minor)	do { } while (0)
+# define tty_register_devfs(driver, index)	do { } while (0)
+# define tty_unregister_devfs(driver, index)	do { } while (0)
 #endif /* CONFIG_DEVFS_FS */
 
 /*
  * Register a tty device described by <driver>, with minor number <minor>.
  */
-void tty_register_device(struct tty_driver *driver, unsigned minor)
+void tty_register_device(struct tty_driver *driver, unsigned index)
 {
-	tty_register_devfs(driver, minor);
+	tty_register_devfs(driver, index);
 }
 
-void tty_unregister_device(struct tty_driver *driver, unsigned minor)
+void tty_unregister_device(struct tty_driver *driver, unsigned index)
 {
-	tty_unregister_devfs(driver, minor);
+	tty_unregister_devfs(driver, index);
 }
 
 EXPORT_SYMBOL(tty_register_device);
 EXPORT_SYMBOL(tty_unregister_device);
 
+/* that should be handled by register_chrdev_region() */
+static int get_range(struct tty_driver *driver)
+{
+	dev_t from = MKDEV(driver->major, driver->minor_start);
+	dev_t to = from + driver->num;
+	dev_t n, next;
+	int error = 0;
+
+	for (n = from; MAJOR(n) < MAJOR(to); n = next) {
+		next = MKDEV(MAJOR(n)+1, 0);
+		error = register_chrdev_region(MAJOR(n), MINOR(n),
+			       next - n, driver->name, &tty_fops);
+		if (error)
+			goto fail;
+	}
+	if (n != to)
+		error = register_chrdev_region(MAJOR(n), MINOR(n),
+			       to - n, driver->name, &tty_fops);
+	if (!error)
+		return 0;
+fail:
+	to = n;
+	for (n = from; MAJOR(n) < MAJOR(to); n = next) {
+		next = MKDEV(MAJOR(n)+1, 0);
+		unregister_chrdev_region(MAJOR(n), MINOR(n),
+			       next - n, driver->name);
+	}
+	return error;
+}
+
+/* that should be handled by unregister_chrdev_region() */
+static void put_range(struct tty_driver *driver)
+{
+	dev_t from = MKDEV(driver->major, driver->minor_start);
+	dev_t to = from + driver->num;
+	dev_t n, next;
+
+	for (n = from; MAJOR(n) < MAJOR(to); n = next) {
+		next = MKDEV(MAJOR(n)+1, 0);
+		unregister_chrdev_region(MAJOR(n), MINOR(n),
+			       next - n, driver->name);
+	}
+	if (n != to)
+		unregister_chrdev_region(MAJOR(n), MINOR(n),
+			       to - n, driver->name);
+}
+
 /*
  * Called by a tty driver to register itself.
  */
@@ -2161,12 +2179,16 @@
 	if (driver->flags & TTY_DRIVER_INSTALLED)
 		return 0;
 
-	error = register_chrdev_region(driver->major, driver->minor_start,
+	if (!driver->major) {
+		error = register_chrdev_region(0, driver->minor_start,
 				       driver->num, driver->name, &tty_fops);
+		if (error > 0)
+			driver->major = error;
+	} else {
+		error = get_range(driver);
+	}
 	if (error < 0)
 		return error;
-	else if(driver->major == 0)
-		driver->major = error;
 
 	if (!driver->put_char)
 		driver->put_char = tty_default_put_char;
@@ -2175,7 +2197,7 @@
 	
 	if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) {
 		for(i = 0; i < driver->num; i++)
-		    tty_register_device(driver, driver->minor_start + i);
+		    tty_register_device(driver, i);
 	}
 	proc_tty_register_driver(driver);
 	return error;
@@ -2186,16 +2208,13 @@
  */
 int tty_unregister_driver(struct tty_driver *driver)
 {
-	int retval, i;
+	int i;
 	struct termios *tp;
 
 	if (*driver->refcount)
 		return -EBUSY;
 
-	retval = unregister_chrdev_region(driver->major, driver->minor_start,
-					  driver->num, driver->name);
-	if (retval)
-		return retval;
+	put_range(driver);
 
 	list_del(&driver->tty_drivers);
 
@@ -2215,7 +2234,8 @@
 			driver->termios_locked[i] = NULL;
 			kfree(tp);
 		}
-		tty_unregister_device(driver, driver->minor_start + i);
+		if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
+			tty_unregister_device(driver, i);
 	}
 	proc_tty_unregister_driver(driver);
 	return 0;
@@ -2254,12 +2274,7 @@
 	}
 }
 
-static struct tty_driver dev_tty_driver, dev_syscons_driver;
-#ifdef CONFIG_UNIX98_PTYS
-static struct tty_driver dev_ptmx_driver;
-#endif
 #ifdef CONFIG_VT
-static struct tty_driver dev_console_driver;
 extern int vty_init(void);
 #endif
 
@@ -2281,64 +2296,37 @@
  */
 void __init tty_init(void)
 {
-	/*
-	 * dev_tty_driver and dev_console_driver are actually magic
-	 * devices which get redirected at open time.  Nevertheless,
-	 * we register them so that register_chrdev is called
-	 * appropriately.
-	 */
-	memset(&dev_tty_driver, 0, sizeof(struct tty_driver));
-	dev_tty_driver.magic = TTY_DRIVER_MAGIC;
-	dev_tty_driver.owner = THIS_MODULE;
-	dev_tty_driver.driver_name = "/dev/tty";
-	dev_tty_driver.name = dev_tty_driver.driver_name + 5;
-	dev_tty_driver.name_base = 0;
-	dev_tty_driver.major = TTYAUX_MAJOR;
-	dev_tty_driver.minor_start = 0;
-	dev_tty_driver.num = 1;
-	dev_tty_driver.type = TTY_DRIVER_TYPE_SYSTEM;
-	dev_tty_driver.subtype = SYSTEM_TYPE_TTY;
-	
-	if (tty_register_driver(&dev_tty_driver))
+	if (register_chrdev_region(TTYAUX_MAJOR, 0, 1,
+				   "/dev/tty", &tty_fops) < 0)
 		panic("Couldn't register /dev/tty driver\n");
 
-	dev_syscons_driver = dev_tty_driver;
-	dev_syscons_driver.owner = THIS_MODULE;
-	dev_syscons_driver.driver_name = "/dev/console";
-	dev_syscons_driver.name = dev_syscons_driver.driver_name + 5;
-	dev_syscons_driver.major = TTYAUX_MAJOR;
-	dev_syscons_driver.minor_start = 1;
-	dev_syscons_driver.type = TTY_DRIVER_TYPE_SYSTEM;
-	dev_syscons_driver.subtype = SYSTEM_TYPE_SYSCONS;
+	devfs_register (NULL, "tty", 0, TTYAUX_MAJOR, 0,
+			S_IFCHR | S_IRUGO | S_IWUGO, &tty_fops, NULL);
 
-	if (tty_register_driver(&dev_syscons_driver))
+	if (register_chrdev_region(TTYAUX_MAJOR, 1, 1,
+				   "/dev/console", &tty_fops) < 0)
 		panic("Couldn't register /dev/console driver\n");
 
-#ifdef CONFIG_UNIX98_PTYS
-	dev_ptmx_driver = dev_tty_driver;
-	dev_ptmx_driver.owner = THIS_MODULE;
-	dev_ptmx_driver.driver_name = "/dev/ptmx";
-	dev_ptmx_driver.name = dev_ptmx_driver.driver_name + 5;
-	dev_ptmx_driver.major= TTYAUX_MAJOR;
-	dev_ptmx_driver.minor_start = 2;
-	dev_ptmx_driver.type = TTY_DRIVER_TYPE_SYSTEM;
-	dev_ptmx_driver.subtype = SYSTEM_TYPE_SYSPTMX;
+	devfs_register (NULL, "console", 0, TTYAUX_MAJOR, 1,
+			S_IFCHR | S_IRUSR | S_IWUSR, &tty_fops, NULL);
 
-	if (tty_register_driver(&dev_ptmx_driver))
+#ifdef CONFIG_UNIX98_PTYS
+	if (register_chrdev_region(TTYAUX_MAJOR, 2, 1,
+				   "/dev/ptmx", &tty_fops) < 0)
 		panic("Couldn't register /dev/ptmx driver\n");
+
+	devfs_register (NULL, "ptmx", 0, TTYAUX_MAJOR, 2,
+			S_IFCHR | S_IRUGO | S_IWUGO, &tty_fops, NULL);
 #endif
 	
 #ifdef CONFIG_VT
-	dev_console_driver = dev_tty_driver;
-	dev_console_driver.owner = THIS_MODULE;
-	dev_console_driver.driver_name = "/dev/vc/0";
-	dev_console_driver.name = dev_console_driver.driver_name + 5;
-	dev_console_driver.major = TTY_MAJOR;
-	dev_console_driver.type = TTY_DRIVER_TYPE_SYSTEM;
-	dev_console_driver.subtype = SYSTEM_TYPE_CONSOLE;
-
-	if (tty_register_driver(&dev_console_driver))
+	if (register_chrdev_region(TTY_MAJOR, 0, 1,
+				   "/dev/vc/0", &tty_fops) < 0)
 		panic("Couldn't register /dev/tty0 driver\n");
+
+	devfs_register (NULL, "vc/0", 0, TTY_MAJOR, 0,
+			S_IFCHR | S_IRUSR | S_IWUSR, &tty_fops, NULL);
+
 	vty_init();
 #endif
 
diff -urN linux-2.5.68-bk4/drivers/char/tty_ioctl.c linux-2.5.68-bk5/drivers/char/tty_ioctl.c
--- linux-2.5.68-bk4/drivers/char/tty_ioctl.c	2003-04-19 19:51:20.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/tty_ioctl.c	2003-04-24 04:34:51.000000000 -0700
@@ -45,7 +45,7 @@
 	
 	printk(KERN_DEBUG "%s wait until sent...\n", tty_name(tty, buf));
 #endif
-	if (!tty->driver.chars_in_buffer)
+	if (!tty->driver->chars_in_buffer)
 		return;
 	add_wait_queue(&tty->write_wait, &wait);
 	if (!timeout)
@@ -53,17 +53,17 @@
 	do {
 #ifdef TTY_DEBUG_WAIT_UNTIL_SENT
 		printk(KERN_DEBUG "waiting %s...(%d)\n", tty_name(tty, buf),
-		       tty->driver.chars_in_buffer(tty));
+		       tty->driver->chars_in_buffer(tty));
 #endif
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (signal_pending(current))
 			goto stop_waiting;
-		if (!tty->driver.chars_in_buffer(tty))
+		if (!tty->driver->chars_in_buffer(tty))
 			break;
 		timeout = schedule_timeout(timeout);
 	} while (timeout);
-	if (tty->driver.wait_until_sent)
-		tty->driver.wait_until_sent(tty, timeout);
+	if (tty->driver->wait_until_sent)
+		tty->driver->wait_until_sent(tty, timeout);
 stop_waiting:
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&tty->write_wait, &wait);
@@ -131,8 +131,8 @@
 		}
 	}
 
-	if (tty->driver.set_termios)
-		(*tty->driver.set_termios)(tty, &old_termios);
+	if (tty->driver->set_termios)
+		(*tty->driver->set_termios)(tty, &old_termios);
 
 	if (tty->ldisc.set_termios)
 		(*tty->ldisc.set_termios)(tty, &old_termios);
@@ -346,13 +346,13 @@
 {
 	int	was_stopped = tty->stopped;
 
-	if (tty->driver.send_xchar) {
-		tty->driver.send_xchar(tty, ch);
+	if (tty->driver->send_xchar) {
+		tty->driver->send_xchar(tty, ch);
 		return;
 	}
 	if (was_stopped)
 		start_tty(tty);
-	tty->driver.write(tty, 0, &ch, 1);
+	tty->driver->write(tty, 0, &ch, 1);
 	if (was_stopped)
 		stop_tty(tty);
 }
@@ -363,8 +363,8 @@
 	struct tty_struct * real_tty;
 	int retval;
 
-	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-	    tty->driver.subtype == PTY_TYPE_MASTER)
+	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+	    tty->driver->subtype == PTY_TYPE_MASTER)
 		real_tty = tty->link;
 	else
 		real_tty = tty;
@@ -450,16 +450,16 @@
 					tty->ldisc.flush_buffer(tty);
 				/* fall through */
 			case TCOFLUSH:
-				if (tty->driver.flush_buffer)
-					tty->driver.flush_buffer(tty);
+				if (tty->driver->flush_buffer)
+					tty->driver->flush_buffer(tty);
 				break;
 			default:
 				return -EINVAL;
 			}
 			return 0;
 		case TIOCOUTQ:
-			return put_user(tty->driver.chars_in_buffer ?
-					tty->driver.chars_in_buffer(tty) : 0,
+			return put_user(tty->driver->chars_in_buffer ?
+					tty->driver->chars_in_buffer(tty) : 0,
 					(int *) arg);
 		case TIOCINQ:
 			retval = tty->read_cnt;
@@ -482,8 +482,8 @@
 		{
 			int pktmode;
 
-			if (tty->driver.type != TTY_DRIVER_TYPE_PTY ||
-			    tty->driver.subtype != PTY_TYPE_MASTER)
+			if (tty->driver->type != TTY_DRIVER_TYPE_PTY ||
+			    tty->driver->subtype != PTY_TYPE_MASTER)
 				return -ENOTTY;
 			if (get_user(pktmode, (int *) arg))
 				return -EFAULT;
diff -urN linux-2.5.68-bk4/drivers/char/vme_scc.c linux-2.5.68-bk5/drivers/char/vme_scc.c
--- linux-2.5.68-bk4/drivers/char/vme_scc.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/vme_scc.c	2003-04-24 04:34:51.000000000 -0700
@@ -131,7 +131,7 @@
 	scc_driver.magic = TTY_DRIVER_MAGIC;
 	scc_driver.driver_name = "scc";
 #ifdef CONFIG_DEVFS_FS
-	scc_driver.name = "tts/%d";
+	scc_driver.name = "tts/";
 #else
 	scc_driver.name = "ttyS";
 #endif
@@ -168,7 +168,7 @@
 
 	scc_callout_driver = scc_driver;
 #ifdef CONFIG_DEVFS_FS
-	scc_callout_driver.name = "cua/%d";
+	scc_callout_driver.name = "cua/";
 #else
 	scc_callout_driver.name = "cua";
 #endif
@@ -842,7 +842,7 @@
 
 static int scc_open (struct tty_struct * tty, struct file * filp)
 {
-	int line = minor(tty->device) - SCC_MINOR_BASE;
+	int line = tty->index;
 	int retval;
 	struct scc_port *port = &scc_ports[line];
 	int i, channel = port->channel;
@@ -950,7 +950,7 @@
 	}
 
 	if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = port->gs.normal_termios;
 		else 
 			*tty->termios = port->gs.callout_termios;
diff -urN linux-2.5.68-bk4/drivers/char/vt.c linux-2.5.68-bk5/drivers/char/vt.c
--- linux-2.5.68-bk4/drivers/char/vt.c	2003-04-19 19:50:44.000000000 -0700
+++ linux-2.5.68-bk5/drivers/char/vt.c	2003-04-24 04:34:51.000000000 -0700
@@ -2216,7 +2216,7 @@
 	int lines;
 	int ret;
 
-	if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
+	if (tty->driver->type != TTY_DRIVER_TYPE_CONSOLE)
 		return -EINVAL;
 	if (current->tty != tty && !capable(CAP_SYS_ADMIN))
 		return -EPERM;
@@ -2345,7 +2345,7 @@
 	int console_num;
 	if (!tty)
 		return;
-	console_num = minor(tty->device) - (tty->driver.minor_start);
+	console_num = tty->index;
 	if (!vc_cons_allocated(console_num))
 		return;
 	set_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
@@ -2360,7 +2360,7 @@
 	int console_num;
 	if (!tty)
 		return;
-	console_num = minor(tty->device) - (tty->driver.minor_start);
+	console_num = tty->index;
 	if (!vc_cons_allocated(console_num))
 		return;
 	clr_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
@@ -2392,7 +2392,7 @@
 	unsigned int	currcons;
 	int i;
 
-	currcons = minor(tty->device) - tty->driver.minor_start;
+	currcons = tty->index;
 
 	i = vc_allocate(currcons);
 	if (i)
@@ -2418,7 +2418,7 @@
 	if (!tty)
 		return;
 	if (tty->count != 1) return;
-	vcs_make_devfs (minor(tty->device) - tty->driver.minor_start, 1);
+	vcs_make_devfs (tty->index, 1);
 	vt = (struct vt_struct*)tty->driver_data;
 	if (vt)
 		vc_cons[vt->vc_num].d->vc_tty = NULL;
@@ -2515,7 +2515,7 @@
 	memset(&console_driver, 0, sizeof(struct tty_driver));
 	console_driver.magic = TTY_DRIVER_MAGIC;
 	console_driver.owner = THIS_MODULE;
-	console_driver.name = "vc/%d";
+	console_driver.name = "vc/";
 	console_driver.name_base = 1;
 	console_driver.major = TTY_MAJOR;
 	console_driver.minor_start = 1;
@@ -2664,8 +2664,7 @@
 	int i;
 
 	for (i = 0; i < console_driver.num; i++)
-		tty_register_device (&console_driver,
-				    console_driver.minor_start + i);
+		tty_register_device (&console_driver, i);
 }
 
 /*
diff -urN linux-2.5.68-bk4/drivers/fc4/soc.c linux-2.5.68-bk5/drivers/fc4/soc.c
--- linux-2.5.68-bk4/drivers/fc4/soc.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/fc4/soc.c	2003-04-24 04:34:51.000000000 -0700
@@ -40,7 +40,6 @@
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
-#include <asm/auxio.h>
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 
diff -urN linux-2.5.68-bk4/drivers/fc4/socal.c linux-2.5.68-bk5/drivers/fc4/socal.c
--- linux-2.5.68-bk4/drivers/fc4/socal.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/fc4/socal.c	2003-04-24 04:34:51.000000000 -0700
@@ -36,7 +36,6 @@
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
-#include <asm/auxio.h>
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 
diff -urN linux-2.5.68-bk4/drivers/ide/ide-disk.c linux-2.5.68-bk5/drivers/ide/ide-disk.c
--- linux-2.5.68-bk4/drivers/ide/ide-disk.c	2003-04-19 19:49:14.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ide/ide-disk.c	2003-04-24 04:34:51.000000000 -0700
@@ -58,7 +58,6 @@
 #include <linux/genhd.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include <linux/buffer_head.h>
 
 #define _IDE_DISK
 
@@ -1743,7 +1742,6 @@
 		memset(&args, 0, sizeof(ide_task_t));
 		args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORUNLOCK;
 		args.command_type = ide_cmd_type_parser(&args);
-		invalidate_bdev(inode->i_bdev, 0);
 		if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL))
 			drive->doorlocking = 0;
 	}
diff -urN linux-2.5.68-bk4/drivers/ieee1394/Makefile linux-2.5.68-bk5/drivers/ieee1394/Makefile
--- linux-2.5.68-bk4/drivers/ieee1394/Makefile	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ieee1394/Makefile	2003-04-24 04:34:51.000000000 -0700
@@ -20,4 +20,4 @@
 
 $(obj)/oui.o: $(obj)/oui.c
 $(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh
-	$(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c
+	$(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $@
diff -urN linux-2.5.68-bk4/drivers/ieee1394/nodemgr.c linux-2.5.68-bk5/drivers/ieee1394/nodemgr.c
--- linux-2.5.68-bk4/drivers/ieee1394/nodemgr.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ieee1394/nodemgr.c	2003-04-24 04:34:51.000000000 -0700
@@ -19,7 +19,6 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <asm/atomic.h>
-#include <asm/byteorder.h>
 
 #include "ieee1394_types.h"
 #include "ieee1394.h"
@@ -48,6 +47,7 @@
 	return NULL;
 }
 
+
 /* 
  * Basically what we do here is start off retrieving the bus_info block.
  * From there will fill in some info about the node, verify it is of IEEE
@@ -594,7 +594,6 @@
 	ret = -ENXIO;
 	for (; size > 0; size--, address += 4, quadp++) {
 		for (i = 0; i < 3; i++) {
-			
 			ret = hpsb_node_read(ne, address, quadp, 4);
 			if (ret != -EAGAIN)
 				break;
@@ -638,7 +637,6 @@
 		code = CONFIG_ROM_KEY(quad);
 
 		if (code == CONFIG_ROM_VENDOR_ID && length > 0) {
-
 			/* Check if there is a text descriptor leaf
 			   immediately after this.  */
 			size = nodemgr_size_text_leaf(host, nodeid, generation,
@@ -847,7 +845,7 @@
 			   store?  Only count immediate values and
 			   CSR offsets for now.  */
 			code &= CONFIG_ROM_KEY_TYPE_MASK;
-			if ((code & 0x80) == 0)
+			if ((code & CONFIG_ROM_KEY_TYPE_LEAF) == 0)
 				count++;
 			break;
 		}
@@ -894,20 +892,21 @@
 /* This implementation currently only scans the config rom and its
  * immediate unit directories looking for software_id and
  * software_version entries, in order to get driver autoloading working. */
-static void nodemgr_process_unit_directory(struct host_info *hi, struct node_entry *ne, 
-					   octlet_t address, unsigned int id)
+static struct unit_directory *nodemgr_process_unit_directory
+	(struct host_info *hi, struct node_entry *ne, octlet_t address, unsigned int *id)
 {
 	struct unit_directory *ud;
 	quadlet_t quad;
 	quadlet_t *infop;
 	int length;
+	struct unit_directory *ud_temp = NULL;
 
 	if (!(ud = nodemgr_scan_unit_directory(ne, address)))
 		goto unit_directory_error;
 
 	ud->ne = ne;
 	ud->address = address;
-	ud->id = id;
+	ud->id = (*id)++;
 
 	if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation,
 				 address, &quad))
@@ -983,12 +982,48 @@
 			/* TODO: read strings... icons? */
 			break;
 
+		case CONFIG_ROM_LOGICAL_UNIT_DIRECTORY:
+			/* TODO: Parent this with it's UD */
+			ud_temp = nodemgr_process_unit_directory(hi, ne, address + value * 4, id);
+
+			/* inherit unspecified values */
+			if (ud_temp != NULL)
+			{
+				if ((ud->flags & UNIT_DIRECTORY_VENDOR_ID) &&
+					!(ud_temp->flags & UNIT_DIRECTORY_VENDOR_ID))
+				{
+					ud_temp->flags |=  UNIT_DIRECTORY_VENDOR_ID;
+					ud_temp->vendor_id = ud->vendor_id;
+					ud_temp->vendor_oui = ud->vendor_oui;
+				}
+				if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) &&
+					!(ud_temp->flags & UNIT_DIRECTORY_MODEL_ID))
+				{
+					ud_temp->flags |=  UNIT_DIRECTORY_MODEL_ID;
+					ud_temp->model_id = ud->model_id;
+				}
+				if ((ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) &&
+					!(ud_temp->flags & UNIT_DIRECTORY_SPECIFIER_ID))
+				{
+					ud_temp->flags |=  UNIT_DIRECTORY_SPECIFIER_ID;
+					ud_temp->specifier_id = ud->specifier_id;
+				}
+				if ((ud->flags & UNIT_DIRECTORY_VERSION) &&
+					!(ud_temp->flags & UNIT_DIRECTORY_VERSION))
+				{
+					ud_temp->flags |=  UNIT_DIRECTORY_VERSION;
+					ud_temp->version = ud->version;
+				}
+			}
+
+			break;
+
 		default:
 			/* Which types of quadlets do we want to
 			   store?  Only count immediate values and
 			   CSR offsets for now.  */
 			code &= CONFIG_ROM_KEY_TYPE_MASK;
-			if ((code & 0x80) == 0)
+			if ((code & CONFIG_ROM_KEY_TYPE_LEAF) == 0)
 				*infop++ = quad;
 			break;
 		}
@@ -1006,11 +1041,12 @@
 		device_create_file(&ud->device, &dev_attr_ud_vendor_oui);
 	nodemgr_create_ud_dev_files(ud);
 
-	return;
+	return ud;
 
 unit_directory_error:	
 	if (ud != NULL)
 		kfree(ud);
+	return NULL;
 }
 
 
@@ -1071,7 +1107,7 @@
 			break;
 
 		case CONFIG_ROM_UNIT_DIRECTORY:
-			nodemgr_process_unit_directory(hi, ne, address + value * 4, ud_id++);
+			nodemgr_process_unit_directory(hi, ne, address + value * 4, &ud_id);
 			break;			
 
 		case CONFIG_ROM_DESCRIPTOR_LEAF:
@@ -1137,6 +1173,9 @@
 #endif /* CONFIG_HOTPLUG */
 
 
+static DECLARE_MUTEX(host_num_sema);
+/* Must hold above mutex until the result of the below call is assigned to
+ * a hostinfo entry. */
 static int nodemgr_alloc_host_num(void)
 {
 	int hostnum;
@@ -1156,6 +1195,18 @@
 	/*
 	 * Right now registration always succeeds, but maybe we should
 	 * detect clashes in protocols handled by other drivers.
+     * DRD> No because multiple drivers are needed to handle certain devices.
+     * For example, a DV camera is an IEC 61883 device (dv1394) and AV/C (raw1394).
+     * This will become less an issue with libiec61883 using raw1394.
+     *
+     * BenC: But can we handle this with an ALLOW_SHARED flag for a
+     * protocol? When we get an SBP-3 driver, it will be nice if they were
+     * mutually exclusive, since SBP-3 can handle SBP-2 protocol.
+     *
+     * Not to mention that we currently do not seem to support multiple
+     * drivers claiming the same unitdirectory. If we implement both of
+     * those, then we'll need to keep probing when a driver claims a
+     * unitdirectory, but is sharable.
 	 */
 
 	return 0;
@@ -1434,9 +1485,9 @@
 	/* If we had a bus reset while we were scanning the bus, it is
 	 * possible that we did not probe all nodes.  In that case, we
 	 * skip the clean up for now, since we could remove nodes that
-	 * were still on the bus.  The bus reset increased
-	 * hi->reset_sem, so there's a bus scan pending which will do
-	 * the clean up eventually. */
+	 * were still on the bus.  The bus reset increased hi->reset_sem,
+	 * so there's a bus scan pending which will do the clean up
+	 * eventually. */
 	if (generation == get_hpsb_generation(host)) {
 		struct cleanup_baton cleanup;
 
@@ -1470,7 +1521,7 @@
 
 /* Because we are a 1394a-2000 compliant IRM, we need to inform all the other
  * nodes of the broadcast channel.  (Really we're only setting the validity
- * bit).  Other IRM responsibilities go in here as well. */
+ * bit). Other IRM responsibilities go in here as well. */
 static void nodemgr_do_irm_duties(struct hpsb_host *host)
 {
 	quadlet_t bc;
@@ -1489,12 +1540,12 @@
 	/* If there is no bus manager then we should set the root node's
 	 * force_root bit to promote bus stability per the 1394
 	 * spec. (8.4.2.6) */
-	if(host->busmgr_id == 0x3f && host->node_count > 1)
-        {
+	if (host->busmgr_id == 0x3f && host->node_count > 1)
+	{
 		u16 root_node = host->node_count - 1;
 		struct node_entry *ne = hpsb_nodeid_get_entry(host, root_node);
-		
-		if(ne->busopt.cmc)
+
+		if (ne->busopt.cmc)
 			hpsb_send_phy_config(host, root_node, -1);
 		else {
 			HPSB_DEBUG("The root node is not cycle master capable; "
@@ -1508,7 +1559,7 @@
 /* We need to ensure that if we are not the IRM, that the IRM node is capable of
  * everything we can do, otherwise issue a bus reset and try to become the IRM
  * ourselves. */
-static int nodemgr_check_irm_capability(struct hpsb_host *host)
+static int nodemgr_check_irm_capability(struct hpsb_host *host, int cycles)
 {
 	quadlet_t bc;
 	int status;
@@ -1525,10 +1576,19 @@
 		/* The current irm node does not have a valid BROADCAST_CHANNEL
 		 * register and we do, so reset the bus with force_root set */
 		HPSB_DEBUG("Current remote IRM is not 1394a-2000 compliant, resetting...");
+
+		if (cycles >= 5) {
+			/* Oh screw it! Just leave the bus as it is */
+			HPSB_DEBUG("Stopping reset loop for IRM sanity");
+			return 1;
+		}
+
 		hpsb_send_phy_config(host, host->node_id, -1);
 		hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT);
+
 		return 0;
 	}
+
 	return 1;
 }
 
@@ -1536,6 +1596,7 @@
 {
 	struct host_info *hi = (struct host_info *)__hi;
 	struct hpsb_host *host = hi->host;
+	int reset_cycles = 0;
 
 	/* No userlevel access needed */
 	daemonize(hi->daemon_name);
@@ -1571,12 +1632,14 @@
 				i = HZ/4;
 		}
 
-		if (!nodemgr_check_irm_capability(host)) {
+		if (!nodemgr_check_irm_capability(host, reset_cycles++)) {
 			/* Do nothing, we are resetting */
 			up(&nodemgr_serialize);
 			continue;
 		}
 
+		reset_cycles = 0;
+
 		nodemgr_node_probe(hi, generation);
 		nodemgr_do_irm_duties(host);
 
@@ -1588,7 +1651,7 @@
 
 caught_signal:
 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
-	HPSB_DEBUG ("NodeMgr: Exiting thread for %s", hi->host->driver->name);
+	HPSB_DEBUG ("NodeMgr: Exiting thread");
 #endif
 
 	complete_and_exit(&hi->exited, 0);
@@ -1672,25 +1735,28 @@
 static void nodemgr_add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
 {
 	struct host_info *hi;
+	int id;
 
+	down(&host_num_sema);
+	/* Must be called before we create the hostinfo entry, else it
+	 * will match entry '0' since all keys default to zero */
+	id = nodemgr_alloc_host_num();
 	hi = hpsb_create_hostinfo(hl, host, sizeof(*hi));
 
 	if (!hi) {
+		up(&host_num_sema);
 		HPSB_ERR ("NodeMgr: out of memory in add host");
 		return;
 	}
 
-	/* Initialize the hostinfo here and start the thread.  The
-	 * thread blocks on the reset semaphore until a bus reset
-	 * happens. */
+	hi->id = id;
+	hpsb_set_hostinfo_key(hl, host, hi->id);
+	up(&host_num_sema);
+
 	hi->host = host;
 	init_completion(&hi->exited);
         sema_init(&hi->reset_sem, 0);
 
-	hi->id = nodemgr_alloc_host_num();
-
-	hpsb_set_hostinfo_key(hl, host, hi->id);
-
 	memcpy(&host->device, &nodemgr_dev_template_host,
 	       sizeof(host->device));
 	host->device.parent = &host->pdev->dev;
@@ -1756,7 +1822,7 @@
 {
 	bus_register(&ieee1394_bus_type);
 
-        nodemgr_hl = hpsb_register_highlevel("Node manager", &nodemgr_ops);
+	nodemgr_hl = hpsb_register_highlevel("Node manager", &nodemgr_ops);
         if (!nodemgr_hl) {
 		HPSB_ERR("NodeMgr: out of memory during ieee1394 initialization");
         }
diff -urN linux-2.5.68-bk4/drivers/ieee1394/nodemgr.h linux-2.5.68-bk5/drivers/ieee1394/nodemgr.h
--- linux-2.5.68-bk4/drivers/ieee1394/nodemgr.h	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ieee1394/nodemgr.h	2003-04-24 04:34:51.000000000 -0700
@@ -55,6 +55,7 @@
 #define CONFIG_ROM_MODEL_ID			0x17
 #define CONFIG_ROM_NODE_CAPABILITES		0x0C
 #define CONFIG_ROM_UNIT_DIRECTORY		0xd1
+#define CONFIG_ROM_LOGICAL_UNIT_DIRECTORY	0xd4
 #define CONFIG_ROM_SPECIFIER_ID			0x12 
 #define CONFIG_ROM_UNIT_SW_VERSION		0x13
 #define CONFIG_ROM_DESCRIPTOR_LEAF		0x81
@@ -137,8 +138,7 @@
 	const char *vendor_name;
 	const char *vendor_oui;
 
-	u32 capabilities;	
-
+	u32 capabilities;
 	struct hpsb_tlabel_pool *tpool;
 
 	struct device device;
diff -urN linux-2.5.68-bk4/drivers/ieee1394/ohci1394.c linux-2.5.68-bk5/drivers/ieee1394/ohci1394.c
--- linux-2.5.68-bk4/drivers/ieee1394/ohci1394.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ieee1394/ohci1394.c	2003-04-24 04:34:51.000000000 -0700
@@ -165,7 +165,7 @@
 printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 897 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 902 $ Ben Collins <bcollins@debian.org>";
 
 /* Module Parameters */
 static int phys_dma = 1;
diff -urN linux-2.5.68-bk4/drivers/ieee1394/pcilynx.c linux-2.5.68-bk5/drivers/ieee1394/pcilynx.c
--- linux-2.5.68-bk4/drivers/ieee1394/pcilynx.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/ieee1394/pcilynx.c	2003-04-24 04:34:51.000000000 -0700
@@ -1175,7 +1175,7 @@
         intmask = reg_read(lynx, PCI_INT_STATUS);
 
         if (!(intmask & PCI_INT_INT_PEND))
-		return IRQ_HANDLED;
+		return IRQ_NONE;
 
         PRINTD(KERN_DEBUG, lynx->id, "interrupt: 0x%08x / 0x%08x", intmask,
                linkint);
diff -urN linux-2.5.68-bk4/drivers/input/evdev.c linux-2.5.68-bk5/drivers/input/evdev.c
--- linux-2.5.68-bk4/drivers/input/evdev.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/evdev.c	2003-04-24 04:34:51.000000000 -0700
@@ -19,8 +19,9 @@
 #include <linux/input.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
 
-struct evdev{
+struct evdev {
 	int exist;
 	int open;
 	int minor;
diff -urN linux-2.5.68-bk4/drivers/input/input.c linux-2.5.68-bk5/drivers/input/input.c
--- linux-2.5.68-bk4/drivers/input/input.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/input.c	2003-04-24 04:34:51.000000000 -0700
@@ -22,6 +22,7 @@
 #include <linux/interrupt.h>
 #include <linux/poll.h>
 #include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("Input core");
diff -urN linux-2.5.68-bk4/drivers/input/joydev.c linux-2.5.68-bk5/drivers/input/joydev.c
--- linux-2.5.68-bk4/drivers/input/joydev.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/joydev.c	2003-04-24 04:34:51.000000000 -0700
@@ -26,6 +26,7 @@
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
 MODULE_DESCRIPTION("Joystick device interfaces");
diff -urN linux-2.5.68-bk4/drivers/input/mousedev.c linux-2.5.68-bk5/drivers/input/mousedev.c
--- linux-2.5.68-bk4/drivers/input/mousedev.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/mousedev.c	2003-04-24 04:34:51.000000000 -0700
@@ -22,6 +22,7 @@
 #include <linux/random.h>
 #include <linux/major.h>
 #include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
 #include <linux/miscdevice.h>
 #endif
diff -urN linux-2.5.68-bk4/drivers/input/serio/serport.c linux-2.5.68-bk5/drivers/input/serio/serport.c
--- linux-2.5.68-bk4/drivers/input/serio/serport.c	2003-04-19 19:50:46.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/serio/serport.c	2003-04-24 04:34:51.000000000 -0700
@@ -44,7 +44,7 @@
 static int serport_serio_write(struct serio *serio, unsigned char data)
 {
 	struct serport *serport = serio->driver;
-	return -(serport->tty->driver.write(serport->tty, 0, &data, 1) != 1);
+	return -(serport->tty->driver->write(serport->tty, 0, &data, 1) != 1);
 }
 
 static int serport_serio_open(struct serio *serio)
diff -urN linux-2.5.68-bk4/drivers/input/tsdev.c linux-2.5.68-bk5/drivers/input/tsdev.c
--- linux-2.5.68-bk4/drivers/input/tsdev.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/input/tsdev.c	2003-04-24 04:34:51.000000000 -0700
@@ -41,6 +41,7 @@
 #include <linux/random.h>
 #include <linux/time.h>
 #include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
 
 #ifndef CONFIG_INPUT_TSDEV_SCREEN_X
 #define CONFIG_INPUT_TSDEV_SCREEN_X	240
diff -urN linux-2.5.68-bk4/drivers/isdn/capi/capi.c linux-2.5.68-bk5/drivers/isdn/capi/capi.c
--- linux-2.5.68-bk4/drivers/isdn/capi/capi.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/isdn/capi/capi.c	2003-04-24 04:34:51.000000000 -0700
@@ -1283,7 +1283,7 @@
 	memset(drv, 0, sizeof(struct tty_driver));
 	drv->magic = TTY_DRIVER_MAGIC;
 	drv->driver_name = "capi_nc";
-	drv->name = "capi/%d";
+	drv->name = "capi/";
 	drv->major = capi_ttymajor;
 	drv->minor_start = 0;
 	drv->num = CAPINC_NR_PORTS;
diff -urN linux-2.5.68-bk4/drivers/isdn/i4l/isdn_tty.c linux-2.5.68-bk5/drivers/isdn/i4l/isdn_tty.c
--- linux-2.5.68-bk4/drivers/isdn/i4l/isdn_tty.c	2003-04-19 19:50:30.000000000 -0700
+++ linux-2.5.68-bk5/drivers/isdn/i4l/isdn_tty.c	2003-04-24 04:34:51.000000000 -0700
@@ -1045,17 +1045,17 @@
 }
 
 static inline int
-isdn_tty_paranoia_check(modem_info * info, kdev_t device, const char *routine)
+isdn_tty_paranoia_check(modem_info * info, char *name, const char *routine)
 {
 #ifdef MODEM_PARANOIA_CHECK
 	if (!info) {
-		printk(KERN_WARNING "isdn_tty: null info_struct for (%d, %d) in %s\n",
-		       major(device), minor(device), routine);
+		printk(KERN_WARNING "isdn_tty: null info_struct for %s in %s\n",
+		       name, routine);
 		return 1;
 	}
 	if (info->magic != ISDN_ASYNC_MAGIC) {
-		printk(KERN_WARNING "isdn_tty: bad magic for modem struct (%d, %d) in %s\n",
-		       major(device), minor(device), routine);
+		printk(KERN_WARNING "isdn_tty: bad magic for modem struct %s in %s\n",
+		       name, routine);
 		return 1;
 	}
 #endif
@@ -1205,7 +1205,7 @@
 	modem_info *info = (modem_info *) tty->driver_data;
 	atemu *m = &info->emu;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_write"))
 		return 0;
 	if (from_user)
 		down(&info->write_sem);
@@ -1318,7 +1318,7 @@
 	modem_info *info = (modem_info *) tty->driver_data;
 	int ret;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write_room"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_write_room"))
 		return 0;
 	if (!info->online)
 		return info->xmit_size;
@@ -1331,7 +1331,7 @@
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_chars_in_buffer"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_chars_in_buffer"))
 		return 0;
 	if (!info->online)
 		return 0;
@@ -1351,7 +1351,7 @@
 		return;
 	}
 	info = (modem_info *) tty->driver_data;
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_flush_buffer")) {
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_buffer")) {
 		restore_flags(flags);
 		return;
 	}
@@ -1369,7 +1369,7 @@
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_flush_chars"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars"))
 		return;
 	if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue)))
 		isdn_tty_modem_xmit(info);
@@ -1388,7 +1388,7 @@
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_throttle"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_throttle"))
 		return;
 	if (I_IXOFF(tty))
 		info->x_char = STOP_CHAR(tty);
@@ -1400,7 +1400,7 @@
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_unthrottle"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_unthrottle"))
 		return;
 	if (I_IXOFF(tty)) {
 		if (info->x_char)
@@ -1542,7 +1542,7 @@
 	modem_info *info = (modem_info *) tty->driver_data;
 	int retval;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_ioctl"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_ioctl"))
 		return -ENODEV;
 	if (tty->flags & (1 << TTY_IO_ERROR))
 		return -EIO;
@@ -1655,7 +1655,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == ISDN_SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == ISDN_SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ISDN_ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
@@ -1766,15 +1766,15 @@
 
 	MOD_INC_USE_COUNT;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if (line < 0 || line > ISDN_MAX_CHANNELS)
 		return -ENODEV;
 	info = &isdn_mdm.info[line];
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_open"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open"))
 		return -ENODEV;
 #ifdef ISDN_DEBUG_MODEM_OPEN
-	printk(KERN_DEBUG "isdn_tty_open %s%d, count = %d\n", tty->driver.name,
-	       info->line, info->count);
+	printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name,
+	       info->count);
 #endif
 	info->count++;
 	tty->driver_data = info;
@@ -1797,7 +1797,7 @@
 		return retval;
 	}
 	if ((info->count == 1) && (info->flags & ISDN_ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == ISDN_SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == ISDN_SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else
 			*tty->termios = info->callout_termios;
@@ -1822,7 +1822,7 @@
 	ulong flags;
 	ulong timeout;
 
-	if (!info || isdn_tty_paranoia_check(info, tty->device, "isdn_tty_close"))
+	if (!info || isdn_tty_paranoia_check(info, tty->name, "isdn_tty_close"))
 		goto out;
 
 	save_flags(flags);
@@ -1892,8 +1892,8 @@
 	}
 	dev->modempoll--;
 	isdn_tty_shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	info->tty = 0;
@@ -1923,7 +1923,7 @@
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
-	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_hangup"))
+	if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_hangup"))
 		return;
 	isdn_tty_shutdown(info);
 	info->count = 0;
diff -urN linux-2.5.68-bk4/drivers/macintosh/macserial.c linux-2.5.68-bk5/drivers/macintosh/macserial.c
--- linux-2.5.68-bk4/drivers/macintosh/macserial.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/macintosh/macserial.c	2003-04-24 04:34:51.000000000 -0700
@@ -183,20 +183,20 @@
 
 static inline int __pmac
 serial_paranoia_check(struct mac_serial *info,
-		      kdev_t device, const char *routine)
+		      char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char badmagic[] = KERN_WARNING
-		"Warning: bad magic number for serial struct (%d, %d) in %s\n";
+		"Warning: bad magic number for serial struct %s in %s\n";
 	static const char badinfo[] = KERN_WARNING
-		"Warning: null mac_serial for (%d, %d) in %s\n";
+		"Warning: null mac_serial for %s in %s\n";
 
 	if (!info) {
-		printk(badinfo, major(device), minor(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, major(device), minor(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -667,7 +667,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 
 #if 0
@@ -691,7 +691,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 
 	spin_lock_irqsave(&info->lock, flags);
@@ -1459,7 +1459,7 @@
 	struct mac_serial *info = (struct mac_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	spin_lock_irqsave(&info->lock, flags);
@@ -1477,7 +1477,7 @@
 	struct mac_serial *info = (struct mac_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf || !tmp_buf)
@@ -1544,7 +1544,7 @@
 	struct mac_serial *info = (struct mac_serial *)tty->driver_data;
 	int	ret;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -1556,7 +1556,7 @@
 {
 	struct mac_serial *info = (struct mac_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -1566,7 +1566,7 @@
 	struct mac_serial *info = (struct mac_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	spin_lock_irqsave(&info->lock, flags);
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -1593,7 +1593,7 @@
 	printk(KERN_DEBUG "throttle %ld....\n",tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 
 	if (I_IXOFF(tty)) {
@@ -1647,7 +1647,7 @@
 			tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 
 	if (I_IXOFF(tty)) {
@@ -1833,7 +1833,7 @@
 	struct mac_serial *info = (struct mac_serial *) tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_break"))
+	if (serial_paranoia_check(info, tty->name, "rs_break"))
 		return;
 
 	spin_lock_irqsave(&info->lock, flags);
@@ -1854,7 +1854,7 @@
 	if (info->kgdb_channel)
 		return -ENODEV;
 #endif
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1921,7 +1921,7 @@
 	struct mac_serial * info = (struct mac_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	spin_lock_irqsave(&info->lock, flags);
@@ -2003,8 +2003,8 @@
 	   specific irqs */
 	spin_unlock_irqrestore(&info->lock, flags);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -2032,7 +2032,7 @@
 	struct mac_serial *info = (struct mac_serial *) tty->driver_data;
 	unsigned long orig_jiffies, char_time;
 
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 /*	printk("rs_wait_until_sent, timeout:%d, tty_stopped:%d, tx_stopped:%d\n",
@@ -2078,7 +2078,7 @@
 {
 	struct mac_serial * info = (struct mac_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	rs_flush_buffer(tty);
@@ -2120,7 +2120,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ZILOG_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -2229,7 +2229,7 @@
 	unsigned long		page;
 
 	MOD_INC_USE_COUNT;
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= zs_channels_found)) {
 		MOD_DEC_USE_COUNT;
 		return -ENODEV;
@@ -2242,10 +2242,10 @@
 		return -ENODEV;
 	}
 #endif
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
-	OPNDBG("rs_open %s%d, count = %d, tty=%p\n", tty->driver.name,
-	       info->line, info->count, tty);
+	OPNDBG("rs_open %s, count = %d, tty=%p\n", tty->name,
+	       info->count, tty);
 
 	info->count++;
 	tty->driver_data = info;
@@ -2292,7 +2292,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -2309,7 +2309,7 @@
 	info->session = current->session;
 	info->pgrp = current->pgrp;
 
-	OPNDBG("rs_open ttyS%d successful...\n", info->line);
+	OPNDBG("rs_open %s successful...\n", tty->name);
 	return 0;
 }
 
@@ -2607,7 +2607,7 @@
 	serial_driver.magic = TTY_DRIVER_MAGIC;
 	serial_driver.driver_name = "macserial";
 #ifdef CONFIG_DEVFS_FS
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #else
 	serial_driver.name = "ttyS";
 #endif /* CONFIG_DEVFS_FS */
@@ -2650,7 +2650,7 @@
 	 */
 	callout_driver = serial_driver;
 #ifdef CONFIG_DEVFS_FS
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #else
 	callout_driver.name = "cua";
 #endif /* CONFIG_DEVFS_FS */
diff -urN linux-2.5.68-bk4/drivers/media/video/cpia.c linux-2.5.68-bk5/drivers/media/video/cpia.c
--- linux-2.5.68-bk4/drivers/media/video/cpia.c	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/cpia.c	2003-04-24 04:34:51.000000000 -0700
@@ -234,7 +234,7 @@
 	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -251,7 +251,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/media/video/meye.c linux-2.5.68-bk5/drivers/media/video/meye.c
--- linux-2.5.68-bk4/drivers/media/video/meye.c	2003-04-19 19:49:58.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/meye.c	2003-04-24 04:34:51.000000000 -0700
@@ -139,7 +139,7 @@
 		memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	        adr = (unsigned long)mem;
 		while (size > 0) {
-			mem_map_reserve(vmalloc_to_page((void *)adr));
+			SetPageReserved(vmalloc_to_page((void *)adr));
 			adr += PAGE_SIZE;
 			size -= PAGE_SIZE;
 		}
@@ -153,7 +153,7 @@
 	if (mem) {
 	        adr = (unsigned long) mem;
 		while ((long) size > 0) {
-			mem_map_unreserve(vmalloc_to_page((void *)adr));
+			ClearPageReserved(vmalloc_to_page((void *)adr));
 			adr += PAGE_SIZE;
 			size -= PAGE_SIZE;
 		}
diff -urN linux-2.5.68-bk4/drivers/media/video/planb.c linux-2.5.68-bk5/drivers/media/video/planb.c
--- linux-2.5.68-bk4/drivers/media/video/planb.c	2003-04-19 19:50:36.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/planb.c	2003-04-24 04:34:51.000000000 -0700
@@ -146,12 +146,12 @@
 								|GFP_DMA, 0);
 		if (!pb->rawbuf[i])
 			break;
-		mem_map_reserve(virt_to_page(pb->rawbuf[i]));
+		SetPageReserved(virt_to_page(pb->rawbuf[i]));
 	}
 	if (i-- < npage) {
 		printk(KERN_DEBUG "PlanB: init_grab: grab buffer not allocated\n");
 		for (; i > 0; i--) {
-			mem_map_unreserve(virt_to_page(pb->rawbuf[i]));
+			ClearPageReserved(virt_to_page(pb->rawbuf[i]));
 			free_pages((unsigned long)pb->rawbuf[i], 0);
 		}
 		kfree(pb->rawbuf);
@@ -412,7 +412,7 @@
 	}
 	if(pb->rawbuf) {
 		for (i = 0; i < pb->rawbuf_size; i++) {
-			mem_map_unreserve(virt_to_page(pb->rawbuf[i]));
+			ClearPageReserved(virt_to_page(pb->rawbuf[i]));
 			free_pages((unsigned long)pb->rawbuf[i], 0);
 		}
 		kfree(pb->rawbuf);
diff -urN linux-2.5.68-bk4/drivers/media/video/videodev.c linux-2.5.68-bk5/drivers/media/video/videodev.c
--- linux-2.5.68-bk4/drivers/media/video/videodev.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/videodev.c	2003-04-24 04:34:51.000000000 -0700
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>
+#include <linux/devfs_fs_kernel.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <asm/semaphore.h>
diff -urN linux-2.5.68-bk4/drivers/media/video/zr36067.c linux-2.5.68-bk5/drivers/media/video/zr36067.c
--- linux-2.5.68-bk4/drivers/media/video/zr36067.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/zr36067.c	2003-04-24 04:34:51.000000000 -0700
@@ -64,7 +64,6 @@
 #include <linux/spinlock.h>
 #include <linux/vmalloc.h>
 #include <linux/i2c-old.h>
-#define     MAP_NR(x)       virt_to_page(x)
 #define     ZORAN_HARDWARE  VID_HARDWARE_ZR36067
 
 #include <linux/videodev.h>
@@ -303,7 +302,7 @@
 			zr->v4l_gbuf[i].fbuffer_phys = virt_to_phys(mem);
 			zr->v4l_gbuf[i].fbuffer_bus = virt_to_bus(mem);
 			for (off = 0; off < v4l_bufsize; off += PAGE_SIZE)
-				mem_map_reserve(MAP_NR(mem + off));
+				SetPageReserved(virt_to_page(mem + off));
 			DEBUG1(printk
 			       (KERN_INFO
 				"%s: V4L frame %d mem 0x%lx (bus: 0x%lx)\n",
@@ -366,7 +365,7 @@
 		if (v4l_bufsize <= MAX_KMALLOC_MEM) {
 			mem = zr->v4l_gbuf[i].fbuffer;
 			for (off = 0; off < v4l_bufsize; off += PAGE_SIZE)
-				mem_map_unreserve(MAP_NR(mem + off));
+				ClearPageReserved(virt_to_page(mem + off));
 			kfree((void *) zr->v4l_gbuf[i].fbuffer);
 		}
 #if defined(CONFIG_BIGPHYS_AREA)
@@ -445,7 +444,7 @@
 			zr->jpg_gbuf[i].frag_tab[1] =
 			    ((zr->jpg_bufsize / 4) << 1) | 1;
 			for (off = 0; off < zr->jpg_bufsize; off += PAGE_SIZE)
-				mem_map_reserve(MAP_NR(mem + off));
+				SetPageReserved(virt_to_page(mem + off));
 		} else {
 			/* jpg_bufsize is allreay page aligned */
 			for (j = 0; j < zr->jpg_bufsize / PAGE_SIZE; j++) 
@@ -463,7 +462,7 @@
 				    virt_to_bus((void *) mem);
 				zr->jpg_gbuf[i].frag_tab[2 * j + 1] =
 				    (PAGE_SIZE / 4) << 1;
-				mem_map_reserve(MAP_NR(mem));
+				SetPageReserved(virt_to_page(mem));
 			}
 
 			zr->jpg_gbuf[i].frag_tab[2 * j - 1] |= 1;
@@ -503,7 +502,7 @@
 								  [0]);
 				for (off = 0; off < zr->jpg_bufsize;
 				     off += PAGE_SIZE)
-					mem_map_unreserve(MAP_NR
+					ClearPageReserved(virt_to_page
 							  (mem + off));
 				kfree((void *) mem);
 				zr->jpg_gbuf[i].frag_tab[0] = 0;
@@ -513,7 +512,7 @@
 			for (j = 0; j < zr->jpg_bufsize / PAGE_SIZE; j++) {
 				if (!zr->jpg_gbuf[i].frag_tab[2 * j])
 					break;
-				mem_map_unreserve(MAP_NR
+				ClearPageReserved(virt_to_page
 						  (bus_to_virt
 						   (zr->jpg_gbuf[i].
 						    frag_tab[2 * j])));
diff -urN linux-2.5.68-bk4/drivers/media/video/zr36120_mem.c linux-2.5.68-bk5/drivers/media/video/zr36120_mem.c
--- linux-2.5.68-bk4/drivers/media/video/zr36120_mem.c	2003-04-19 19:50:05.000000000 -0700
+++ linux-2.5.68-bk5/drivers/media/video/zr36120_mem.c	2003-04-24 04:34:51.000000000 -0700
@@ -51,7 +51,7 @@
 	if (mem) {
 		unsigned long adr = (unsigned long)mem;
 		while (size > 0) {
-			mem_map_reserve(virt_to_page(phys_to_virt(adr)));
+			SetPageReserved(virt_to_page(phys_to_virt(adr)));
 			adr += PAGE_SIZE;
 			size -= PAGE_SIZE;
 		}
@@ -65,7 +65,7 @@
 		unsigned long adr = (unsigned long)mem;
 		unsigned long siz = size;
 		while (siz > 0) {
-			mem_map_unreserve(virt_to_page(phys_to_virt(adr)));
+			ClearPageReserved(virt_to_page(phys_to_virt(adr)));
 			adr += PAGE_SIZE;
 			siz -= PAGE_SIZE;
 		}
diff -urN linux-2.5.68-bk4/drivers/mtd/mtdblock.c linux-2.5.68-bk5/drivers/mtd/mtdblock.c
--- linux-2.5.68-bk4/drivers/mtd/mtdblock.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/mtd/mtdblock.c	2003-04-24 04:34:51.000000000 -0700
@@ -19,7 +19,6 @@
 #define MAJOR_NR MTD_BLOCK_MAJOR
 #define DEVICE_NAME "mtdblock"
 #define DEVICE_NR(device) (device)
-#define LOCAL_END_REQUEST
 #include <linux/blk.h>
 #include <linux/devfs_fs_kernel.h>
 
diff -urN linux-2.5.68-bk4/drivers/mtd/mtdblock_ro.c linux-2.5.68-bk5/drivers/mtd/mtdblock_ro.c
--- linux-2.5.68-bk4/drivers/mtd/mtdblock_ro.c	2003-04-19 19:49:27.000000000 -0700
+++ linux-2.5.68-bk5/drivers/mtd/mtdblock_ro.c	2003-04-24 04:34:51.000000000 -0700
@@ -18,7 +18,6 @@
 #include <linux/buffer_head.h>
 #include <linux/genhd.h>
 
-#define LOCAL_END_REQUEST
 #define MAJOR_NR MTD_BLOCK_MAJOR
 #define DEVICE_NAME "mtdblock"
 #include <linux/blk.h>
diff -urN linux-2.5.68-bk4/drivers/net/ac3200.c linux-2.5.68-bk5/drivers/net/ac3200.c
--- linux-2.5.68-bk4/drivers/net/ac3200.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/ac3200.c	2003-04-24 04:34:51.000000000 -0700
@@ -167,7 +167,7 @@
 		dev->irq = config2irq(inb(ioaddr + AC_CONFIG));
 		printk(", using");
 	} else {
-		dev->irq = irq_cannonicalize(dev->irq);
+		dev->irq = irq_canonicalize(dev->irq);
 		printk(", assigning");
 	}
 
diff -urN linux-2.5.68-bk4/drivers/net/hamradio/6pack.c linux-2.5.68-bk5/drivers/net/hamradio/6pack.c
--- linux-2.5.68-bk4/drivers/net/hamradio/6pack.c	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/hamradio/6pack.c	2003-04-24 04:34:51.000000000 -0700
@@ -315,13 +315,13 @@
 		   immediately after data has arrived. */
 		if (sp->duplex == 1) {
 			sp->led_state = 0x70;
-			sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+			sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 			sp->tx_enable = 1;
-			actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, count);
+			actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, count);
 			sp->xleft = count - actual;
 			sp->xhead = sp->xbuff + actual;
 			sp->led_state = 0x60;
-			sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+			sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 		} else {
 			sp->xleft = count;
 			sp->xhead = sp->xbuff;
@@ -357,7 +357,7 @@
 	}
 
 	if (sp->tx_enable == 1) {
-		actual = tty->driver.write(tty, 0, sp->xhead, sp->xleft);
+		actual = tty->driver->write(tty, 0, sp->xhead, sp->xleft);
 		sp->xleft -= actual;
 		sp->xhead += actual;
 	}
@@ -394,13 +394,13 @@
 
 	if (((sp->status1 & SIXP_DCD_MASK) == 0) && (random < sp->persistence)) {
 		sp->led_state = 0x70;
-		sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+		sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 		sp->tx_enable = 1;
-		actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, sp->status2);
+		actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, sp->status2);
 		sp->xleft -= actual;
 		sp->xhead += actual;
 		sp->led_state = 0x60;
-		sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+		sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 		sp->status2 = 0;
 	} else
 		sp_start_tx_timer(sp);
@@ -566,8 +566,8 @@
 		return -ENFILE;
 	sp->tty = tty;
 	tty->disc_data = sp;
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
@@ -882,7 +882,7 @@
 {
 	unsigned char inbyte = 0xe8;
 
-	sp->tty->driver.write(sp->tty, 0, &inbyte, 1);
+	sp->tty->driver->write(sp->tty, 0, &inbyte, 1);
 
 	del_timer(&sp->resync_t);
 	sp->resync_t.data = (unsigned long) sp;
@@ -924,9 +924,9 @@
 	else { /* output watchdog char if idle */
 		if ((sp->status2 != 0) && (sp->duplex == 1)) {
 			sp->led_state = 0x70;
-			sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+			sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 			sp->tx_enable = 1;
-			actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, sp->status2);
+			actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, sp->status2);
 			sp->xleft -= actual;
 			sp->xhead += actual;
 			sp->led_state = 0x60;
@@ -936,7 +936,7 @@
 	}
 
 	/* needed to trigger the TNC watchdog */
-	sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+	sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 
         /* if the state byte has been received, the TNC is present,
            so the resync timer can be reset. */
@@ -977,8 +977,8 @@
 	/* resync the TNC */
 
 	sp->led_state = 0x60;
-	sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
-	sp->tty->driver.write(sp->tty, 0, &resync_cmd, 1);
+	sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
+	sp->tty->driver->write(sp->tty, 0, &resync_cmd, 1);
 
 
 	/* Start resync timer again -- the TNC might be still absent */
@@ -1006,12 +1006,12 @@
 				if ((sp->status & SIXP_RX_DCD_MASK) ==
 					SIXP_RX_DCD_MASK) {
 					sp->led_state = 0x68;
-					sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+					sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 				}
 			} else {
 				sp->led_state = 0x60;
 				/* fill trailing bytes with zeroes */
-				sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+				sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 				rest = sp->rx_count;
 				if (rest != 0)
 					 for (i = rest; i <= 3; i++)
diff -urN linux-2.5.68-bk4/drivers/net/hamradio/mkiss.c linux-2.5.68-bk5/drivers/net/hamradio/mkiss.c
--- linux-2.5.68-bk4/drivers/net/hamradio/mkiss.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/hamradio/mkiss.c	2003-04-24 04:34:51.000000000 -0700
@@ -384,7 +384,7 @@
 			 break;
 		}
 		ax->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-		actual = ax->tty->driver.write(ax->tty, 0, ax->xbuff, count);
+		actual = ax->tty->driver->write(ax->tty, 0, ax->xbuff, count);
 		ax->tx_packets++;
 		ax->dev->trans_start = jiffies;
 		ax->xleft = count - actual;
@@ -392,7 +392,7 @@
 	} else {
 		count = kiss_esc(p, (unsigned char *) ax->mkiss->xbuff, len);
 		ax->mkiss->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-		actual = ax->mkiss->tty->driver.write(ax->mkiss->tty, 0, ax->mkiss->xbuff, count);
+		actual = ax->mkiss->tty->driver->write(ax->mkiss->tty, 0, ax->mkiss->xbuff, count);
 		ax->tx_packets++;
 		ax->mkiss->dev->trans_start = jiffies;
 		ax->mkiss->xleft = count - actual;
@@ -429,7 +429,7 @@
 		return;
 	}
 
-	actual = tty->driver.write(tty, 0, ax->xhead, ax->xleft);
+	actual = tty->driver->write(tty, 0, ax->xhead, ax->xleft);
 	ax->xleft -= actual;
 	ax->xhead += actual;
 }
@@ -475,7 +475,7 @@
 		}
 
 		printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name,
-		       (ax->tty->driver.chars_in_buffer(ax->tty) || ax->xleft) ?
+		       (ax->tty->driver->chars_in_buffer(ax->tty) || ax->xleft) ?
 		       "bad line quality" : "driver error");
 
 		ax->xleft = 0;
@@ -643,8 +643,8 @@
 	ax->mkiss = NULL;
 	tmp_ax    = NULL;
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
diff -urN linux-2.5.68-bk4/drivers/net/irda/irtty-sir.c linux-2.5.68-bk5/drivers/net/irda/irtty-sir.c
--- linux-2.5.68-bk4/drivers/net/irda/irtty-sir.c	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/irda/irtty-sir.c	2003-04-24 04:34:51.000000000 -0700
@@ -62,7 +62,7 @@
 	ASSERT(priv != NULL, return -1;);
 	ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
 
-	return priv->tty->driver.chars_in_buffer(priv->tty);
+	return priv->tty->driver->chars_in_buffer(priv->tty);
 }
 
 /* Wait (sleep) until underlaying hardware finished transmission
@@ -91,9 +91,9 @@
 	ASSERT(priv->magic == IRTTY_MAGIC, return;);
 
 	tty = priv->tty;
-	if (tty->driver.wait_until_sent) {
+	if (tty->driver->wait_until_sent) {
 		lock_kernel();
-		tty->driver.wait_until_sent(tty, MSECS_TO_JIFFIES(100));
+		tty->driver->wait_until_sent(tty, MSECS_TO_JIFFIES(100));
 		unlock_kernel();
 	}
 	else {
@@ -161,8 +161,8 @@
 	}	
 
 	tty->termios->c_cflag = cflag;
-	if (tty->driver.set_termios)
-		tty->driver.set_termios(tty, &old_termios);
+	if (tty->driver->set_termios)
+		tty->driver->set_termios(tty, &old_termios);
 	unlock_kernel();
 
 	priv->io.speed = speed;
@@ -201,8 +201,8 @@
 	 * This function is not yet defined for all tty driver, so
 	 * let's be careful... Jean II
 	 */
-	ASSERT(priv->tty->driver.tiocmset != NULL, return -1;);
-	priv->tty->driver.tiocmset(priv->tty, NULL, set, clear);
+	ASSERT(priv->tty->driver->tiocmset != NULL, return -1;);
+	priv->tty->driver->tiocmset(priv->tty, NULL, set, clear);
 
 	return 0;
 }
@@ -231,17 +231,17 @@
 	ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
 
 	tty = priv->tty;
-	if (!tty->driver.write)
+	if (!tty->driver->write)
 		return 0;
 	tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-	if (tty->driver.write_room) {
-		writelen = tty->driver.write_room(tty);
+	if (tty->driver->write_room) {
+		writelen = tty->driver->write_room(tty);
 		if (writelen > len)
 			writelen = len;
 	}
 	else
 		writelen = len;
-	return tty->driver.write(tty, 0, ptr, writelen);
+	return tty->driver->write(tty, 0, ptr, writelen);
 }
 
 /* ------------------------------------------------------- */
@@ -354,8 +354,8 @@
 		cflag |= CREAD;
 
 	tty->termios->c_cflag = cflag;
-	if (tty->driver.set_termios)
-		tty->driver.set_termios(tty, &old_termios);
+	if (tty->driver->set_termios)
+		tty->driver->set_termios(tty, &old_termios);
 	unlock_kernel();
 }
 
@@ -381,8 +381,8 @@
 
 	tty = priv->tty;
 
-	if (tty->driver.start)
-		tty->driver.start(tty);
+	if (tty->driver->start)
+		tty->driver->start(tty);
 	/* Make sure we can receive more data */
 	irtty_stop_receiver(tty, FALSE);
 
@@ -410,8 +410,8 @@
 
 	/* Make sure we don't receive more data */
 	irtty_stop_receiver(tty, TRUE);
-	if (tty->driver.stop)
-		tty->driver.stop(tty);
+	if (tty->driver->stop)
+		tty->driver->stop(tty);
 
 	up(&irtty_sem);
 
@@ -502,7 +502,6 @@
 {
 	struct sir_dev *dev;
 	struct sirtty_cb *priv;
-	char hwname[16];
 	int ret = 0;
 
 	/* unfortunately, there's no tty_ldisc->owner field
@@ -522,11 +521,11 @@
 
 	/* stop the underlying  driver */
 	irtty_stop_receiver(tty, TRUE);
-	if (tty->driver.stop)
-		tty->driver.stop(tty);
+	if (tty->driver->stop)
+		tty->driver->stop(tty);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	
 /* from old irtty - but what is it good for?
  * we _are_ the ldisc and we _don't_ implement flush_buffer!
@@ -535,25 +534,11 @@
  *		tty->ldisc.flush_buffer(tty);
  */
 
-
-	/* create device name - could we use tty_name() here? */
-
-	if (strchr(tty->driver.name, '%')) {
-		sprintf(hwname, tty->driver.name,
-			minor(tty->device) - tty->driver.minor_start +
-			tty->driver.name_base);
-	}
-	else {
-		sprintf(hwname, "%s%d", tty->driver.name,
-			minor(tty->device) - tty->driver.minor_start +
-			tty->driver.name_base);
-	}
-
 	/* apply mtt override */
 	sir_tty_drv.qos_mtt_bits = qos_mtt_bits;
 
 	/* get a sir device instance for this driver */
-	dev = sirdev_get_instance(&sir_tty_drv, hwname);
+	dev = sirdev_get_instance(&sir_tty_drv, tty->name);
 	if (!dev) {
 		ret = -ENODEV;
 		goto out;
@@ -625,8 +610,8 @@
 	/* Stop tty */
 	irtty_stop_receiver(tty, TRUE);
 	tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
-	if (tty->driver.stop)
-		tty->driver.stop(tty);
+	if (tty->driver->stop)
+		tty->driver->stop(tty);
 
 	kfree(priv);
 
diff -urN linux-2.5.68-bk4/drivers/net/irda/irtty.c linux-2.5.68-bk5/drivers/net/irda/irtty.c
--- linux-2.5.68-bk4/drivers/net/irda/irtty.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/irda/irtty.c	2003-04-24 04:34:51.000000000 -0700
@@ -170,14 +170,12 @@
 	tty->disc_data = self;
 
 	/* Give self a name */
-	sprintf(name, "%s%d", tty->driver.name,
-		minor(tty->device) - tty->driver.minor_start +
-		tty->driver.name_base);
+	strcpy(name, tty->name);
 
 	hashbin_insert(irtty, (irda_queue_t *) self, (int) self, NULL);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
@@ -335,7 +333,7 @@
 
 	/* This is unsafe, but currently under discussion - Jean II */
 	self->tty->termios->c_cflag = cflag;
-	self->tty->driver.set_termios(self->tty, &old_termios);
+	self->tty->driver->set_termios(self->tty, &old_termios);
 }
 
 /* 
@@ -388,7 +386,7 @@
 
 	/* This is unsafe, but currently under discussion - Jean II */
 	self->tty->termios->c_cflag = cflag;
-	self->tty->driver.set_termios(self->tty, &old_termios);
+	self->tty->driver->set_termios(self->tty, &old_termios);
 
 	self->io.speed = speed;
 }
@@ -429,7 +427,7 @@
 		 * Make sure all data is sent before changing the speed of the
 		 * serial port.
 		 */
-		if (self->tty->driver.chars_in_buffer(self->tty)) {
+		if (self->tty->driver->chars_in_buffer(self->tty)) {
 			/* Keep state, and try again later */
 			ret = MSECS_TO_JIFFIES(10);
 			break;
@@ -684,8 +682,8 @@
 	dev->trans_start = jiffies;
 	self->stats.tx_bytes += self->tx_buff.len;
 
-	if (self->tty->driver.write)
-		actual = self->tty->driver.write(self->tty, 0, 
+	if (self->tty->driver->write)
+		actual = self->tty->driver->write(self->tty, 0, 
 						 self->tx_buff.data, 
 						 self->tx_buff.len);
 	/* Hide the part we just transmitted */
@@ -738,7 +736,7 @@
 	/* Finished with frame?  */
 	if (self->tx_buff.len > 0)  {
 		/* Write data left in transmit buffer */
-		actual = tty->driver.write(tty, 0, self->tx_buff.data, 
+		actual = tty->driver->write(tty, 0, self->tx_buff.data, 
 					   self->tx_buff.len);
 
 		self->tx_buff.data += actual;
@@ -823,7 +821,7 @@
 	set_fs(get_ds());
 	
 	/* This is probably unsafe, but currently under discussion - Jean II */
-	if (tty->driver.ioctl(tty, NULL, TIOCMSET, (unsigned long) &arg)) { 
+	if (tty->driver->ioctl(tty, NULL, TIOCMSET, (unsigned long) &arg)) { 
 		IRDA_DEBUG(2, "%s(), error doing ioctl!\n", __FUNCTION__);
 	}
 	set_fs(fs);
@@ -923,8 +921,8 @@
 	ASSERT(self != NULL, return 0;);
 	ASSERT(self->magic == IRTTY_MAGIC, return 0;);
 
-	if (self->tty->driver.write)
-		actual = self->tty->driver.write(self->tty, 0, buf, len);
+	if (self->tty->driver->write)
+		actual = self->tty->driver->write(self->tty, 0, buf, len);
 
 	return actual;
 }
@@ -957,9 +955,7 @@
 	irtty_stop_receiver(self, FALSE);
 
 	/* Give self a hardware name */
-	sprintf(hwname, "%s%d", tty->driver.name,
-		minor(tty->device) - tty->driver.minor_start +
-		tty->driver.name_base);
+	sprintf(hwname, "%s", tty->name);
 
 	/* 
 	 * Open new IrLAP layer instance, now that everything should be
diff -urN linux-2.5.68-bk4/drivers/net/ppp_async.c linux-2.5.68-bk5/drivers/net/ppp_async.c
--- linux-2.5.68-bk4/drivers/net/ppp_async.c	2003-04-19 19:50:33.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/ppp_async.c	2003-04-24 04:34:52.000000000 -0700
@@ -332,8 +332,8 @@
 	spin_unlock_bh(&ap->recv_lock);
 	ap_put(ap);
 	if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
-	    && tty->driver.unthrottle)
-		tty->driver.unthrottle(tty);
+	    && tty->driver->unthrottle)
+		tty->driver->unthrottle(tty);
 }
 
 static void
@@ -662,7 +662,7 @@
 		if (!tty_stuffed && ap->optr < ap->olim) {
 			avail = ap->olim - ap->optr;
 			set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-			sent = tty->driver.write(tty, 0, ap->optr, avail);
+			sent = tty->driver->write(tty, 0, ap->optr, avail);
 			if (sent < 0)
 				goto flush;	/* error, e.g. loss of CD */
 			ap->optr += sent;
diff -urN linux-2.5.68-bk4/drivers/net/ppp_synctty.c linux-2.5.68-bk5/drivers/net/ppp_synctty.c
--- linux-2.5.68-bk4/drivers/net/ppp_synctty.c	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/ppp_synctty.c	2003-04-24 04:34:52.000000000 -0700
@@ -385,8 +385,8 @@
 	spin_unlock_bh(&ap->recv_lock);
 	sp_put(ap);
 	if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
-	    && tty->driver.unthrottle)
-		tty->driver.unthrottle(tty);
+	    && tty->driver->unthrottle)
+		tty->driver->unthrottle(tty);
 }
 
 static void
@@ -610,7 +610,7 @@
 			tty_stuffed = 0;
 		if (!tty_stuffed && ap->tpkt != 0) {
 			set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-			sent = tty->driver.write(tty, 0, ap->tpkt->data, ap->tpkt->len);
+			sent = tty->driver->write(tty, 0, ap->tpkt->data, ap->tpkt->len);
 			if (sent < 0)
 				goto flush;	/* error, e.g. loss of CD */
 			if (sent < ap->tpkt->len) {
diff -urN linux-2.5.68-bk4/drivers/net/slip.c linux-2.5.68-bk5/drivers/net/slip.c
--- linux-2.5.68-bk4/drivers/net/slip.c	2003-04-19 19:51:22.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/slip.c	2003-04-24 04:34:52.000000000 -0700
@@ -428,7 +428,7 @@
 	 *       14 Oct 1994  Dmitry Gorodchanin.
 	 */
 	sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-	actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
+	actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count);
 #ifdef SL_CHECK_TRANSMIT
 	sl->dev->trans_start = jiffies;
 #endif
@@ -462,7 +462,7 @@
 		return;
 	}
 
-	actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft);
+	actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft);
 	sl->xleft -= actual;
 	sl->xhead += actual;
 }
@@ -488,7 +488,7 @@
 			goto out;
 		}
 		printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name,
-		       (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ?
+		       (sl->tty->driver->chars_in_buffer(sl->tty) || sl->xleft) ?
 		       "bad line quality" : "driver error");
 		sl->xleft = 0;
 		sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
@@ -722,7 +722,7 @@
 
 /* Find a free SLIP channel, and link in this `tty' line. */
 static struct slip *
-sl_alloc(kdev_t line)
+sl_alloc(dev_t line)
 {
 	struct slip *sl;
 	slip_ctrl_t *slp = NULL;
@@ -739,7 +739,7 @@
 			break;
 
 		if (slp->ctrl.leased) {
-			if (!kdev_same(slp->ctrl.line, line))
+			if (slp->ctrl.line != line)
 				continue;
 			if (slp->ctrl.tty)
 				return NULL;
@@ -753,7 +753,7 @@
 			continue;
 
 		if (current->pid == slp->ctrl.pid) {
-			if (kdev_same(slp->ctrl.line, line) && score < 3) {
+			if (slp->ctrl.line == line && score < 3) {
 				sel = i;
 				score = 3;
 				continue;
@@ -764,7 +764,7 @@
 			}
 			continue;
 		}
-		if (kdev_same(slp->ctrl.line, line) && score < 1) {
+		if (slp->ctrl.line == line && score < 1) {
 			sel = i;
 			score = 1;
 			continue;
@@ -861,8 +861,8 @@
 	tty->disc_data = sl;
 	sl->line = tty->device;
 	sl->pid = current->pid;
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
@@ -941,7 +941,7 @@
 	tty->disc_data = 0;
 	sl->tty = NULL;
 	if (!sl->leased)
-		sl->line = NODEV;
+		sl->line = 0;
 
 	/* VSV = very important to remove timers */
 #ifdef CONFIG_SLIP_SMART
@@ -1456,7 +1456,7 @@
 			if (!netif_queue_stopped(sl->dev))
 			{
 				/* if device busy no outfill */
-				sl->tty->driver.write(sl->tty, 0, &s, 1);
+				sl->tty->driver->write(sl->tty, 0, &s, 1);
 			}
 		}
 		else
diff -urN linux-2.5.68-bk4/drivers/net/slip.h linux-2.5.68-bk5/drivers/net/slip.h
--- linux-2.5.68-bk4/drivers/net/slip.h	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/slip.h	2003-04-24 04:34:52.000000000 -0700
@@ -100,7 +100,7 @@
 
   unsigned char		mode;		/* SLIP mode			*/
   unsigned char		leased;
-  kdev_t		line;
+  dev_t			line;
   pid_t			pid;
 #define SL_MODE_SLIP	0
 #define SL_MODE_CSLIP	1
diff -urN linux-2.5.68-bk4/drivers/net/sunlance.c linux-2.5.68-bk5/drivers/net/sunlance.c
--- linux-2.5.68-bk4/drivers/net/sunlance.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/sunlance.c	2003-04-24 04:34:52.000000000 -0700
@@ -1417,7 +1417,7 @@
 				       "'tpe-link-test?'\n", dev->name);
 				printk(KERN_NOTICE "%s: warning: mail any problems "
 				       "to ecd@skynet.be\n", dev->name);
-				set_auxio(AUXIO_LINK_TEST, 0);
+				auxio_set_lte(AUXIO_LTE_ON);
 			}
 no_link_test:
 			lp->auto_select = 1;
diff -urN linux-2.5.68-bk4/drivers/net/wan/pc300_tty.c linux-2.5.68-bk5/drivers/net/wan/pc300_tty.c
--- linux-2.5.68-bk4/drivers/net/wan/pc300_tty.c	2003-04-19 19:49:21.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/wan/pc300_tty.c	2003-04-24 04:34:52.000000000 -0700
@@ -318,18 +318,18 @@
 		return -ENODEV;
 	} 
 
-	port = minor(tty->device) - tty->driver.minor_start; 
+	port = tty->index;
 
 	if ((port < 0) || (port >= CPC_TTY_NPORTS)){ 
-		CPC_TTY_DBG("pc300_tty: open invalid minor %i\n",MINOR(tty->device));
+		CPC_TTY_DBG("pc300_tty: open invalid port %d\n", port);
 		return -ENODEV;
 	} 
 
 	cpc_tty = &cpc_tty_area[port];
 	
 	if (cpc_tty->state == CPC_TTY_ST_IDLE){
-		CPC_TTY_DBG("%s: open - invalid interface, minor=%i\n",
-					cpc_tty->name, MINOR(tty->device));
+		CPC_TTY_DBG("%s: open - invalid interface, port=%d\n",
+					cpc_tty->name, tty->index);
 		return -ENODEV;
 	}
 
diff -urN linux-2.5.68-bk4/drivers/net/wan/sdla_chdlc.c linux-2.5.68-bk5/drivers/net/wan/sdla_chdlc.c
--- linux-2.5.68-bk4/drivers/net/wan/sdla_chdlc.c	2003-04-19 19:49:30.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/wan/sdla_chdlc.c	2003-04-24 04:34:52.000000000 -0700
@@ -3698,7 +3698,7 @@
 	
 	if (!tty->driver_data){
 		int port;
-		port = minor(tty->device) - tty->driver.minor_start;
+		port = tty->index;
 		if ((port < 0) || (port >= NR_PORTS)) 
 			return -ENODEV;
 		
diff -urN linux-2.5.68-bk4/drivers/net/wan/x25_asy.c linux-2.5.68-bk5/drivers/net/wan/x25_asy.c
--- linux-2.5.68-bk4/drivers/net/wan/x25_asy.c	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/wan/x25_asy.c	2003-04-24 04:34:52.000000000 -0700
@@ -288,7 +288,7 @@
 	 *       14 Oct 1994  Dmitry Gorodchanin.
 	 */
 	sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-	actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
+	actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count);
 	sl->xleft = count - actual;
 	sl->xhead = sl->xbuff + actual;
 	/* VSV */
@@ -318,7 +318,7 @@
 		return;
 	}
 
-	actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft);
+	actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft);
 	sl->xleft -= actual;
 	sl->xhead += actual;
 }
@@ -330,7 +330,7 @@
 	 *      14 Oct 1994 Dmitry Gorodchanin.
 	 */
 	printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name,
-	       (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ?
+	       (sl->tty->driver->chars_in_buffer(sl->tty) || sl->xleft) ?
 	       "bad line quality" : "driver error");
 	sl->xleft = 0;
 	sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
@@ -620,8 +620,8 @@
 
 	sl->tty = tty;
 	tty->disc_data = sl;
-	if (tty->driver.flush_buffer)  {
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)  {
+		tty->driver->flush_buffer(tty);
 	}
 	if (tty->ldisc.flush_buffer)  {
 		tty->ldisc.flush_buffer(tty);
diff -urN linux-2.5.68-bk4/drivers/net/wireless/orinoco_cs.c linux-2.5.68-bk5/drivers/net/wireless/orinoco_cs.c
--- linux-2.5.68-bk4/drivers/net/wireless/orinoco_cs.c	2003-04-19 19:50:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/wireless/orinoco_cs.c	2003-04-24 04:34:52.000000000 -0700
@@ -35,7 +35,6 @@
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
-#include <pcmcia/bus_ops.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff -urN linux-2.5.68-bk4/drivers/net/wireless/strip.c linux-2.5.68-bk5/drivers/net/wireless/strip.c
--- linux-2.5.68-bk4/drivers/net/wireless/strip.c	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk5/drivers/net/wireless/strip.c	2003-04-24 04:34:52.000000000 -0700
@@ -801,7 +801,7 @@
 	struct termios old_termios = *(tty->termios);
 	tty->termios->c_cflag &= ~CBAUD;	/* Clear the old baud setting */
 	tty->termios->c_cflag |= baudcode;	/* Set the new baud setting */
-	tty->driver.set_termios(tty, &old_termios);
+	tty->driver->set_termios(tty, &old_termios);
 }
 
 /*
@@ -1266,7 +1266,7 @@
 			set_baud(tty, strip_info->user_baud);
 	}
 
-	tty->driver.write(tty, 0, s.string, s.length);
+	tty->driver->write(tty, 0, s.string, s.length);
 #ifdef EXT_COUNTERS
 	strip_info->tx_ebytes += s.length;
 #endif
@@ -1288,7 +1288,7 @@
 
 	if (strip_info->tx_left > 0) {
 		int num_written =
-		    tty->driver.write(tty, 0, strip_info->tx_head,
+		    tty->driver->write(tty, 0, strip_info->tx_head,
 				      strip_info->tx_left);
 		strip_info->tx_left -= num_written;
 		strip_info->tx_head += num_written;
@@ -2688,8 +2688,8 @@
 
 	strip_info->tty = tty;
 	tty->disc_data = strip_info;
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
diff -urN linux-2.5.68-bk4/drivers/pcmcia/cardbus.c linux-2.5.68-bk5/drivers/pcmcia/cardbus.c
--- linux-2.5.68-bk4/drivers/pcmcia/cardbus.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/pcmcia/cardbus.c	2003-04-24 04:34:52.000000000 -0700
@@ -123,7 +123,7 @@
     
 =====================================================================*/
 
-void cb_release_cis_mem(socket_info_t * s)
+static void cb_release_cis_mem(socket_info_t * s)
 {
 	if (s->cb_cis_virt) {
 		DEBUG(1, "cs: cb_release_cis_mem()\n");
@@ -270,6 +270,8 @@
 {
 	struct pci_dev *bridge = s->cap.cb_dev;
 
+	cb_release_cis_mem(s);
+
 	if (bridge)
 		pci_remove_behind_bridge(bridge);
 }
diff -urN linux-2.5.68-bk4/drivers/pcmcia/cistpl.c linux-2.5.68-bk5/drivers/pcmcia/cistpl.c
--- linux-2.5.68-bk4/drivers/pcmcia/cistpl.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/pcmcia/cistpl.c	2003-04-24 04:34:52.000000000 -0700
@@ -269,8 +269,8 @@
 static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
 			   u_int len, void *ptr)
 {
-    int i, ret;
-    char *caddr;
+    struct cis_cache_entry *cis;
+    int ret;
 
     if (s->fake_cis) {
 	if (s->fake_cis_len > addr+len)
@@ -279,32 +279,55 @@
 	    memset(ptr, 0xff, len);
 	return;
     }
-    caddr = s->cis_cache;
-    for (i = 0; i < s->cis_used; i++) {
-	if ((s->cis_table[i].addr == addr) &&
-	    (s->cis_table[i].len == len) &&
-	    (s->cis_table[i].attr == attr)) break;
-	caddr += s->cis_table[i].len;
-    }
-    if (i < s->cis_used) {
-	memcpy(ptr, caddr, len);
-	return;
+
+    list_for_each_entry(cis, &s->cis_cache, node) {
+	if (cis->addr == addr && cis->len == len && cis->attr == attr) {
+	    memcpy(ptr, cis->cache, len);
+	    return;
+	}
     }
+
 #ifdef CONFIG_CARDBUS
     if (s->state & SOCKET_CARDBUS)
 	ret = read_cb_mem(s, attr, addr, len, ptr);
     else
 #endif
 	ret = read_cis_mem(s, attr, addr, len, ptr);
-    /* Copy data into the cache, if there is room */
-    if ((ret == 0) && (i < MAX_CIS_TABLE) &&
-	(caddr+len < s->cis_cache+MAX_CIS_DATA)) {
-	s->cis_table[i].addr = addr;
-	s->cis_table[i].len = len;
-	s->cis_table[i].attr = attr;
-	s->cis_used++;
-	memcpy(caddr, ptr, len);
-    }	    
+
+    /* Copy data into the cache */
+    cis = kmalloc(sizeof(struct cis_cache_entry) + len, GFP_KERNEL);
+    if (cis) {
+	cis->addr = addr;
+	cis->len = len;
+	cis->attr = attr;
+	memcpy(cis->cache, ptr, len);
+	list_add(&cis->node, &s->cis_cache);
+    }
+}
+
+static void
+remove_cis_cache(socket_info_t *s, int attr, u_int addr, u_int len)
+{
+	struct cis_cache_entry *cis;
+
+	list_for_each_entry(cis, &s->cis_cache, node)
+		if (cis->addr == addr && cis->len == len && cis->attr == attr) {
+			list_del(&cis->node);
+			kfree(cis);
+			break;
+		}
+}
+
+void destroy_cis_cache(socket_info_t *s)
+{
+	struct list_head *l, *n;
+
+	list_for_each_safe(l, n, &s->cis_cache) {
+		struct cis_cache_entry *cis = list_entry(l, struct cis_cache_entry, node);
+
+		list_del(&cis->node);
+		kfree(cis);
+	}
 }
 
 /*======================================================================
@@ -316,24 +339,25 @@
 
 int verify_cis_cache(socket_info_t *s)
 {
-    char buf[256], *caddr;
-    int i;
-    
-    caddr = s->cis_cache;
-    for (i = 0; i < s->cis_used; i++) {
+	struct cis_cache_entry *cis;
+	char buf[256];
+
+	list_for_each_entry(cis, &s->cis_cache, node) {
+		int len = cis->len;
+
+		if (len > 256)
+			len = 256;
 #ifdef CONFIG_CARDBUS
-	if (s->state & SOCKET_CARDBUS)
-	    read_cb_mem(s, s->cis_table[i].attr, s->cis_table[i].addr,
-			s->cis_table[i].len, buf);
-	else
+		if (s->state & SOCKET_CARDBUS)
+			read_cb_mem(s, cis->attr, cis->addr, len, buf);
+		else
 #endif
-	    read_cis_mem(s, s->cis_table[i].attr, s->cis_table[i].addr,
-			 s->cis_table[i].len, buf);
-	if (memcmp(buf, caddr, s->cis_table[i].len) != 0)
-	    break;
-	caddr += s->cis_table[i].len;
-    }
-    return (i < s->cis_used);
+			read_cis_mem(s, cis->attr, cis->addr, len, buf);
+
+		if (memcmp(buf, cis->cache, len) != 0)
+			return -1;
+	}
+	return 0;
 }
 
 /*======================================================================
@@ -449,14 +473,16 @@
 	if ((link[0] == CISTPL_LINKTARGET) && (link[1] >= 3) &&
 	    (strncmp(link+2, "CIS", 3) == 0))
 	    return ofs;
+	remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5);
 	/* Then, we try the wrong spot... */
 	ofs = ofs >> 1;
     }
     read_cis_cache(s, SPACE(tuple->Flags), ofs, 5, link);
-    if ((link[0] != CISTPL_LINKTARGET) || (link[1] < 3) ||
-	(strncmp(link+2, "CIS", 3) != 0))
-	return -1;
-    return ofs;
+    if ((link[0] == CISTPL_LINKTARGET) && (link[1] >= 3) &&
+	(strncmp(link+2, "CIS", 3) == 0))
+	return ofs;
+    remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5);
+    return -1;
 }
 
 int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
diff -urN linux-2.5.68-bk4/drivers/pcmcia/cs.c linux-2.5.68-bk5/drivers/pcmcia/cs.c
--- linux-2.5.68-bk4/drivers/pcmcia/cs.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/pcmcia/cs.c	2003-04-24 04:34:52.000000000 -0700
@@ -342,6 +342,7 @@
 		s->cis_mem.flags = 0;
 		s->cis_mem.speed = cis_speed;
 		s->erase_busy.next = s->erase_busy.prev = &s->erase_busy;
+		INIT_LIST_HEAD(&s->cis_cache);
 		spin_lock_init(&s->lock);
     
 		/* TBD: remove usage of socket_table, use class_for_each_dev instead */
@@ -469,7 +470,7 @@
     init_socket(s);
     s->irq.AssignedIRQ = s->irq.Config = 0;
     s->lock_count = 0;
-    s->cis_used = 0;
+    destroy_cis_cache(s);
     if (s->fake_cis) {
 	kfree(s->fake_cis);
 	s->fake_cis = NULL;
@@ -484,7 +485,6 @@
     set_socket(s, &s->socket);
     /* */
 #ifdef CONFIG_CARDBUS
-    cb_release_cis_mem(s);
     cb_free(s);
 #endif
     s->functions = 0;
diff -urN linux-2.5.68-bk4/drivers/pcmcia/cs_internal.h linux-2.5.68-bk5/drivers/pcmcia/cs_internal.h
--- linux-2.5.68-bk4/drivers/pcmcia/cs_internal.h	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/drivers/pcmcia/cs_internal.h	2003-04-24 04:34:52.000000000 -0700
@@ -114,9 +114,13 @@
 /* Maximum number of memory windows per socket */
 #define MAX_WIN 4
 
-/* The size of the CIS cache */
-#define MAX_CIS_TABLE	64
-#define MAX_CIS_DATA	512
+struct cis_cache_entry {
+	struct list_head	node;
+	unsigned int		addr;
+	unsigned int		len;
+	unsigned int		attr;
+	unsigned char		cache[0];
+};
 
 typedef struct socket_info_t {
     spinlock_t			lock;
@@ -145,13 +149,7 @@
     window_t			win[MAX_WIN];
     region_t			*c_region, *a_region;
     erase_busy_t		erase_busy;
-    int				cis_used;
-    struct {
-	u_int			addr;
-	u_short			len;
-	u_short			attr;
-    }				cis_table[MAX_CIS_TABLE];
-    char			cis_cache[MAX_CIS_DATA];
+    struct list_head		cis_cache;
     u_int			fake_cis_len;
     char			*fake_cis;
 #ifdef CONFIG_PROC_FS
@@ -198,7 +196,6 @@
 int cb_alloc(socket_info_t *s);
 void cb_free(socket_info_t *s);
 int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr);
-void cb_release_cis_mem(socket_info_t *s);
 
 /* In cistpl.c */
 int read_cis_mem(socket_info_t *s, int attr,
@@ -206,6 +203,7 @@
 void write_cis_mem(socket_info_t *s, int attr,
 		   u_int addr, u_int len, void *ptr);
 void release_cis_mem(socket_info_t *s);
+void destroy_cis_cache(socket_info_t *s);
 int verify_cis_cache(socket_info_t *s);
 void preload_cis_cache(socket_info_t *s);
 int get_first_tuple(client_handle_t handle, tuple_t *tuple);
diff -urN linux-2.5.68-bk4/drivers/pcmcia/rsrc_mgr.c linux-2.5.68-bk5/drivers/pcmcia/rsrc_mgr.c
--- linux-2.5.68-bk4/drivers/pcmcia/rsrc_mgr.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/pcmcia/rsrc_mgr.c	2003-04-24 04:34:52.000000000 -0700
@@ -351,7 +351,7 @@
     ret = pcmcia_validate_cis(s->clients, &info1);
     /* invalidate mapping and CIS cache */
     iounmap(s->cis_virt);
-    s->cis_used = 0;
+    destroy_cis_cache(s);
     if ((ret != 0) || (info1.Chains == 0))
 	return 0;
     s->cis_mem.sys_start = base+s->cap.map_size;
@@ -359,7 +359,7 @@
     s->cis_virt = ioremap(base+s->cap.map_size, s->cap.map_size);
     ret = pcmcia_validate_cis(s->clients, &info2);
     iounmap(s->cis_virt);
-    s->cis_used = 0;
+    destroy_cis_cache(s);
     return ((ret == 0) && (info1.Chains == info2.Chains));
 }
 
@@ -499,14 +499,16 @@
 
 void validate_mem(socket_info_t *s)
 {
-    resource_map_t *m;
+    resource_map_t *m, *n;
     static int done = 0;
     
     if (probe_mem && done++ == 0) {
 	down(&rsrc_sem);
-	for (m = mem_db.next; m != &mem_db; m = m->next)
+	for (m = mem_db.next; m != &mem_db; m = n) {
+	    n = m->next;
 	    if (do_mem_probe(m->base, m->num, s))
 		break;
+	}
 	up(&rsrc_sem);
     }
 }
@@ -743,9 +745,6 @@
 	if (ret == CS_SUCCESS) {
 	    for (i = 0; i < sockets; i++) {
 		release_cis_mem(socket_table[i]);
-#ifdef CONFIG_CARDBUS
-		cb_release_cis_mem(socket_table[i]);
-#endif
 	    }
 	}
 	break;
diff -urN linux-2.5.68-bk4/drivers/s390/block/dasd.c linux-2.5.68-bk5/drivers/s390/block/dasd.c
--- linux-2.5.68-bk4/drivers/s390/block/dasd.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/block/dasd.c	2003-04-24 04:34:52.000000000 -0700
@@ -10,8 +10,6 @@
  * $Revision: 1.94 $
  */
 
-#define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */
-
 #include <linux/config.h>
 #include <linux/kmod.h>
 #include <linux/init.h>
@@ -1694,50 +1692,51 @@
 static int
 dasd_open(struct inode *inp, struct file *filp)
 {
-	struct dasd_device *device;
+	struct gendisk *disk = inp->i_bdev->bd_disk;
+	struct dasd_device *device = disk->private_data;
 	int rc;
+
+	if (!try_module_get(device->discipline->owner))
+		return -EINVAL;
 	
 	if (dasd_probeonly) {
 		MESSAGE(KERN_INFO,
-			"No access to device (%d:%d) due to probeonly mode",
-			major(inp->i_rdev), minor(inp->i_rdev));
-		return -EPERM;
+			"No access to device %s due to probeonly mode",
+			disk->disk_name);
+		rc = -EPERM;
+		goto out;
 	}
 
-	device = inp->i_bdev->bd_disk->private_data;
+	rc = -ENODEV;
 	if (device->state < DASD_STATE_BASIC) {
 		DBF_DEV_EVENT(DBF_ERR, device, " %s",
 			      " Cannot open unrecognized device");
-		return -ENODEV;
+		rc = -ENODEV;
+		goto out;
 	}
-	rc = 0;
 
-	if (atomic_inc_return(&device->open_count) == 1) {
-		if (!try_module_get(device->discipline->owner)) {
-			/* Discipline is currently unloaded! */
-			atomic_dec(&device->open_count);
-			rc = -ENODEV;
-		}
-	}
+	atomic_inc(&device->open_count);
+	return 0;
+
+out:
+	module_put(device->discipline->owner);
 	return rc;
 }
 
 static int
 dasd_release(struct inode *inp, struct file *filp)
 {
-	struct dasd_device *device;
-
-	device = inp->i_bdev->bd_disk->private_data;
+	struct gendisk *disk = inp->i_bdev->bd_disk;
+	struct dasd_device *device = isk->private_data;
 
 	if (device->state < DASD_STATE_ACCEPT) {
 		DBF_DEV_EVENT(DBF_ERR, device, " %s",
 			      " Cannot release unrecognized device");
 		return -EINVAL;
 	}
-	if (atomic_dec_return(&device->open_count) == 0) {
-		invalidate_buffers(inp->i_rdev);
-		module_put(device->discipline->owner);
-	}
+
+	atomic_dec(&device->open_count);
+	module_put(device->discipline->owner);
 	return 0;
 }
 
@@ -2057,13 +2056,9 @@
 
 	DBF_EVENT(DBF_EMERG, "%s", "debug area created");
 
-#ifdef CONFIG_DEVFS_FS
-	if (!devfs_mk_dir("dasd")) {
-		DBF_EVENT(DBF_ALERT, "%s", "no devfs");
-		rc = -ENOSYS;
+	rc = devfs_mk_dir("dasd");
+	if (rc)
 		goto failed;
-	}
-#endif
 	rc = dasd_devmap_init();
 	if (rc)
 		goto failed;
diff -urN linux-2.5.68-bk4/drivers/s390/char/con3215.c linux-2.5.68-bk5/drivers/s390/char/con3215.c
--- linux-2.5.68-bk4/drivers/s390/char/con3215.c	2003-04-19 19:50:10.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/con3215.c	2003-04-24 04:34:52.000000000 -0700
@@ -957,7 +957,7 @@
 	struct raw3215_info *raw;
 	int retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_3215))
 		return -ENODEV;
 
@@ -1182,7 +1182,6 @@
 	tty3215_driver.owner = THIS_MODULE;
 	tty3215_driver.driver_name = "tty3215";
 	tty3215_driver.name = "ttyS";
-	tty3215_driver.name_base = 0;
 	tty3215_driver.major = TTY_MAJOR;
 	tty3215_driver.minor_start = 64;
 	tty3215_driver.num = NR_3215;
diff -urN linux-2.5.68-bk4/drivers/s390/char/sclp_tty.c linux-2.5.68-bk5/drivers/s390/char/sclp_tty.c
--- linux-2.5.68-bk4/drivers/s390/char/sclp_tty.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/sclp_tty.c	2003-04-24 04:34:52.000000000 -0700
@@ -761,7 +761,6 @@
 	sclp_tty_driver.owner = THIS_MODULE;
 	sclp_tty_driver.driver_name = "sclp_line";
 	sclp_tty_driver.name = "ttyS";
-	sclp_tty_driver.name_base = 0;
 	sclp_tty_driver.major = TTY_MAJOR;
 	sclp_tty_driver.minor_start = 64;
 	sclp_tty_driver.num = 1;
diff -urN linux-2.5.68-bk4/drivers/s390/char/tape.h linux-2.5.68-bk5/drivers/s390/char/tape.h
--- linux-2.5.68-bk4/drivers/s390/char/tape.h	2003-04-19 19:50:09.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/tape.h	2003-04-24 04:34:52.000000000 -0700
@@ -23,6 +23,8 @@
 #include <asm/debug.h>
 #include <asm/idals.h>
 
+struct gendisk;
+
 /*
  * macros s390 debug feature (dbf)
  */
@@ -173,6 +175,7 @@
 	struct tasklet_struct tasklet;
 	/* Current position on the tape. */
 	long block_position;
+	struct gendisk *disk;
 };
 #endif
 
diff -urN linux-2.5.68-bk4/drivers/s390/char/tape_block.c linux-2.5.68-bk5/drivers/s390/char/tape_block.c
--- linux-2.5.68-bk4/drivers/s390/char/tape_block.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/tape_block.c	2003-04-24 04:34:52.000000000 -0700
@@ -208,38 +208,65 @@
 int
 tapeblock_setup_device(struct tape_device * device)
 {
-	request_queue_t *blk_queue;
+	struct tape_blk_data *d = &device->blk_data;
+	request_queue_t *q = &d->request_queue;
+	struct gendisk *disk = alloc_disk(1);
 	int rc;
 
-	/* Setup request queue and initialize gendisk for this device. */
-	tasklet_init(&device->blk_data.tasklet, tapeblock_tasklet,
-		     (unsigned long) device);
-	spin_lock_init(&device->blk_data.request_queue_lock);
-	blk_queue = &device->blk_data.request_queue;
-	rc = blk_init_queue(blk_queue, tapeblock_request_fn,
-			    &device->blk_data.request_queue_lock);
-
-	elevator_exit(blk_queue);
-	rc = elevator_init(blk_queue, &elevator_noop);
-	if (rc) {
-		blk_cleanup_queue(blk_queue);
-		return rc;
-	}
+	if (!disk)
+		return -ENOMEM;
+
+	tasklet_init(&d->tasklet, tapeblock_tasklet, (unsigned long)device);
+
+	spin_lock_init(&d->request_queue_lock);
+	rc = blk_init_queue(q, tapeblock_request_fn, &d->request_queue_lock);
+	if (rc)
+		goto put_disk;
+
+	elevator_exit(q);
+	rc = elevator_init(q, &elevator_noop);
+	if (rc)
+		goto cleanup_queue;
+
 	/* FIXME: We should be able to sense the sectore size */
-	blk_queue_hardsect_size(blk_queue, TAPEBLOCK_HSEC_SIZE);
-	blk_queue_max_sectors(blk_queue, TAPEBLOCK_MAX_SEC);
-	blk_queue_max_phys_segments(blk_queue, -1L);
-	blk_queue_max_hw_segments(blk_queue, -1L);
-	blk_queue_max_segment_size(blk_queue, -1L);
-	blk_queue_segment_boundary(blk_queue, -1L);
+	blk_queue_hardsect_size(q, TAPEBLOCK_HSEC_SIZE);
+	blk_queue_max_sectors(q, TAPEBLOCK_MAX_SEC);
+	blk_queue_max_phys_segments(q, -1L);
+	blk_queue_max_hw_segments(q, -1L);
+	blk_queue_max_segment_size(q, -1L);
+	blk_queue_segment_boundary(q, -1L);
+
+	disk->major = tapeblock_major;
+	disk->first_minor = i;
+	disk->fops = &tapeblock_fops;
+	disk->private_data = device;
+	disk->queue = q;
+	set_capacity(disk, size);
+
+	sprintf(disk->disk_name, "tBLK%d", i);
+	sprintf(disk->disk_name, "tBLK/%d", i);
+
+	add_disk(disk);
+	d->disk = disk;
 	return 0;
+
+ cleanup_queue:
+	blk_cleanup_queue(q);
+ put_disk:
+	put_disk(disk);
+	return rc;
 }
 
 void
 tapeblock_cleanup_device(struct tape_device *device)
 {
-	blk_cleanup_queue(&device->blk_data.request_queue);
-	tasklet_kill(&device->blk_data.tasklet);
+	struct tape_blk_data *d = &device->blk_data;
+
+	del_gendisk(d->disk);
+	put_disk(d->disk);
+	blk_cleanup_queue(&d->request_queue);
+
+	tasklet_kill(&d->tasklet);
 }
 
 /*
@@ -272,55 +299,47 @@
 /*
  * Block frontend tape device open function.
  */
-int
-tapeblock_open(struct inode *inode, struct file *filp) {
-	struct tape_device *device;
-	int minor, rc;
-
-	MOD_INC_USE_COUNT;
-	if (major(filp->f_dentry->d_inode->i_rdev) != tapeblock_major)
-		return -ENODEV;
-	minor = minor(filp->f_dentry->d_inode->i_rdev);
-	device = tape_get_device(minor >> TAPE_MINORS_PER_DEV);
-	if (IS_ERR(device)) {
-		MOD_DEC_USE_COUNT;
-		return PTR_ERR(device);
-	}
-	DBF_EVENT(6, "TBLOCK:open:  %x\n", device->first_minor);
+static int
+tapeblock_open(struct inode *inode, struct file *filp)
+{
+	struct gendisk *disk = inp->i_bdev->bd_disk;
+	struct tape_device *device = disk->private_data;
+	int rc;
+
 	rc = tape_open(device);
-	if (rc == 0) {
-		rc = tape_assign(device);
-		if (rc == 0) {
-			device->blk_data.block_position = -1;
-			rc = tapeblock_mediumdetect(device);
-			if (rc == 0) {
-				filp->private_data = device;
-				return 0;
-			}
-			tape_unassign(device);
-		}
-		tape_release(device);
-	}
+	if (rc)
+		goto put_device;
+	rc = tape_assign(device);
+	if (rc)
+		goto release;
+	device->blk_data.block_position = -1;
+	rc = tapeblock_mediumdetect(device);
+	if (rc)
+		goto unassign;
+	return 0;
+
+ unassign:
+	tape_unassign(device);
+ release:
+	tape_release(device);
+ put_device:
 	tape_put_device(device);
-	MOD_DEC_USE_COUNT;
 	return rc;
 }
 
 /*
  * Block frontend tape device release function.
  */
-int
-tapeblock_release(struct inode *inode, struct file *filp) {
-	struct tape_device *device;
+static int
+tapeblock_release(struct inode *inode, struct file *filp)
+{
+	struct gendisk *disk = inp->i_bdev->bd_disk;
+	struct tape_device *device = disk->private_data;
 
-	/* Remove all buffers at device close. */
-	/* FIXME: can we do that a tape unload ? */
-	invalidate_buffers(inode->i_rdev);
-	device = (struct tape_device *) filp->private_data;
 	tape_release(device);
 	tape_unassign(device);
 	tape_put_device(device);
-	MOD_DEC_USE_COUNT;
+
 	return 0;
 }
 
diff -urN linux-2.5.68-bk4/drivers/s390/char/tubio.h linux-2.5.68-bk5/drivers/s390/char/tubio.h
--- linux-2.5.68-bk4/drivers/s390/char/tubio.h	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/tubio.h	2003-04-24 04:34:52.000000000 -0700
@@ -383,17 +383,9 @@
 {
 	unsigned int minor = minor(ip->i_rdev);
 	tub_t *tubp = NULL;
-	if (minor == 0 && current->tty != NULL) {
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
-#ifdef CONFIG_TN3270_CONSOLE
-		if (tub3270_con_tubp != NULL &&
-		    current->tty->device == S390_CONSOLE_DEV)
-			minor = tub3270_con_tubp->minor;
-		else
-#endif
-#endif
-		if (tub_major(current->tty->device) == IBM_TTY3270_MAJOR)
-			minor = tub_minor(current->tty->device);
+	if (minor == 0 && current->tty) {
+		if (current->tty->driver == &tty3270_driver)
+			minor = current->tty->index;
 	}
 	if (minor <= tubnummins && minor > 0)
 		tubp = (*tubminors)[minor];
@@ -405,18 +397,11 @@
  */
 extern inline tub_t *TTY2TUB(struct tty_struct *tty)
 {
-	unsigned int minor = minor(tty->device);
+	unsigned index = tty->index;
 	tub_t *tubp = NULL;
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
-#ifdef CONFIG_TN3270_CONSOLE
-	if (tty->device == S390_CONSOLE_DEV)
-		tubp = tub3270_con_tubp;
-	else
-#endif
-#endif
-	if (minor <= tubnummins && minor > 0)
-		tubp = (*tubminors)[minor];
+	if (index <= tubnummins && index > 0)
+		tubp = (*tubminors)[index];
 	return tubp;
 }
 
diff -urN linux-2.5.68-bk4/drivers/s390/char/tubtty.c linux-2.5.68-bk5/drivers/s390/char/tubtty.c
--- linux-2.5.68-bk4/drivers/s390/char/tubtty.c	2003-04-19 19:50:37.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/char/tubtty.c	2003-04-24 04:34:52.000000000 -0700
@@ -539,16 +539,8 @@
 	 */
 	tubp = NULL;
 	tty = current->tty;
-	if (tty) {
-		if (tub_major(tty->device) == IBM_TTY3270_MAJOR)
-			tubp = (*tubminors)[tub_minor(tty->device)];
-#ifdef CONFIG_TN3270_CONSOLE
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
-		if (CONSOLE_IS_3270 && tty->device == S390_CONSOLE_DEV)
-			tubp = tub3270_con_tubp;
-#endif /* LINUX_VERSION_CODE */
-#endif /* CONFIG_TN3270_CONSOLE */
-	}
+	if (tty && tty->driver == &tty3270_driver)
+		tubp = (*tubminors)[tty->index];
 	if (tubp) {
 		if ((rc = tty3270_aid_set(tubp, mybuf, mycount + 1)))
 			return rc > 0? count: rc;
diff -urN linux-2.5.68-bk4/drivers/s390/net/ctctty.c linux-2.5.68-bk5/drivers/s390/net/ctctty.c
--- linux-2.5.68-bk4/drivers/s390/net/ctctty.c	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/s390/net/ctctty.c	2003-04-24 04:34:52.000000000 -0700
@@ -332,17 +332,17 @@
  ************************************************************/
 
 static inline int
-ctc_tty_paranoia_check(ctc_tty_info * info, kdev_t device, const char *routine)
+ctc_tty_paranoia_check(ctc_tty_info * info, char *name, const char *routine)
 {
 #ifdef MODEM_PARANOIA_CHECK
 	if (!info) {
-		printk(KERN_WARNING "ctc_tty: null info_struct for (%d, %d) in %s\n",
-		       major(device), minor(device), routine);
+		printk(KERN_WARNING "ctc_tty: null info_struct for %s in %s\n",
+		       name, routine);
 		return 1;
 	}
 	if (info->magic != CTC_ASYNC_MAGIC) {
-		printk(KERN_WARNING "ctc_tty: bad magic for info struct (%d, %d) in %s\n",
-		       major(device), minor(device), routine);
+		printk(KERN_WARNING "ctc_tty: bad magic for info struct %s in %s\n",
+		       name, routine);
 		return 1;
 	}
 #endif
@@ -502,7 +502,7 @@
 
 	if (ctc_tty_shuttingdown)
 		return 0;
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_write"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_write"))
 		return 0;
 	if (!tty)
 		return 0;
@@ -551,7 +551,7 @@
 {
 	ctc_tty_info *info = (ctc_tty_info *) tty->driver_data;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_write_room"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_write_room"))
 		return 0;
 	return CTC_TTY_XMIT_SIZE;
 }
@@ -561,7 +561,7 @@
 {
 	ctc_tty_info *info = (ctc_tty_info *) tty->driver_data;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_chars_in_buffer"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_chars_in_buffer"))
 		return 0;
 	return 0;
 }
@@ -576,7 +576,7 @@
 		return;
 	spin_lock_irqsave(&ctc_tty_lock, flags);
 	info = (ctc_tty_info *) tty->driver_data;
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_flush_buffer")) {
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_buffer")) {
 		spin_unlock_irqrestore(&ctc_tty_lock, flags);
 		return;
 	}
@@ -596,7 +596,7 @@
 
 	if (ctc_tty_shuttingdown)
 		return;
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_flush_chars"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_chars"))
 		return;
 	if (tty->stopped || tty->hw_stopped || (!skb_queue_len(&info->tx_queue)))
 		return;
@@ -616,7 +616,7 @@
 {
 	ctc_tty_info *info = (ctc_tty_info *) tty->driver_data;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_throttle"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_throttle"))
 		return;
 	info->mcr &= ~UART_MCR_RTS;
 	if (I_IXOFF(tty))
@@ -629,7 +629,7 @@
 {
 	ctc_tty_info *info = (ctc_tty_info *) tty->driver_data;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_unthrottle"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_unthrottle"))
 		return;
 	info->mcr |= UART_MCR_RTS;
 	if (I_IXOFF(tty))
@@ -744,7 +744,7 @@
 	int error;
 	int retval;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_ioctl"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_ioctl"))
 		return -ENODEV;
 	if (tty->flags & (1 << TTY_IO_ERROR))
 		return -EIO;
@@ -973,17 +973,17 @@
 	int retval,
 	 line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if (line < 0 || line > CTC_TTY_MAX_DEVICES)
 		return -ENODEV;
 	info = &driver->info[line];
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_open"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_open"))
 		return -ENODEV;
 	if (!info->netdev)
 		return -ENODEV;
 #ifdef CTC_DEBUG_MODEM_OPEN
-	printk(KERN_DEBUG "ctc_tty_open %s%d, count = %d\n", tty->driver.name,
-	       info->line, info->count);
+	printk(KERN_DEBUG "ctc_tty_open %s, count = %d\n", tty->name,
+	       info->count);
 #endif
 	spin_lock_irqsave(&ctc_tty_lock, saveflags);
 	info->count++;
@@ -1012,7 +1012,7 @@
 		ctc_tty_change_speed(info);
 	}
 #ifdef CTC_DEBUG_MODEM_OPEN
-	printk(KERN_DEBUG "ctc_tty_open %s%d successful...\n", CTC_TTY_NAME, info->line);
+	printk(KERN_DEBUG "ctc_tty_open %s successful...\n", tty->name);
 #endif
 	return 0;
 }
@@ -1024,7 +1024,7 @@
 	ulong flags;
 	ulong timeout;
 
-	if (!info || ctc_tty_paranoia_check(info, tty->device, "ctc_tty_close"))
+	if (!info || ctc_tty_paranoia_check(info, tty->name, "ctc_tty_close"))
 		return;
 	spin_lock_irqsave(&ctc_tty_lock, flags);
 	if (tty_hung_up_p(filp)) {
@@ -1091,8 +1091,8 @@
 		}
 	}
 	ctc_tty_shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	info->tty = 0;
@@ -1119,7 +1119,7 @@
 	ctc_tty_info *info = (ctc_tty_info *)tty->driver_data;
 	unsigned long saveflags;
 
-	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_hangup"))
+	if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_hangup"))
 		return;
 	ctc_tty_shutdown(info);
 	info->count = 0;
diff -urN linux-2.5.68-bk4/drivers/sbus/char/aurora.c linux-2.5.68-bk5/drivers/sbus/char/aurora.c
--- linux-2.5.68-bk4/drivers/sbus/char/aurora.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/sbus/char/aurora.c	2003-04-24 04:34:52.000000000 -0700
@@ -107,7 +107,7 @@
 DECLARE_TASK_QUEUE(tq_aurora);
 
 static inline int aurora_paranoia_check(struct Aurora_port const * port,
-				    kdev_t device, const char *routine)
+				    char *name, const char *routine)
 {
 #ifdef AURORA_PARANOIA_CHECK
 	static const char *badmagic =
@@ -116,11 +116,11 @@
 		KERN_DEBUG "aurora: Warning: null aurora port for device %s in %s\n";
 
 	if (!port) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (port->magic != AURORA_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -1421,7 +1421,7 @@
 	printk("aurora_open: start\n");
 #endif
 	
-	board = AURORA_BOARD(minor(tty->device));
+	board = AURORA_BOARD(tty->index);
 	if (board > AURORA_NBOARD ||
 	    !(aurora_board[board].flags & AURORA_BOARD_PRESENT)) {
 #ifdef AURORA_DEBUG
@@ -1432,8 +1432,8 @@
 	}
 	
 	bp = &aurora_board[board];
-	port = aurora_port + board * AURORA_NPORT * AURORA_NCD180 + AURORA_PORT(minor(tty->device));
-	if (aurora_paranoia_check(port, tty->device, "aurora_open")) {
+	port = aurora_port + board * AURORA_NPORT * AURORA_NCD180 + AURORA_PORT(tty->index);
+	if ((aurora_paranoia_check(port, tty->name, "aurora_open")) {
 #ifdef AURORA_DEBUG
 		printk("aurora_open: error paranoia check\n");
 #endif
@@ -1485,7 +1485,7 @@
 	printk("aurora_close: start\n");
 #endif
 	
-	if (!port || aurora_paranoia_check(port, tty->device, "close"))
+	if (!port || (aurora_paranoia_check(port, tty->name, "close"))
 		return;
 	
 	chip = AURORA_CD180(port_No(port));
@@ -1564,8 +1564,8 @@
 	printk("aurora_close: shutdown_port\n");
 #endif
 	aurora_shutdown_port(bp, port);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1599,7 +1599,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_write: start %d\n",count);
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_write"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_write"))
 		return 0;
 		
 	chip = AURORA_CD180(port_No(port));
@@ -1681,7 +1681,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_put_char: start %c\n",ch);
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_put_char"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_put_char"))
 		return;
 
 	if (!tty || !port->xmit_buf)
@@ -1712,7 +1712,7 @@
 /*#ifdef AURORA_DEBUG
 	printk("aurora_flush_chars: start\n");
 #endif*/
-	if (aurora_paranoia_check(port, tty->device, "aurora_flush_chars"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_flush_chars"))
 		return;
 		
 	chip = AURORA_CD180(port_No(port));
@@ -1742,7 +1742,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_write_room: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_write_room"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_write_room"))
 		return 0;
 
 	ret = SERIAL_XMIT_SIZE - port->xmit_cnt - 1;
@@ -1758,7 +1758,7 @@
 {
 	struct Aurora_port *port = (struct Aurora_port *) tty->driver_data;
 				
-	if (aurora_paranoia_check(port, tty->device, "aurora_chars_in_buffer"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_chars_in_buffer"))
 		return 0;
 	
 	return port->xmit_cnt;
@@ -1772,7 +1772,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_flush_buffer: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_flush_buffer"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_flush_buffer"))
 		return;
 
 	save_flags(flags); cli();
@@ -2001,7 +2001,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_ioctl: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_ioctl"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_ioctl"))
 		return -ENODEV;
 	
 	switch (cmd) {
@@ -2062,7 +2062,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_throttle: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_throttle"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_throttle"))
 		return;
 	
 	bp = port_Board(port);
@@ -2094,7 +2094,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_unthrottle: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_unthrottle"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_unthrottle"))
 		return;
 	
 	bp = port_Board(port);
@@ -2129,7 +2129,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_stop: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_stop"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_stop"))
 		return;
 	
 	bp = port_Board(port);
@@ -2159,7 +2159,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_start: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_start"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_start"))
 		return;
 	
 	bp = port_Board(port);
@@ -2215,7 +2215,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_hangup: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_hangup"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_hangup"))
 		return;
 	
 	bp = port_Board(port);
@@ -2239,7 +2239,7 @@
 #ifdef AURORA_DEBUG
 	printk("aurora_set_termios: start\n");
 #endif
-	if (aurora_paranoia_check(port, tty->device, "aurora_set_termios"))
+	if ((aurora_paranoia_check(port, tty->name, "aurora_set_termios"))
 		return;
 	
 	if (tty->termios->c_cflag == old_termios->c_cflag &&
diff -urN linux-2.5.68-bk4/drivers/sbus/char/cpwatchdog.c linux-2.5.68-bk5/drivers/sbus/char/cpwatchdog.c
--- linux-2.5.68-bk4/drivers/sbus/char/cpwatchdog.c	2003-04-24 04:34:47.000000000 -0700
+++ linux-2.5.68-bk5/drivers/sbus/char/cpwatchdog.c	2003-04-24 04:34:52.000000000 -0700
@@ -325,13 +325,11 @@
 		wd_dev.initialized = 1;
 	}
 
-	MOD_INC_USE_COUNT;
 	return(0);
 }
 
 static int wd_release(struct inode *inode, struct file *file)
 {
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
diff -urN linux-2.5.68-bk4/drivers/sbus/char/envctrl.c linux-2.5.68-bk5/drivers/sbus/char/envctrl.c
--- linux-2.5.68-bk4/drivers/sbus/char/envctrl.c	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk5/drivers/sbus/char/envctrl.c	2003-04-24 04:34:52.000000000 -0700
@@ -707,7 +707,6 @@
 envctrl_open(struct inode *inode, struct file *file)
 {
 	file->private_data = 0;
-	MOD_INC_USE_COUNT;
 	return 0;
 }
 
@@ -717,7 +716,6 @@
 static int
 envctrl_release(struct inode *inode, struct file *file)
 {
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
diff -urN linux-2.5.68-bk4/drivers/scsi/scsi.c linux-2.5.68-bk5/drivers/scsi/scsi.c
--- linux-2.5.68-bk4/drivers/scsi/scsi.c	2003-04-19 19:49:32.000000000 -0700
+++ linux-2.5.68-bk5/drivers/scsi/scsi.c	2003-04-24 04:34:52.000000000 -0700
@@ -52,6 +52,7 @@
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/completion.h>
+#include <linux/devfs_fs_kernel.h>
 
 #define __KERNEL_SYSCALLS__
 
diff -urN linux-2.5.68-bk4/drivers/scsi/sg.c linux-2.5.68-bk5/drivers/scsi/sg.c
--- linux-2.5.68-bk4/drivers/scsi/sg.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk5/drivers/scsi/sg.c	2003-04-24 04:34:52.000000000 -0700
@@ -55,6 +55,7 @@
 #include <linux/vmalloc.h>
 #include <linux/smp_lock.h>
 #include <linux/moduleparam.h>
+#include <linux/devfs_fs_kernel.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
diff -urN linux-2.5.68-bk4/drivers/serial/21285.c linux-2.5.68-bk5/drivers/serial/21285.c
--- linux-2.5.68-bk4/drivers/serial/21285.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/21285.c	2003-04-24 04:34:52.000000000 -0700
@@ -517,7 +517,7 @@
 static struct uart_driver serial21285_reg = {
 	.owner			= THIS_MODULE,
 	.driver_name		= "ttyFB",
-	.dev_name		= "ttyFB%d",
+	.dev_name		= "ttyFB",
 	.major			= SERIAL_21285_MAJOR,
 	.minor			= SERIAL_21285_MINOR,
 	.nr			= 1,
diff -urN linux-2.5.68-bk4/drivers/serial/68328serial.c linux-2.5.68-bk5/drivers/serial/68328serial.c
--- linux-2.5.68-bk4/drivers/serial/68328serial.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/68328serial.c	2003-04-24 04:34:52.000000000 -0700
@@ -151,20 +151,20 @@
 DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct m68k_serial *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
-		"Warning: bad magic number for serial struct (%d, %d) in %s\n";
+		"Warning: bad magic number for serial struct %s in %s\n";
 	static const char *badinfo =
-		"Warning: null m68k_serial for (%d, %d) in %s\n";
+		"Warning: null m68k_serial for %s in %s\n";
 
 	if (!info) {
-		printk(badinfo, major(device), minor(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, major(device), minor(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -216,7 +216,7 @@
 	m68328_uart *uart = &uart_addr[info->line];
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -246,7 +246,7 @@
 	m68328_uart *uart = &uart_addr[info->line];
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -711,7 +711,7 @@
 {
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_set_ldisc"))
+	if (serial_paranoia_check(info, tty->name, "rs_set_ldisc"))
 		return;
 
 	info->is_cons = (tty->termios->c_line == N_TTY);
@@ -725,7 +725,7 @@
 	m68328_uart *uart = &uart_addr[info->line];
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 #ifndef USE_INTS
 	for(;;) {
@@ -774,7 +774,7 @@
 	m68328_uart *uart = &uart_addr[info->line];
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf)
@@ -838,7 +838,7 @@
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -850,7 +850,7 @@
 {
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -859,7 +859,7 @@
 {
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	cli();
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -882,7 +882,7 @@
 {
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -895,7 +895,7 @@
 {
 	struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1035,7 +1035,7 @@
 	struct m68k_serial * info = (struct m68k_serial *)tty->driver_data;
 	int retval;
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1140,7 +1140,7 @@
 	m68328_uart *uart = &uart_addr[info->line];
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1198,8 +1198,8 @@
 	uart->ustcnt &= ~(USTCNT_RXEN | USTCNT_RX_INTR_MASK);
 
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1233,7 +1233,7 @@
 {
 	struct m68k_serial * info = (struct m68k_serial *)tty->driver_data;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 	
 	rs_flush_buffer(tty);
@@ -1277,7 +1277,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & S_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & S_CALLOUT_ACTIVE) &&
@@ -1374,14 +1374,14 @@
 	struct m68k_serial	*info;
 	int 			retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	
 	if (line >= NR_PORTS || line < 0) /* we have exactly one */
 		return -ENODEV;
 
 	info = &m68k_soft[line];
 
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 
 	info->count++;
@@ -1401,7 +1401,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & S_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
diff -urN linux-2.5.68-bk4/drivers/serial/68360serial.c linux-2.5.68-bk5/drivers/serial/68360serial.c
--- linux-2.5.68-bk4/drivers/serial/68360serial.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/68360serial.c	2003-04-24 04:34:52.000000000 -0700
@@ -282,7 +282,7 @@
 static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout);
 
 static inline int serial_paranoia_check(ser_info_t *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
@@ -291,11 +291,11 @@
 		"Warning: null async_struct for (%s) in %s\n";
 
 	if (!info) {
-		printk(badinfo, cdevname(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, cdevname(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -339,7 +339,7 @@
  	volatile struct scc_regs *sccp;
  	volatile struct smc_regs *smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	local_irq_save(flags);
@@ -364,7 +364,7 @@
 	volatile struct scc_regs *sccp;
 	volatile struct smc_regs *smcp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	local_irq_save(flags);
@@ -1036,7 +1036,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	volatile QUICC_BD	*bdp;
 
-	if (serial_paranoia_check(info, tty->device, "rs_put_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
 	if (!tty)
@@ -1074,7 +1074,7 @@
 		return ret;
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty) 
@@ -1127,7 +1127,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	int	ret;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 
 	if ((info->tx_cur->status & BD_SC_READY) == 0) {
@@ -1147,7 +1147,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return 0;
 }
@@ -1156,7 +1156,7 @@
 {
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 
 	/* There is nothing to "flush", whatever we gave the CPM
@@ -1179,7 +1179,7 @@
 
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_send_char"))
+	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
 		return;
 
 	bdp = info->tx_cur;
@@ -1218,7 +1218,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1244,7 +1244,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1458,7 +1458,7 @@
 	/* struct async_icount_24 cnow;*/ 	/* kernel counter temps */
 	struct serial_icounter_struct *p_cuser;	/* user space */
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
@@ -1671,7 +1671,7 @@
 	volatile struct smc_regs	*smcp;
 	volatile struct scc_regs	*sccp;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 
 	state = info->state;
@@ -1754,8 +1754,8 @@
 		rs_360_wait_until_sent(tty, info->timeout);
 	}
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1785,7 +1785,7 @@
 	/*int lsr;*/
 	volatile QUICC_BD *bdp;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 #ifdef maybe
@@ -1852,7 +1852,7 @@
 	ser_info_t *info = (ser_info_t *)tty->driver_data;
 	struct serial_state *state = info->state;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	state = info->state;
@@ -1905,7 +1905,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2041,18 +2041,17 @@
 	ser_info_t	*info;
 	int 		retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 	retval = get_async_struct(line, &info);
 	if (retval)
 		return retval;
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->state->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
 #endif
 	tty->driver_data = info;
 	info->tty = tty;
@@ -2077,7 +2076,7 @@
 
 	if ((info->state->count == 1) &&
 	    (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->state->normal_termios;
 		else 
 			*tty->termios = info->state->callout_termios;
@@ -2088,7 +2087,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...", info->line);
+	printk("rs_open %s successful...", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/serial/8250.c linux-2.5.68-bk5/drivers/serial/8250.c
--- linux-2.5.68-bk4/drivers/serial/8250.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/8250.c	2003-04-24 04:34:52.000000000 -0700
@@ -1830,7 +1830,7 @@
 	for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port);
 	     i++, up++) {
 		up->port.iobase   = old_serial_port[i].port;
-		up->port.irq      = irq_cannonicalize(old_serial_port[i].irq);
+		up->port.irq      = irq_canonicalize(old_serial_port[i].irq);
 		up->port.uartclk  = old_serial_port[i].baud_base * 16;
 		up->port.flags    = old_serial_port[i].flags |
 				    UPF_RESOURCES;
@@ -2003,9 +2003,9 @@
 	.owner			= THIS_MODULE,
 	.driver_name		= "serial",
 #ifdef CONFIG_DEVFS_FS
-	.dev_name		= "tts/%d",
+	.dev_name		= "tts/",
 #else
-	.dev_name		= "ttyS%d",
+	.dev_name		= "ttyS",
 #endif
 	.major			= TTY_MAJOR,
 	.minor			= 64,
diff -urN linux-2.5.68-bk4/drivers/serial/amba.c linux-2.5.68-bk5/drivers/serial/amba.c
--- linux-2.5.68-bk4/drivers/serial/amba.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/amba.c	2003-04-24 04:34:52.000000000 -0700
@@ -720,7 +720,7 @@
 static struct uart_driver amba_reg = {
 	.owner			= THIS_MODULE,
 	.driver_name		= "ttyAM",
-	.dev_name		= "ttyAM%d",
+	.dev_name		= "ttyAM",
 	.major			= SERIAL_AMBA_MAJOR,
 	.minor			= SERIAL_AMBA_MINOR,
 	.nr			= UART_NR,
diff -urN linux-2.5.68-bk4/drivers/serial/clps711x.c linux-2.5.68-bk5/drivers/serial/clps711x.c
--- linux-2.5.68-bk4/drivers/serial/clps711x.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/clps711x.c	2003-04-24 04:34:52.000000000 -0700
@@ -581,7 +581,7 @@
 
 static struct uart_driver clps711x_reg = {
 	.driver_name		= "ttyCL",
-	.dev_name		= "ttyCL%d",
+	.dev_name		= "ttyCL",
 	.major			= SERIAL_CLPS711X_MAJOR,
 	.minor			= SERIAL_CLPS711X_MINOR,
 	.nr			= UART_NR,
diff -urN linux-2.5.68-bk4/drivers/serial/core.c linux-2.5.68-bk5/drivers/serial/core.c
--- linux-2.5.68-bk4/drivers/serial/core.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/core.c	2003-04-24 04:34:52.000000000 -0700
@@ -577,8 +577,7 @@
 	struct uart_port *port = state->port;
 	unsigned long flags;
 
-	DPRINTK("uart_flush_buffer(%d) called\n",
-	        minor(tty->device) - tty->driver.minor_start);
+	DPRINTK("uart_flush_buffer(%d) called\n", tty->index);
 
 	spin_lock_irqsave(&port->lock, flags);
 	uart_circ_clear(&state->info->xmit);
@@ -683,7 +682,7 @@
 	if (HIGH_BITS_OFFSET)
 		new_port += (unsigned long) new_serial.port_high << HIGH_BITS_OFFSET;
 
-	new_serial.irq = irq_cannonicalize(new_serial.irq);
+	new_serial.irq = irq_canonicalize(new_serial.irq);
 
 	/*
 	 * This semaphore protects state->count.  It is also
@@ -839,7 +838,7 @@
 			 * need to rate-limit; it's CAP_SYS_ADMIN only. */
 			if (port->flags & UPF_SPD_MASK) {
 				printk(KERN_NOTICE "%s sets custom speed on %s%d. This is deprecated.\n",
-				       current->comm, state->info->tty->driver.name, 
+				       current->comm, state->info->tty->driver->name, 
 				       state->port->line);
 			}
 			uart_change_speed(state, NULL);
@@ -1233,8 +1232,8 @@
 		state->count = 1;
 	}
 	if (--state->count < 0) {
-		printk("rs_close: bad serial port count for %s%d: %d\n",
-		       tty->driver.name, port->line, state->count);
+		printk("rs_close: bad serial port count for %s: %d\n",
+		       tty->name, state->count);
 		state->count = 0;
 	}
 	if (state->count)
@@ -1554,20 +1553,20 @@
  */
 static int uart_open(struct tty_struct *tty, struct file *filp)
 {
-	struct uart_driver *drv = (struct uart_driver *)tty->driver.driver_state;
+	struct uart_driver *drv = (struct uart_driver *)tty->driver->driver_state;
 	struct uart_state *state;
-	int retval, line = minor(tty->device) - tty->driver.minor_start;
+	int retval, line = tty->index;
 
 	BUG_ON(!kernel_locked());
 	DPRINTK("uart_open(%d) called\n", line);
 
 	/*
-	 * tty->driver.num won't change, so we won't fail here with
+	 * tty->driver->num won't change, so we won't fail here with
 	 * tty->driver_data set to something non-NULL (and therefore
 	 * we won't get caught by uart_close()).
 	 */
 	retval = -ENODEV;
-	if (line >= tty->driver.num)
+	if (line >= tty->driver->num)
 		goto fail;
 
 	/*
@@ -1961,7 +1960,7 @@
 static inline void
 uart_report_port(struct uart_driver *drv, struct uart_port *port)
 {
-	printk(drv->dev_name, port->line);
+	printk("%s%d", drv->dev_name, port->line);
 	printk(" at ");
 	switch (port->iotype) {
 	case UPIO_PORT:
@@ -2235,7 +2234,7 @@
 	 * Register the port whether it's detected or not.  This allows
 	 * setserial to be used to alter this ports parameters.
 	 */
-	tty_register_device(drv->tty_driver, drv->minor + port->line);
+	tty_register_device(drv->tty_driver, port->line);
 
  out:
 	up(&port_sem);
@@ -2267,7 +2266,7 @@
 	/*
 	 * Remove the devices from devfs
 	 */
-	tty_unregister_device(drv->tty_driver, drv->minor + port->line);
+	tty_unregister_device(drv->tty_driver, port->line);
 
 	uart_unconfigure_port(drv, state);
 	state->port = NULL;
@@ -2414,7 +2413,7 @@
 
 	if (line < 0 || line >= drv->nr) {
 		printk(KERN_ERR "Attempt to unregister ");
-		printk(drv->dev_name, line);
+		printk("%s%d", drv->dev_name, line);
 		printk("\n");
 		return;
 	}
diff -urN linux-2.5.68-bk4/drivers/serial/mcfserial.c linux-2.5.68-bk5/drivers/serial/mcfserial.c
--- linux-2.5.68-bk4/drivers/serial/mcfserial.c	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/mcfserial.c	2003-04-24 04:34:52.000000000 -0700
@@ -148,20 +148,20 @@
 
 
 static inline int serial_paranoia_check(struct mcf_serial *info,
-					kdev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
-		"MCFRS(warning): bad magic number for serial struct (%d, %d) in %s\n";
+		"MCFRS(warning): bad magic number for serial struct %s in %s\n";
 	static const char *badinfo =
-		"MCFRS(warning): null mcf_serial for (%d, %d) in %s\n";
+		"MCFRS(warning): null mcf_serial for %s in %s\n";
 
 	if (!info) {
-		printk(badinfo, MAJOR(device), MINOR(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, MAJOR(device), MINOR(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -257,7 +257,7 @@
 	struct mcf_serial	*info = (struct mcf_serial *)tty->driver_data;
 	unsigned long		flags;
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_stop"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_stop"))
 		return;
 	
 	local_irq_save(flags);
@@ -273,7 +273,7 @@
 	struct mcf_serial	*info = (struct mcf_serial *)tty->driver_data;
 	unsigned long		flags;
 	
-	if (serial_paranoia_check(info, tty->device, "mcfrs_start"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_start"))
 		return;
 
 	local_irq_save(flags);
@@ -712,7 +712,7 @@
 	struct mcf_serial	*info = (struct mcf_serial *)tty->driver_data;
 	unsigned long		flags;
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -740,7 +740,7 @@
 		__FILE__, __LINE__, tty, from_user, buf, count);
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_write"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf)
@@ -792,7 +792,7 @@
 	struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "mcfrs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -804,7 +804,7 @@
 {
 	struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "mcfrs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -814,7 +814,7 @@
 	struct mcf_serial	*info = (struct mcf_serial *)tty->driver_data;
 	unsigned long		flags;
 				
-	if (serial_paranoia_check(info, tty->device, "mcfrs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_flush_buffer"))
 		return;
 
 	local_irq_save(flags);
@@ -845,7 +845,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -864,7 +864,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1002,7 +1002,7 @@
 	int retval, error;
 	int dtr, rts;
 
-	if (serial_paranoia_check(info, tty->device, "mcfrs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1159,7 +1159,7 @@
 	struct mcf_serial	*info = (struct mcf_serial *)tty->driver_data;
 	unsigned long		flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "mcfrs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "mcfrs_close"))
 		return;
 	
 	local_irq_save(flags);
@@ -1229,8 +1229,8 @@
 	} else
 #endif
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1264,7 +1264,7 @@
 {
 	struct mcf_serial * info = (struct mcf_serial *)tty->driver_data;
 	
-	if (serial_paranoia_check(info, tty->device, "mcfrs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_hangup"))
 		return;
 	
 	mcfrs_flush_buffer(tty);
@@ -1308,7 +1308,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ASYNC_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1416,15 +1416,14 @@
 	struct mcf_serial	*info;
 	int 			retval, line;
 
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 	info = mcfrs_table + line;
-	if (serial_paranoia_check(info, tty->device, "mcfrs_open"))
+	if (serial_paranoia_check(info, tty->name, "mcfrs_open"))
 		return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-	printk("mcfrs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->count);
+	printk("mcfrs_open %s, count = %d\n", tty->name, info->count);
 #endif
 	info->count++;
 	tty->driver_data = info;
@@ -1447,7 +1446,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -1458,7 +1457,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("mcfrs_open ttyS%d successful...\n", info->line);
+	printk("mcfrs_open %s successful...\n", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/serial/mux.c linux-2.5.68-bk5/drivers/serial/mux.c
--- linux-2.5.68-bk4/drivers/serial/mux.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/mux.c	2003-04-24 04:34:52.000000000 -0700
@@ -456,7 +456,7 @@
 
 		card->drv.owner = THIS_MODULE;
 		card->drv.driver_name = "ttyB";
-		card->drv.dev_name = "ttyB%d";
+		card->drv.dev_name = "ttyB";
 		card->drv.major = MUX_MAJOR;
 		card->drv.minor = port_cnt;
 		card->drv.nr = UART_NR;
diff -urN linux-2.5.68-bk4/drivers/serial/nb85e_uart.c linux-2.5.68-bk5/drivers/serial/nb85e_uart.c
--- linux-2.5.68-bk4/drivers/serial/nb85e_uart.c	2003-04-19 19:50:43.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/nb85e_uart.c	2003-04-24 04:34:52.000000000 -0700
@@ -528,7 +528,7 @@
 	.owner			= THIS_MODULE,
 	.driver_name		= "nb85e_uart",
 #ifdef CONFIG_DEVFS_FS
-	.dev_name		= "tts/%d",
+	.dev_name		= "tts/",
 #else
 	.dev_name		= "ttyS",
 #endif
diff -urN linux-2.5.68-bk4/drivers/serial/sa1100.c linux-2.5.68-bk5/drivers/serial/sa1100.c
--- linux-2.5.68-bk4/drivers/serial/sa1100.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/sa1100.c	2003-04-24 04:34:52.000000000 -0700
@@ -852,7 +852,7 @@
 static struct uart_driver sa1100_reg = {
 	.owner			= THIS_MODULE,
 	.driver_name		= "ttySA",
-	.dev_name		= "ttySA%d",
+	.dev_name		= "ttySA",
 	.major			= SERIAL_SA1100_MAJOR,
 	.minor			= MINOR_START,
 	.nr			= NR_PORTS,
diff -urN linux-2.5.68-bk4/drivers/serial/serial98.c linux-2.5.68-bk5/drivers/serial/serial98.c
--- linux-2.5.68-bk4/drivers/serial/serial98.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/serial98.c	2003-04-24 04:34:52.000000000 -0700
@@ -156,7 +156,7 @@
 static struct uart_driver serial98_reg = {
 	.owner			= THIS_MODULE,
 	.driver_name		= "serial98",
-	.dev_name		= "ttyS%d",
+	.dev_name		= "ttyS",
 	.major			= TTY_MAJOR,
 	.minor			= 64,
 	.nr			= SERIAL98_NR,
diff -urN linux-2.5.68-bk4/drivers/serial/sunsab.c linux-2.5.68-bk5/drivers/serial/sunsab.c
--- linux-2.5.68-bk4/drivers/serial/sunsab.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/sunsab.c	2003-04-24 04:34:52.000000000 -0700
@@ -828,9 +828,9 @@
 	.owner			= THIS_MODULE,
 	.driver_name		= "serial",
 #ifdef CONFIG_DEVFS_FS
-	.dev_name		= "tts/%d",
+	.dev_name		= "tts/",
 #else
-	.dev_name		= "ttyS%d",
+	.dev_name		= "ttyS",
 #endif
 	.major			= TTY_MAJOR,
 };
diff -urN linux-2.5.68-bk4/drivers/serial/sunsu.c linux-2.5.68-bk5/drivers/serial/sunsu.c
--- linux-2.5.68-bk4/drivers/serial/sunsu.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/sunsu.c	2003-04-24 04:34:52.000000000 -0700
@@ -1286,9 +1286,9 @@
 	.owner			= THIS_MODULE,
 	.driver_name		= "serial",
 #ifdef CONFIG_DEVFS_FS
-	.dev_name		= "tts/%d",
+	.dev_name		= "tts/",
 #else
-	.dev_name		= "ttyS%d",
+	.dev_name		= "ttyS",
 #endif
 	.major			= TTY_MAJOR,
 };
diff -urN linux-2.5.68-bk4/drivers/serial/sunzilog.c linux-2.5.68-bk5/drivers/serial/sunzilog.c
--- linux-2.5.68-bk4/drivers/serial/sunzilog.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/drivers/serial/sunzilog.c	2003-04-24 04:34:52.000000000 -0700
@@ -1031,9 +1031,9 @@
 	.owner		=	THIS_MODULE,
 	.driver_name	=	"ttyS",
 #ifdef CONFIG_DEVFS_FS
-	.dev_name	=	"tts/%d",
+	.dev_name	=	"tts/",
 #else
-	.dev_name	=	"ttyS%d",
+	.dev_name	=	"ttyS",
 #endif
 	.major		=	TTY_MAJOR,
 };
diff -urN linux-2.5.68-bk4/drivers/sgi/char/sgiserial.c linux-2.5.68-bk5/drivers/sgi/char/sgiserial.c
--- linux-2.5.68-bk4/drivers/sgi/char/sgiserial.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/drivers/sgi/char/sgiserial.c	2003-04-24 04:34:52.000000000 -0700
@@ -143,20 +143,20 @@
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct sgi_serial *info,
-					dev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic = KERN_WARNING
-		"Warning: bad magic number for serial struct (%d, %d) in %s\n";
+		"Warning: bad magic number for serial struct %s in %s\n";
 	static const char *badinfo = KERN_WARNING
-		"Warning: null sgi_serial for (%d, %d) in %s\n";
+		"Warning: null sgi_serial for %s in %s\n";
 
 	if (!info) {
-		printk(badinfo, MAJOR(device), MINOR(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, MAJOR(device), MINOR(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -293,7 +293,7 @@
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 	save_flags(flags); cli();
@@ -310,7 +310,7 @@
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1003,7 +1003,7 @@
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf)
@@ -1076,7 +1076,7 @@
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -1088,7 +1088,7 @@
 {
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -1097,7 +1097,7 @@
 {
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	cli();
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -1113,7 +1113,7 @@
 	struct sgi_serial *info = (struct sgi_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
@@ -1167,7 +1167,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty))
@@ -1191,7 +1191,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1377,7 +1377,7 @@
 	struct sgi_serial * info = (struct sgi_serial *) tty->driver_data;
 	int retval;
 
-	if (serial_paranoia_check(info, tty->device, "zs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "zs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1473,7 +1473,7 @@
 	struct sgi_serial * info = (struct sgi_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1539,8 +1539,8 @@
 	ZS_CLEARFIFO(info->zs_channel);
 
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1574,7 +1574,7 @@
 {
 	struct sgi_serial * info = (struct sgi_serial *)tty->driver_data;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 	
 	rs_flush_buffer(tty);
@@ -1618,7 +1618,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ZILOG_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -1725,7 +1725,7 @@
 	struct sgi_serial	*info;
 	int 			retval, line;
 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	/* The zilog lines for the mouse/keyboard must be
 	 * opened using their respective drivers.
 	 */
@@ -1735,11 +1735,10 @@
 	/* Is the kgdb running over this line? */
 	if (info->kgdb_channel)
 		return -ENODEV;
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->count);
 #endif
 	info->count++;
 	tty->driver_data = info;
@@ -1762,7 +1761,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -1781,7 +1780,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttys%d successful...\n", info->line);
+	printk("rs_open %s successful...\n", tty->name);
 #endif
 	return 0;
 }
diff -urN linux-2.5.68-bk4/drivers/tc/zs.c linux-2.5.68-bk5/drivers/tc/zs.c
--- linux-2.5.68-bk4/drivers/tc/zs.c	2003-04-19 19:50:43.000000000 -0700
+++ linux-2.5.68-bk5/drivers/tc/zs.c	2003-04-24 04:34:52.000000000 -0700
@@ -235,20 +235,20 @@
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct dec_serial *info,
-					dev_t device, const char *routine)
+					char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	static const char *badmagic =
-		"Warning: bad magic number for serial struct (%d, %d) in %s\n";
+		"Warning: bad magic number for serial struct %s in %s\n";
 	static const char *badinfo =
-		"Warning: null mac_serial for (%d, %d) in %s\n";
+		"Warning: null mac_serial for %s in %s\n";
 
 	if (!info) {
-		printk(badinfo, MAJOR(device), MINOR(device), routine);
+		printk(badinfo, name, routine);
 		return 1;
 	}
 	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, MAJOR(device), MINOR(device), routine);
+		printk(badmagic, name, routine);
 		return 1;
 	}
 #endif
@@ -631,7 +631,7 @@
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_stop"))
+	if (serial_paranoia_check(info, tty->name, "rs_stop"))
 		return;
 	
 #if 1
@@ -649,7 +649,7 @@
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 	unsigned long flags;
 	
-	if (serial_paranoia_check(info, tty->device, "rs_start"))
+	if (serial_paranoia_check(info, tty->name, "rs_start"))
 		return;
 	
 	save_flags(flags); cli();
@@ -928,7 +928,7 @@
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
 		return;
 
 	if (info->xmit_cnt <= 0 || tty->stopped || info->tx_stopped ||
@@ -948,7 +948,7 @@
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_write"))
+	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
 	if (!tty || !info->xmit_buf)
@@ -991,7 +991,7 @@
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 	int	ret;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_write_room"))
+	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
@@ -1003,7 +1003,7 @@
 {
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 			
-	if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
 		return 0;
 	return info->xmit_cnt;
 }
@@ -1012,7 +1012,7 @@
 {
 	struct dec_serial *info = (struct dec_serial *)tty->driver_data;
 				
-	if (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
+	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
 		return;
 	cli();
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
@@ -1043,7 +1043,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_throttle"))
+	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1071,7 +1071,7 @@
 	       tty->ldisc.chars_in_buffer(tty));
 #endif
 
-	if (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
+	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
 		return;
 	
 	if (I_IXOFF(tty)) {
@@ -1251,7 +1251,7 @@
 	struct dec_serial *info = (struct dec_serial *) tty->driver_data;
 	unsigned long flags;
 
-	if (serial_paranoia_check(info, tty->device, "rs_break"))
+	if (serial_paranoia_check(info, tty->name, "rs_break"))
 		return;
 	if (!info->port)
 		return;
@@ -1274,7 +1274,7 @@
 	if (info->hook)
 		return -ENODEV;
 
-	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1356,7 +1356,7 @@
 	struct dec_serial * info = (struct dec_serial *)tty->driver_data;
 	unsigned long flags;
 
-	if (!info || serial_paranoia_check(info, tty->device, "rs_close"))
+	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
 		return;
 	
 	save_flags(flags); cli();
@@ -1424,8 +1424,8 @@
 	}
 
 	shutdown(info);
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
@@ -1452,7 +1452,7 @@
 	struct dec_serial *info = (struct dec_serial *) tty->driver_data;
 	unsigned long orig_jiffies, char_time;
 
-	if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
+	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
 		return;
 
 	orig_jiffies = jiffies;
@@ -1485,7 +1485,7 @@
 {
 	struct dec_serial * info = (struct dec_serial *)tty->driver_data;
 
-	if (serial_paranoia_check(info, tty->device, "rs_hangup"))
+	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
 		return;
 
 	rs_flush_buffer(tty);
@@ -1527,7 +1527,7 @@
 	 * If this is a callout device, then just make sure the normal
 	 * device isn't being used.
 	 */
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		if (info->flags & ZILOG_NORMAL_ACTIVE)
 			return -EBUSY;
 		if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -1639,7 +1639,7 @@
 	struct dec_serial	*info;
 	int 			retval, line;
 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= zs_channels_found))
 		return -ENODEV;
 	info = zs_soft + line;
@@ -1647,11 +1647,10 @@
 	if (info->hook)
 		return -ENODEV;
 
-	if (serial_paranoia_check(info, tty->device, "rs_open"))
+	if (serial_paranoia_check(info, tty->name, "rs_open"))
 		return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
-	       info->count);
+	printk("rs_open %s, count = %d\n", tty->name, info->count);
 #endif
 
 	info->count++;
@@ -1690,7 +1689,7 @@
 	}
 
 	if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+		if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
 			*tty->termios = info->normal_termios;
 		else 
 			*tty->termios = info->callout_termios;
@@ -1708,7 +1707,7 @@
 	info->pgrp = current->pgrp;
 
 #ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open ttyS%02d successful...", info->line);
+	printk("rs_open %s successful...", tty->name);
 #endif
 /* tty->low_latency = 1; */
 	return 0;
@@ -1874,7 +1873,7 @@
 	memset(&serial_driver, 0, sizeof(struct tty_driver));
 	serial_driver.magic = TTY_DRIVER_MAGIC;
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
-	serial_driver.name = "tts/%d";
+	serial_driver.name = "tts/";
 #else
 	serial_driver.name = "ttyS";
 #endif
@@ -1916,7 +1915,7 @@
 	 */
 	callout_driver = serial_driver;
 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
-	callout_driver.name = "cua/%d";
+	callout_driver.name = "cua/";
 #else
 	callout_driver.name = "cua";
 #endif
@@ -1971,10 +1970,8 @@
 		printk("ttyS%02d at 0x%08x (irq = %d)", info->line, 
 		       info->port, info->irq);
 		printk(" is a Z85C30 SCC\n");
-		tty_register_device(&serial_driver,
-				   serial_driver.minor_start + info->line);
-		tty_register_device(&callout_driver,
-				   callout_driver.minor_start + info->line);
+		tty_register_device(&serial_driver, info->line);
+		tty_register_device(&callout_driver, info->line);
 
 	}
 
diff -urN linux-2.5.68-bk4/drivers/usb/class/audio.c linux-2.5.68-bk5/drivers/usb/class/audio.c
--- linux-2.5.68-bk4/drivers/usb/class/audio.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/class/audio.c	2003-04-24 04:34:52.000000000 -0700
@@ -450,7 +450,7 @@
 	for(nr = 0; nr < NRSGBUF; nr++) {
 		if (!(p = db->sgbuf[nr]))
 			continue;
-		mem_map_unreserve(virt_to_page(p));
+		ClearPageReserved(virt_to_page(p));
 		free_page((unsigned long)p);
 		db->sgbuf[nr] = NULL;
 	}
@@ -492,7 +492,7 @@
 			if (!p)
 				return -ENOMEM;
 			db->sgbuf[nr] = p;
-			mem_map_reserve(virt_to_page(p));
+			SetPageReserved(virt_to_page(p));
 		}
 		memset(db->sgbuf[nr], AFMT_ISUNSIGNED(db->format) ? 0x80 : 0, PAGE_SIZE);
 		if ((nr << PAGE_SHIFT) >= db->dmasize)
diff -urN linux-2.5.68-bk4/drivers/usb/class/bluetty.c linux-2.5.68-bk5/drivers/usb/class/bluetty.c
--- linux-2.5.68-bk4/drivers/usb/class/bluetty.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/class/bluetty.c	2003-04-24 04:34:52.000000000 -0700
@@ -276,9 +276,9 @@
 }
 
 
-static inline struct usb_bluetooth *get_bluetooth_by_minor (int minor)
+static inline struct usb_bluetooth *get_bluetooth_by_index (int index)
 {
-	return bluetooth_table[minor];
+	return bluetooth_table[index];
 }
 
 
@@ -357,7 +357,7 @@
 	tty->driver_data = NULL;
 
 	/* get the bluetooth object associated with this tty pointer */
-	bluetooth = get_bluetooth_by_minor (minor(tty->device));
+	bluetooth = get_bluetooth_by_index (tty->index);
 
 	if (bluetooth_paranoia_check (bluetooth, __FUNCTION__)) {
 		return -ENODEV;
@@ -1298,7 +1298,7 @@
 	.magic =		TTY_DRIVER_MAGIC,
 	.owner =		THIS_MODULE,
 	.driver_name =		"usb-bluetooth",
-	.name =			"usb/ttub/%d",
+	.name =			"usb/ttub/",
 	.major =		BLUETOOTH_TTY_MAJOR,
 	.minor_start =		0,
 	.num =			BLUETOOTH_TTY_MINORS,
diff -urN linux-2.5.68-bk4/drivers/usb/class/cdc-acm.c linux-2.5.68-bk5/drivers/usb/class/cdc-acm.c
--- linux-2.5.68-bk4/drivers/usb/class/cdc-acm.c	2003-04-19 19:50:06.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/class/cdc-acm.c	2003-04-24 04:34:52.000000000 -0700
@@ -313,7 +313,7 @@
 
 static int acm_tty_open(struct tty_struct *tty, struct file *filp)
 {
-	struct acm *acm = acm_table[minor(tty->device)];
+	struct acm *acm = acm_table[tty->index];
 
 	if (!acm || !acm->dev) return -EINVAL;
 
@@ -727,7 +727,7 @@
 	.magic =		TTY_DRIVER_MAGIC,
 	.owner =		THIS_MODULE,
 	.driver_name =		"acm",
-	.name =			"usb/acm/%d",
+	.name =			"usb/acm/",
 	.major =		ACM_TTY_MAJOR,
 	.minor_start =		0,
 	.num =			ACM_TTY_MINORS,
diff -urN linux-2.5.68-bk4/drivers/usb/media/ov511.c linux-2.5.68-bk5/drivers/usb/media/ov511.c
--- linux-2.5.68-bk4/drivers/usb/media/ov511.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/ov511.c	2003-04-24 04:34:52.000000000 -0700
@@ -357,7 +357,7 @@
 	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -375,7 +375,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/usb/media/pwc-if.c linux-2.5.68-bk5/drivers/usb/media/pwc-if.c
--- linux-2.5.68-bk4/drivers/usb/media/pwc-if.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/pwc-if.c	2003-04-24 04:34:52.000000000 -0700
@@ -211,7 +211,7 @@
 	        adr=(unsigned long) mem;
 		while (size > 0) 
                 {
-			mem_map_reserve(vmalloc_to_page((void *)adr));
+			SetPageReserved(vmalloc_to_page((void *)adr));
 			adr+=PAGE_SIZE;
 			size-=PAGE_SIZE;
 		}
@@ -228,7 +228,7 @@
 	        adr=(unsigned long) mem;
 		while ((long) size > 0) 
                 {
-			mem_map_unreserve(vmalloc_to_page((void *)adr));
+			ClearPageReserved(vmalloc_to_page((void *)adr));
 			adr+=PAGE_SIZE;
 			size-=PAGE_SIZE;
 		}
diff -urN linux-2.5.68-bk4/drivers/usb/media/se401.c linux-2.5.68-bk5/drivers/usb/media/se401.c
--- linux-2.5.68-bk4/drivers/usb/media/se401.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/se401.c	2003-04-24 04:34:52.000000000 -0700
@@ -99,7 +99,7 @@
 	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -116,7 +116,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/usb/media/stv680.c linux-2.5.68-bk5/drivers/usb/media/stv680.c
--- linux-2.5.68-bk4/drivers/usb/media/stv680.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/stv680.c	2003-04-24 04:34:52.000000000 -0700
@@ -151,7 +151,7 @@
 	memset (mem, 0, size);	/* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -167,7 +167,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/usb/media/usbvideo.c linux-2.5.68-bk5/drivers/usb/media/usbvideo.c
--- linux-2.5.68-bk4/drivers/usb/media/usbvideo.c	2003-04-19 19:51:20.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/usbvideo.c	2003-04-24 04:34:52.000000000 -0700
@@ -103,7 +103,7 @@
 	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -120,7 +120,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/usb/media/vicam.c linux-2.5.68-bk5/drivers/usb/media/vicam.c
--- linux-2.5.68-bk4/drivers/usb/media/vicam.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/media/vicam.c	2003-04-24 04:34:52.000000000 -0700
@@ -379,7 +379,7 @@
 	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
 	adr = (unsigned long) mem;
 	while (size > 0) {
-		mem_map_reserve(vmalloc_to_page((void *)adr));
+		SetPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
@@ -396,7 +396,7 @@
 
 	adr = (unsigned long) mem;
 	while ((long) size > 0) {
-		mem_map_unreserve(vmalloc_to_page((void *)adr));
+		ClearPageReserved(vmalloc_to_page((void *)adr));
 		adr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
diff -urN linux-2.5.68-bk4/drivers/usb/serial/digi_acceleport.c linux-2.5.68-bk5/drivers/usb/serial/digi_acceleport.c
--- linux-2.5.68-bk4/drivers/usb/serial/digi_acceleport.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/serial/digi_acceleport.c	2003-04-24 04:34:52.000000000 -0700
@@ -1565,8 +1565,8 @@
 	}
 
 	/* flush driver and line discipline buffers */
-	if( tty->driver.flush_buffer )
-		tty->driver.flush_buffer( tty );
+	if( tty->driver->flush_buffer )
+		tty->driver->flush_buffer( tty );
 	if( tty->ldisc.flush_buffer )
 		tty->ldisc.flush_buffer( tty );
 
diff -urN linux-2.5.68-bk4/drivers/usb/serial/usb-serial.c linux-2.5.68-bk5/drivers/usb/serial/usb-serial.c
--- linux-2.5.68-bk4/drivers/usb/serial/usb-serial.c	2003-04-19 19:49:14.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/serial/usb-serial.c	2003-04-24 04:34:52.000000000 -0700
@@ -389,9 +389,9 @@
 static LIST_HEAD(usb_serial_driver_list);
 
 
-struct usb_serial *usb_serial_get_by_minor (unsigned int minor)
+struct usb_serial *usb_serial_get_by_index(unsigned index)
 {
-	struct usb_serial *serial = serial_table[minor];
+	struct usb_serial *serial = serial_table[index];
 
 	if (serial)
 		kobject_get (&serial->kobj);
@@ -462,13 +462,13 @@
 	tty->driver_data = NULL;
 
 	/* get the serial object associated with this tty pointer */
-	serial = usb_serial_get_by_minor (minor(tty->device));
+	serial = usb_serial_get_by_index(tty->index);
 
 	if (serial_paranoia_check (serial, __FUNCTION__))
 		return -ENODEV;
 
 	/* set up our port structure making the tty driver remember our port object, and us it */
-	portNumber = minor(tty->device) - serial->minor;
+	portNumber = tty->index - serial->minor;
 	port = &serial->port[portNumber];
 	tty->driver_data = port;
 
@@ -753,7 +753,7 @@
 	dbg("%s", __FUNCTION__);
 	length += sprintf (page, "usbserinfo:1.0 driver:%s\n", DRIVER_VERSION);
 	for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
-		serial = usb_serial_get_by_minor(i);
+		serial = usb_serial_get_by_index(i);
 		if (serial == NULL)
 			continue;
 
@@ -1261,7 +1261,7 @@
 #ifndef CONFIG_DEVFS_FS
 	.name =			"ttyUSB",
 #else
-	.name =			"usb/tts/%d",
+	.name =			"usb/tts/",
 #endif
 	.major =		SERIAL_TTY_MAJOR,
 	.minor_start =		0,
diff -urN linux-2.5.68-bk4/drivers/usb/serial/whiteheat.c linux-2.5.68-bk5/drivers/usb/serial/whiteheat.c
--- linux-2.5.68-bk4/drivers/usb/serial/whiteheat.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk5/drivers/usb/serial/whiteheat.c	2003-04-24 04:34:52.000000000 -0700
@@ -646,8 +646,8 @@
 	}
 */
 
-	if (port->tty->driver.flush_buffer)
-		port->tty->driver.flush_buffer(port->tty);
+	if (port->tty->driver->flush_buffer)
+		port->tty->driver->flush_buffer(port->tty);
 	if (port->tty->ldisc.flush_buffer)
 		port->tty->ldisc.flush_buffer(port->tty);
 
diff -urN linux-2.5.68-bk4/fs/devfs/base.c linux-2.5.68-bk5/fs/devfs/base.c
--- linux-2.5.68-bk4/fs/devfs/base.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/fs/devfs/base.c	2003-04-24 04:34:52.000000000 -0700
@@ -1708,41 +1708,39 @@
  *	On failure %NULL is returned.
  */
 
-devfs_handle_t devfs_mk_dir(const char *fmt, ...)
+int devfs_mk_dir(const char *fmt, ...)
 {
 	struct devfs_entry *dir = NULL, *de = NULL, *old;
 	char buf[64];
 	va_list args;
-	int n;
+	int error, n;
 
 	va_start(args, fmt);
 	n = vsnprintf(buf, 64, fmt, args);
 	if (n >= 64 || !buf[0]) {
 		printk(KERN_WARNING "%s: invalid argument.", __FUNCTION__);
-		return NULL;
+		return -EINVAL;
 	}
 
 	de = _devfs_prepare_leaf(&dir, buf, MODE_DIR);
 	if (!de) {
 		PRINTK("(%s): could not prepare leaf\n", buf);
-		return NULL;
+		return -EINVAL;
 	}
 
-	de->info = NULL;
-	if (_devfs_append_entry(dir, de, &old)) {
+	error = _devfs_append_entry(dir, de, &old);
+	if (error) {
 		PRINTK("(%s): could not append to dir: %p \"%s\"\n",
 				buf, dir, dir->name);
 		devfs_put(old);
 		goto out_put;
 	}
 	
-	DPRINTK(DEBUG_REGISTER, "(%s): de: %p dir: %p \"%s\"\n",
-			buf, de, dir, dir->name);
 	devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED);
 
  out_put:
 	devfs_put(dir);
-	return de;
+	return error;
 }
 
 
diff -urN linux-2.5.68-bk4/fs/nfs/nfs4proc.c linux-2.5.68-bk5/fs/nfs/nfs4proc.c
--- linux-2.5.68-bk4/fs/nfs/nfs4proc.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/fs/nfs/nfs4proc.c	2003-04-24 04:34:52.000000000 -0700
@@ -572,10 +572,10 @@
 	u32                     f_bmres[2];
 	u32                     d_bmres[2];
 	struct nfs_fattr        d_attr = {
-		.valid          0,
+		.valid          = 0,
 	};
 	struct nfs_fattr        f_attr = {
-		.valid          0,
+		.valid          = 0,
 	};
 	struct nfs4_getattr     f_getattr = {
 		.gt_bmval       = nfs4_fattr_bitmap,
diff -urN linux-2.5.68-bk4/fs/proc/array.c linux-2.5.68-bk5/fs/proc/array.c
--- linux-2.5.68-bk4/fs/proc/array.c	2003-04-19 19:50:01.000000000 -0700
+++ linux-2.5.68-bk5/fs/proc/array.c	2003-04-24 04:34:52.000000000 -0700
@@ -303,7 +303,7 @@
 		atomic_inc(&mm->mm_users);
 	if (task->tty) {
 		tty_pgrp = task->tty->pgrp;
-		tty_nr = kdev_t_to_nr(task->tty->device);
+		tty_nr = task->tty->device;
 	}
 	task_unlock(task);
 	if (mm) {
diff -urN linux-2.5.68-bk4/fs/proc/proc_misc.c linux-2.5.68-bk5/fs/proc/proc_misc.c
--- linux-2.5.68-bk4/fs/proc/proc_misc.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/fs/proc/proc_misc.c	2003-04-24 04:34:52.000000000 -0700
@@ -339,10 +339,10 @@
 	return seq_open(file, &diskstats_op);
 }
 static struct file_operations proc_diskstats_operations = {
-	open:		diskstats_open,
-	read:		seq_read,
-	llseek:		seq_lseek,
-	release:	seq_release,
+	.open		= diskstats_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
 };
 
 #ifdef CONFIG_MODULES
diff -urN linux-2.5.68-bk4/fs/proc/proc_tty.c linux-2.5.68-bk5/fs/proc/proc_tty.c
--- linux-2.5.68-bk4/fs/proc/proc_tty.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/fs/proc/proc_tty.c	2003-04-24 04:34:52.000000000 -0700
@@ -12,13 +12,12 @@
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <linux/tty.h>
+#include <linux/seq_file.h>
 #include <asm/bitops.h>
 
 extern struct tty_ldisc ldiscs[];
 
 
-static int tty_drivers_read_proc(char *page, char **start, off_t off,
-				 int count, int *eof, void *data);
 static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
 				int count, int *eof, void *data);
 
@@ -30,72 +29,129 @@
 /*
  * This is the handler for /proc/tty/drivers
  */
-static int tty_drivers_read_proc(char *page, char **start, off_t off,
-				 int count, int *eof, void *data)
+static void show_tty_range(struct seq_file *m, struct tty_driver *p,
+	dev_t from, int num)
 {
-	int	len = 0;
-	off_t	begin = 0;
-	struct tty_driver *p;
-	char	range[20], deftype[20];
-	char	*type;
-
-	list_for_each_entry(p, &tty_drivers, tty_drivers) {
-		if (p->num > 1)
-			sprintf(range, "%d-%d", p->minor_start,
-				p->minor_start + p->num - 1);
+	seq_printf(m, "%-20s ", p->driver_name ? p->driver_name : "unknown");
+	seq_printf(m, "/dev/%-8s ", p->name);
+	if (p->num > 1) {
+		char	range[20];
+		sprintf(range, "%d-%d", MINOR(from),
+			MINOR(from) + num - 1);
+		seq_printf(m, "%3d %7s ", MAJOR(from), range);
+	} else {
+		seq_printf(m, "%3d %7d ", MAJOR(from), MINOR(from));
+	}
+	switch (p->type) {
+	case TTY_DRIVER_TYPE_SYSTEM:
+		seq_printf(m, "system");
+		if (p->subtype == SYSTEM_TYPE_TTY)
+			seq_printf(m, ":/dev/tty");
+		else if (p->subtype == SYSTEM_TYPE_SYSCONS)
+			seq_printf(m, ":console");
+		else if (p->subtype == SYSTEM_TYPE_CONSOLE)
+			seq_printf(m, ":vtmaster");
+		break;
+	case TTY_DRIVER_TYPE_CONSOLE:
+		seq_printf(m, "console");
+		break;
+	case TTY_DRIVER_TYPE_SERIAL:
+		seq_printf(m, "serial");
+		if (p->subtype == 2)
+			seq_printf(m, ":callout");
+		break;
+	case TTY_DRIVER_TYPE_PTY:
+		if (p->subtype == PTY_TYPE_MASTER)
+			seq_printf(m, "pty:master");
+		else if (p->subtype == PTY_TYPE_SLAVE)
+			seq_printf(m, "pty:slave");
 		else
-			sprintf(range, "%d", p->minor_start);
-		switch (p->type) {
-		case TTY_DRIVER_TYPE_SYSTEM:
-			if (p->subtype == SYSTEM_TYPE_TTY)
-				type = "system:/dev/tty";
-			else if (p->subtype == SYSTEM_TYPE_SYSCONS)
-				type = "system:console";
-			else if (p->subtype == SYSTEM_TYPE_CONSOLE)
-				type = "system:vtmaster";
-			else
-				type = "system";
-			break;
-		case TTY_DRIVER_TYPE_CONSOLE:
-			type = "console";
-			break;
-		case TTY_DRIVER_TYPE_SERIAL:
-			if (p->subtype == 2)
-				type = "serial:callout";
-			else
-				type = "serial";
-			break;
-		case TTY_DRIVER_TYPE_PTY:
-			if (p->subtype == PTY_TYPE_MASTER)
-				type = "pty:master";
-			else if (p->subtype == PTY_TYPE_SLAVE)
-				type = "pty:slave";
-			else
-				type = "pty";
-			break;
-		default:
-			sprintf(deftype, "type:%d.%d", p->type, p->subtype);
-			type = deftype;
-			break;
-		}
-		len += sprintf(page+len, "%-20s /dev/%-8s %3d %7s %s\n",
-			       p->driver_name ? p->driver_name : "unknown",
-			       p->name, p->major, range, type);
-		if (len+begin > off+count)
-			break;
-		if (len+begin < off) {
-			begin += len;
-			len = 0;
-		}
+			seq_printf(m, "pty");
+		break;
+	default:
+		seq_printf(m, "type:%d.%d", p->type, p->subtype);
 	}
-	if (!p)
-		*eof = 1;
-	if (off >= len+begin)
-		return 0;
-	*start = page + (off-begin);
-	return ((count < begin+len-off) ? count : begin+len-off);
+	seq_putc(m, '\n');
 }
 
+static int show_tty_driver(struct seq_file *m, void *v)
+{
+	struct tty_driver *p = v;
+	dev_t from = MKDEV(p->major, p->minor_start);
+	dev_t to = from + p->num;
+
+	if (&p->tty_drivers == tty_drivers.next) {
+		/* pseudo-drivers first */
+		seq_printf(m, "%-20s /dev/%-8s ", "/dev/tty", "tty");
+		seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 0);
+		seq_printf(m, "system:/dev/tty\n");
+		seq_printf(m, "%-20s /dev/%-8s ", "/dev/console", "console");
+		seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 1);
+		seq_printf(m, "system:console\n");
+#ifdef CONFIG_UNIX98_PTYS
+		seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx");
+		seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2);
+		seq_printf(m, "system\n");
+#endif
+#ifdef CONFIG_VT
+		seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0");
+		seq_printf(m, "%3d %7d ", TTY_MAJOR, 0);
+		seq_printf(m, "system:vtmaster\n");
+#endif
+	}
+
+	while (MAJOR(from) < MAJOR(to)) {
+		dev_t next = MKDEV(MAJOR(from)+1, 0);
+		show_tty_range(m, p, from, next - from);
+		from = next;
+	}
+	if (from != to)
+		show_tty_range(m, p, from, to - from);
+	return 0;
+}
+
+/* iterator */
+static void *t_start(struct seq_file *m, loff_t *pos)
+{
+	struct list_head *p;
+	loff_t l = *pos;
+	list_for_each(p, &tty_drivers)
+		if (!l--)
+			return list_entry(p, struct tty_driver, tty_drivers);
+	return NULL;
+}
+
+static void *t_next(struct seq_file *m, void *v, loff_t *pos)
+{
+	struct list_head *p = ((struct tty_driver *)v)->tty_drivers.next;
+	(*pos)++;
+	return p==&tty_drivers ? NULL :
+			list_entry(p, struct tty_driver, tty_drivers);
+}
+
+static void t_stop(struct seq_file *m, void *v)
+{
+}
+
+static struct seq_operations tty_drivers_op = {
+	.start	= t_start,
+	.next	= t_next,
+	.stop	= t_stop,
+	.show	= show_tty_driver
+};
+
+static int tty_drivers_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &tty_drivers_op);
+}
+
+static struct file_operations proc_tty_drivers_operations = {
+	.open		= tty_drivers_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
 /*
  * This is the handler for /proc/tty/ldiscs
  */
@@ -170,11 +226,14 @@
  */
 void __init proc_tty_init(void)
 {
+	struct proc_dir_entry *entry;
 	if (!proc_mkdir("tty", 0))
 		return;
 	proc_tty_ldisc = proc_mkdir("tty/ldisc", 0);
 	proc_tty_driver = proc_mkdir("tty/driver", 0);
 
 	create_proc_read_entry("tty/ldiscs", 0, 0, tty_ldiscs_read_proc,NULL);
-	create_proc_read_entry("tty/drivers", 0, 0, tty_drivers_read_proc,NULL);
+	entry = create_proc_entry("tty/drivers", 0, NULL);
+	if (entry)
+		entry->proc_fops = &proc_tty_drivers_operations;
 }
diff -urN linux-2.5.68-bk4/include/acpi/acconfig.h linux-2.5.68-bk5/include/acpi/acconfig.h
--- linux-2.5.68-bk4/include/acpi/acconfig.h	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/acconfig.h	2003-04-24 04:34:52.000000000 -0700
@@ -47,7 +47,7 @@
 
 /******************************************************************************
  *
- * Compile-time options
+ * Configuration options
  *
  *****************************************************************************/
 
@@ -62,21 +62,9 @@
  *
  */
 
-
-/******************************************************************************
- *
- * Subsystem Constants
- *
- *****************************************************************************/
-
-
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20030328
-
-/* Version of ACPI supported */
-
-#define ACPI_CA_SUPPORT_LEVEL           2
+#define ACPI_CA_VERSION                 0x20030418
 
 /* Maximum objects in the various object caches */
 
@@ -86,6 +74,23 @@
 #define ACPI_MAX_OBJECT_CACHE_DEPTH     64          /* Interpreter operand objects */
 #define ACPI_MAX_WALK_CACHE_DEPTH       4           /* Objects for parse tree walks */
 
+/*
+ * Should the subystem abort the loading of an ACPI table if the
+ * table checksum is incorrect?
+ */
+#define ACPI_CHECKSUM_ABORT             FALSE
+
+
+/******************************************************************************
+ *
+ * Subsystem Constants
+ *
+ *****************************************************************************/
+
+/* Version of ACPI supported */
+
+#define ACPI_CA_SUPPORT_LEVEL           2
+
 /* String size constants */
 
 #define ACPI_MAX_STRING_LENGTH          512
@@ -106,20 +111,6 @@
 
 /******************************************************************************
  *
- * Configuration of subsystem behavior
- *
- *****************************************************************************/
-
-
-/*
- * Should the subystem abort the loading of an ACPI table if the
- * table checksum is incorrect?
- */
-#define ACPI_CHECKSUM_ABORT             FALSE
-
-
-/******************************************************************************
- *
  * ACPI Specification constants (Do not change unless the specification changes)
  *
  *****************************************************************************/
@@ -196,7 +187,6 @@
  *
  *****************************************************************************/
 
-
 #define ACPI_DEBUGGER_MAX_ARGS          8  /* Must be max method args + 1 */
 
 #define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
diff -urN linux-2.5.68-bk4/include/acpi/acinterp.h linux-2.5.68-bk5/include/acpi/acinterp.h
--- linux-2.5.68-bk4/include/acpi/acinterp.h	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/acinterp.h	2003-04-24 04:34:52.000000000 -0700
@@ -164,15 +164,17 @@
 acpi_ex_get_buffer_datum(
 	acpi_integer                    *datum,
 	void                            *buffer,
+	u32                             buffer_length,
 	u32                             byte_granularity,
-	u32                             offset);
+	u32                             buffer_offset);
 
 void
 acpi_ex_set_buffer_datum (
 	acpi_integer                    merged_datum,
 	void                            *buffer,
+	u32                             buffer_length,
 	u32                             byte_granularity,
-	u32                             offset);
+	u32                             buffer_offset);
 
 acpi_status
 acpi_ex_read_data_from_field (
diff -urN linux-2.5.68-bk4/include/acpi/aclocal.h linux-2.5.68-bk5/include/acpi/aclocal.h
--- linux-2.5.68-bk4/include/acpi/aclocal.h	2003-04-19 19:50:02.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/aclocal.h	2003-04-24 04:34:52.000000000 -0700
@@ -196,7 +196,7 @@
 
 
 	union acpi_operand_object           *object;        /* Pointer to attached ACPI object (optional) */
-	struct acpi_namespace_node          *child;         /* first child */
+	struct acpi_namespace_node          *child;         /* First child */
 	struct acpi_namespace_node          *peer;          /* Next peer*/
 	u16                                 reference_count; /* Current count of references and children */
 	u8                                  flags;
@@ -476,10 +476,10 @@
 struct acpi_pscope_state
 {
 	ACPI_STATE_COMMON
-	union acpi_parse_object             *op;                    /* current op being parsed */
-	u8                                  *arg_end;               /* current argument end */
-	u8                                  *pkg_end;               /* current package end */
-	u32                                 arg_list;               /* next argument to parse */
+	union acpi_parse_object             *op;                    /* Current op being parsed */
+	u8                                  *arg_end;               /* Current argument end */
+	u8                                  *pkg_end;               /* Current package end */
+	u32                                 arg_list;               /* Next argument to parse */
 	u32                                 arg_count;              /* Number of fixed arguments */
 };
 
@@ -585,11 +585,8 @@
 
 union acpi_parse_value
 {
-	acpi_integer                        integer;        /* integer constant (Up to 64 bits) */
+	acpi_integer                        integer;        /* Integer constant (Up to 64 bits) */
 	struct uint64_struct                integer64;      /* Structure overlay for 2 32-bit Dwords */
-	u32                                 integer32;      /* integer constant, 32 bits only */
-	u16                                 integer16;      /* integer constant, 16 bits only */
-	u8                                  integer8;       /* integer constant, 8 bits only */
 	u32                                 size;           /* bytelist or field size */
 	char                                *string;        /* NULL terminated string */
 	u8                                  *buffer;        /* buffer or string */
@@ -602,15 +599,15 @@
 	u8                                  data_type;      /* To differentiate various internal objs */\
 	u8                                  flags;          /* Type of Op */\
 	u16                                 aml_opcode;     /* AML opcode */\
-	u32                                 aml_offset;     /* offset of declaration in AML */\
-	union acpi_parse_object             *parent;        /* parent op */\
-	union acpi_parse_object             *next;          /* next op */\
+	u32                                 aml_offset;     /* Offset of declaration in AML */\
+	union acpi_parse_object             *parent;        /* Parent op */\
+	union acpi_parse_object             *next;          /* Next op */\
 	ACPI_DISASM_ONLY_MEMBERS (\
 	u8                                  disasm_flags;   /* Used during AML disassembly */\
 	u8                                  disasm_opcode;  /* Subtype used for disassembly */\
-	char                                aml_op_name[16]) /* op name (debug only) */\
+	char                                aml_op_name[16]) /* Op name (debug only) */\
 			   /* NON-DEBUG members below: */\
-	struct acpi_namespace_node          *node;          /* for use by interpreter */\
+	struct acpi_namespace_node          *node;          /* For use by interpreter */\
 	union acpi_parse_value              value;          /* Value or args associated with the opcode */\
 
 
@@ -691,14 +688,14 @@
 struct acpi_parse_state
 {
 	u32                                 aml_size;
-	u8                                  *aml_start;     /* first AML byte */
-	u8                                  *aml;           /* next AML byte */
+	u8                                  *aml_start;     /* First AML byte */
+	u8                                  *aml;           /* Next AML byte */
 	u8                                  *aml_end;       /* (last + 1) AML byte */
-	u8                                  *pkg_start;     /* current package begin */
-	u8                                  *pkg_end;       /* current package end */
-	union acpi_parse_object             *start_op;      /* root of parse tree */
+	u8                                  *pkg_start;     /* Current package begin */
+	u8                                  *pkg_end;       /* Current package end */
+	union acpi_parse_object             *start_op;      /* Root of parse tree */
 	struct acpi_namespace_node          *start_node;
-	union acpi_generic_state            *scope;         /* current scope */
+	union acpi_generic_state            *scope;         /* Current scope */
 	union acpi_parse_object             *start_scope;
 };
 
diff -urN linux-2.5.68-bk4/include/acpi/acmacros.h linux-2.5.68-bk5/include/acpi/acmacros.h
--- linux-2.5.68-bk4/include/acpi/acmacros.h	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/acmacros.h	2003-04-24 04:34:52.000000000 -0700
@@ -116,7 +116,7 @@
 #define ACPI_CAST_INDIRECT_PTR(t, p)    ((t **)(void *)(p))
 
 #if ACPI_MACHINE_WIDTH == 16
-#define ACPI_STORE_POINTER(d,s)         ACPI_MOVE_UNALIGNED32_TO_32(d,s)
+#define ACPI_STORE_POINTER(d,s)         ACPI_MOVE_32_TO_32(d,s)
 #define ACPI_PHYSADDR_TO_PTR(i)         (void *)(i)
 #define ACPI_PTR_TO_PHYSADDR(i)         (u32) (char *)(i)
 #else
@@ -130,41 +130,169 @@
  * Otherwise, we have to move one byte at a time.
  */
 
-#ifdef _HW_ALIGNMENT_SUPPORT
+#ifdef ACPI_BIG_ENDIAN
+/*
+ * Macros for big-endian machines
+ */
+
+/* This macro sets a buffer index, starting from the end of the buffer */
+
+#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) ((buf_len) - (((buf_offset)+1) * (byte_gran)))
+
+/* These macros reverse the bytes during the move, converting little-endian to big endian */
+
+	 /* Big Endian      <==        Little Endian */
+	 /*  Hi...Lo                     Lo...Hi     */
+/* 16-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_16_TO_16(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\
+			  ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];}
+
+#define ACPI_MOVE_16_TO_32(d,s)         {(*(u32 *)(void *)(d))=0;\
+					  ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
+					  ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
+
+#define ACPI_MOVE_16_TO_64(d,s)         {(*(u64 *)(void *)(d))=0;\
+							   ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
+							   ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
+
+/* 32-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_32_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+
+#define ACPI_MOVE_32_TO_32(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
+									  ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
+									  ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
+									  ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
+
+#define ACPI_MOVE_32_TO_64(d,s)         {(*(u64 *)(void *)(d))=0;\
+										   ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
+										   ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
+										   ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
+										   ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
+
+/* 64-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_64_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+
+#define ACPI_MOVE_64_TO_32(d,s)         ACPI_MOVE_32_TO_32(d,s)    /* Truncate to 32 */
+
+#define ACPI_MOVE_64_TO_64(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
+										 ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
+										 ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\
+										 ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\
+										 ((  u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
+										 ((  u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
+										 ((  u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
+										 ((  u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
+#else
+/*
+ * Macros for little-endian machines
+ */
+
+/* This macro sets a buffer index, starting from the beginning of the buffer */
+
+#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset)
+
+#ifdef ACPI_MISALIGNED_TRANSFERS
+
+/* The hardware supports unaligned transfers, just do the little-endian move */
+
+#if ACPI_MACHINE_WIDTH == 16
+
+/* No 64-bit integers */
+/* 16-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_16_TO_16(d,s)         *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_32(d,s)         *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_64(d,s)         ACPI_MOVE_16_TO_32(d,s)
+
+/* 32-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_32_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_32(d,s)         *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
+#define ACPI_MOVE_32_TO_64(d,s)         ACPI_MOVE_32_TO_32(d,s)
+
+/* 64-bit source, 16/32/64 destination */
 
-/* The hardware supports unaligned transfers, just do the move */
+#define ACPI_MOVE_64_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_32(d,s)         ACPI_MOVE_32_TO_32(d,s)    /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_64(d,s)         ACPI_MOVE_32_TO_32(d,s)
 
-#define ACPI_MOVE_UNALIGNED16_TO_16(d,s)    *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_UNALIGNED32_TO_32(d,s)    *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
-#define ACPI_MOVE_UNALIGNED16_TO_32(d,s)    *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_UNALIGNED64_TO_64(d,s)    *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
+#else
+/* 16-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_16_TO_16(d,s)         *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_32(d,s)         *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_64(d,s)         *(u64 *)(void *)(d) = *(u16 *)(void *)(s)
+
+/* 32-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_32_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_32(d,s)         *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
+#define ACPI_MOVE_32_TO_64(d,s)         *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
+
+/* 64-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_64_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_32(d,s)         ACPI_MOVE_32_TO_32(d,s)    /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_64(d,s)         *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
+#endif
 
 #else
 /*
  * The hardware does not support unaligned transfers.  We must move the
  * data one byte at a time.  These macros work whether the source or
- * the destination (or both) is/are unaligned.
+ * the destination (or both) is/are unaligned.  (Little-endian move)
  */
 
-#define ACPI_MOVE_UNALIGNED16_TO_16(d,s)    {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
-	  ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
+/* 16-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_16_TO_16(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
+										 ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
 
-#define ACPI_MOVE_UNALIGNED32_TO_32(d,s)    {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
-			   ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
-			   ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
-			   ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
-
-#define ACPI_MOVE_UNALIGNED16_TO_32(d,s)    {(*(u32*)(void *)(d)) = 0; ACPI_MOVE_UNALIGNED16_TO_16(d,s);}
-
-#define ACPI_MOVE_UNALIGNED64_TO_64(d,s)    {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
-					 ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
-					 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
-					 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
-					 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\
-					 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\
-					 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\
-					 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];}
+#define ACPI_MOVE_16_TO_32(d,s)         {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
+#define ACPI_MOVE_16_TO_64(d,s)         {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
 
+/* 32-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_32_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+
+#define ACPI_MOVE_32_TO_32(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
+										 ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
+										 ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
+										 ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
+
+#define ACPI_MOVE_32_TO_64(d,s)         {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);}
+
+/* 64-bit source, 16/32/64 destination */
+
+#define ACPI_MOVE_64_TO_16(d,s)         ACPI_MOVE_16_TO_16(d,s)    /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_32(d,s)         ACPI_MOVE_32_TO_32(d,s)    /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_64(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
+										 ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
+										 ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
+										 ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
+										 ((  u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\
+										 ((  u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\
+										 ((  u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\
+										 ((  u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];}
+#endif
+#endif
+
+/* Macros based on machine integer width */
+
+#if ACPI_MACHINE_WIDTH == 16
+#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_16_TO_16(d,s)
+
+#elif ACPI_MACHINE_WIDTH == 32
+#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_32_TO_16(d,s)
+
+#elif ACPI_MACHINE_WIDTH == 64
+#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_64_TO_16(d,s)
+
+#else
+#error unknown ACPI_MACHINE_WIDTH
 #endif
 
 
@@ -232,21 +360,6 @@
 
 #if ACPI_MACHINE_WIDTH != 16
 
-#define ACPI_PCI_DEVICE_MASK            (u64) 0x0000FFFF00000000
-#define ACPI_PCI_FUNCTION_MASK          (u64) 0x00000000FFFF0000
-#define ACPI_PCI_REGISTER_MASK          (u64) 0x000000000000FFFF
-
-/*
- * Obsolete
- */
-
-/*
-#define ACPI_PCI_FUNCTION(a)            (u16) ((((u64)((u64)(a) & ACPI_PCI_FUNCTION_MASK)) >> 16))
-#define ACPI_PCI_DEVICE(a)              (u16) ((((u64)((u64)(a) & ACPI_PCI_DEVICE_MASK)) >> 32))
-#define ACPI_PCI_REGISTER(a)            (u16) (((u64)((u64)(a) & ACPI_PCI_REGISTER_MASK)))
-*/
-
-
 #define ACPI_PCI_DEVICE(a)              (u16) ((ACPI_HIDWORD ((a))) & 0x0000FFFF)
 #define ACPI_PCI_FUNCTION(a)            (u16) ((ACPI_LODWORD ((a))) >> 16)
 #define ACPI_PCI_REGISTER(a)            (u16) ((ACPI_LODWORD ((a))) & 0x0000FFFF)
@@ -337,10 +450,10 @@
  * 5) Expand address to 64 bits
  */
 #define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d)   do {a.address_space_id = (u8) d;\
-							  a.register_bit_width = (u8) ACPI_MUL_8 (b);\
-							  a.register_bit_offset = 0;\
-							  a.reserved = 0;\
-							  ACPI_STORE_ADDRESS (a.address,(acpi_physical_address) c);} while (0)
+												a.register_bit_width = (u8) ACPI_MUL_8 (b);\
+												a.register_bit_offset = 0;\
+												a.reserved = 0;\
+												ACPI_STORE_ADDRESS (a.address,(acpi_physical_address) c);} while (0)
 
 /* ACPI V1.0 entries -- address space is always I/O */
 
@@ -351,7 +464,7 @@
  * Reporting macros that are never compiled out
  */
 
-#define ACPI_PARAM_LIST(pl)                  pl
+#define ACPI_PARAM_LIST(pl)                 pl
 
 /*
  * Error reporting.  These versions add callers module and line#.  Since
@@ -362,9 +475,9 @@
 #ifdef ACPI_DEBUG_OUTPUT
 
 #define ACPI_REPORT_INFO(fp)                {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \
-									   acpi_os_printf ACPI_PARAM_LIST(fp);}
+												acpi_os_printf ACPI_PARAM_LIST(fp);}
 #define ACPI_REPORT_ERROR(fp)               {acpi_ut_report_error(_THIS_MODULE,__LINE__,_COMPONENT); \
-											 acpi_os_printf ACPI_PARAM_LIST(fp);}
+												acpi_os_printf ACPI_PARAM_LIST(fp);}
 #define ACPI_REPORT_WARNING(fp)             {acpi_ut_report_warning(_THIS_MODULE,__LINE__,_COMPONENT); \
 												acpi_os_printf ACPI_PARAM_LIST(fp);}
 #define ACPI_REPORT_NSERROR(s,e)            acpi_ns_report_error(_THIS_MODULE,__LINE__,_COMPONENT, s, e);
@@ -408,21 +521,21 @@
  * as a local string ("_proc_name) so that it can be also used by the function exit macros below.
  */
 
-#define ACPI_FUNCTION_NAME(a)           struct acpi_debug_print_info _dbg;     \
-										_dbg.component_id = _COMPONENT; \
-										_dbg.proc_name   = a;           \
-										_dbg.module_name = _THIS_MODULE;
-
-#define ACPI_FUNCTION_TRACE(a)          ACPI_FUNCTION_NAME(a)\
-											acpi_ut_trace(__LINE__,&_dbg)
-#define ACPI_FUNCTION_TRACE_PTR(a,b)    ACPI_FUNCTION_NAME(a)\
-											acpi_ut_trace_ptr(__LINE__,&_dbg,(void *)b)
-#define ACPI_FUNCTION_TRACE_U32(a,b)    ACPI_FUNCTION_NAME(a)\
-											acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b)
-#define ACPI_FUNCTION_TRACE_STR(a,b)    ACPI_FUNCTION_NAME(a)\
-											acpi_ut_trace_str(__LINE__,&_dbg,(char *)b)
+#define ACPI_FUNCTION_NAME(a)               struct acpi_debug_print_info _dbg; \
+												_dbg.component_id = _COMPONENT; \
+												_dbg.proc_name   = a; \
+												_dbg.module_name = _THIS_MODULE;
+
+#define ACPI_FUNCTION_TRACE(a)              ACPI_FUNCTION_NAME(a) \
+												acpi_ut_trace(__LINE__,&_dbg)
+#define ACPI_FUNCTION_TRACE_PTR(a,b)        ACPI_FUNCTION_NAME(a) \
+												acpi_ut_trace_ptr(__LINE__,&_dbg,(void *)b)
+#define ACPI_FUNCTION_TRACE_U32(a,b)        ACPI_FUNCTION_NAME(a) \
+												acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b)
+#define ACPI_FUNCTION_TRACE_STR(a,b)        ACPI_FUNCTION_NAME(a) \
+												acpi_ut_trace_str(__LINE__,&_dbg,(char *)b)
 
-#define ACPI_FUNCTION_ENTRY()           acpi_ut_track_stack_ptr()
+#define ACPI_FUNCTION_ENTRY()               acpi_ut_track_stack_ptr()
 
 /*
  * Function exit tracing.
diff -urN linux-2.5.68-bk4/include/acpi/acpiosxf.h linux-2.5.68-bk5/include/acpi/acpiosxf.h
--- linux-2.5.68-bk4/include/acpi/acpiosxf.h	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/acpiosxf.h	2003-04-24 04:34:52.000000000 -0700
@@ -229,13 +229,13 @@
 acpi_status
 acpi_os_read_port (
 	acpi_io_address                 address,
-	void                            *value,
+	u32                             *value,
 	u32                             width);
 
 acpi_status
 acpi_os_write_port (
 	acpi_io_address                 address,
-	acpi_integer                    value,
+	u32                             value,
 	u32                             width);
 
 
@@ -246,13 +246,13 @@
 acpi_status
 acpi_os_read_memory (
 	acpi_physical_address           address,
-	void                            *value,
+	u32                             *value,
 	u32                             width);
 
 acpi_status
 acpi_os_write_memory (
 	acpi_physical_address           address,
-	acpi_integer                    value,
+	u32                             value,
 	u32                             width);
 
 
diff -urN linux-2.5.68-bk4/include/acpi/actbl.h linux-2.5.68-bk5/include/acpi/actbl.h
--- linux-2.5.68-bk4/include/acpi/actbl.h	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/actbl.h	2003-04-24 04:34:52.000000000 -0700
@@ -181,7 +181,15 @@
 	u32                             critical_level;
 };
 
-
+struct hpet_description_table
+{
+	struct acpi_table_header        header;
+	u32                             hardware_id;
+	u32                             base_address[3];
+	u8                              hpet_number;
+	u16                             clock_tick;
+	u8                              attributes;
+};
 #pragma pack()
 
 
diff -urN linux-2.5.68-bk4/include/acpi/actypes.h linux-2.5.68-bk5/include/acpi/actypes.h
--- linux-2.5.68-bk4/include/acpi/actypes.h	2003-04-19 19:49:58.000000000 -0700
+++ linux-2.5.68-bk5/include/acpi/actypes.h	2003-04-24 04:34:52.000000000 -0700
@@ -154,7 +154,7 @@
 typedef u16                                     acpi_size;
 
 #define ALIGNED_ADDRESS_BOUNDARY        0x00000002
-#define _HW_ALIGNMENT_SUPPORT
+#define ACPI_MISALIGNED_TRANSFERS
 #define ACPI_USE_NATIVE_DIVIDE                          /* No 64-bit integers, ok to use native divide */
 #define ACPI_MAX_PTR                    ACPI_UINT16_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
@@ -192,7 +192,7 @@
 typedef u32                                     acpi_size;
 
 #define ALIGNED_ADDRESS_BOUNDARY        0x00000004
-#define _HW_ALIGNMENT_SUPPORT
+#define ACPI_MISALIGNED_TRANSFERS
 #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
 
@@ -1194,7 +1194,7 @@
 
 #define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
 
-#ifdef _HW_ALIGNMENT_SUPPORT
+#ifdef ACPI_MISALIGNED_TRANSFERS
 #define ACPI_ALIGN_RESOURCE_SIZE(length)    (length)
 #else
 #define ACPI_ALIGN_RESOURCE_SIZE(length)    ACPI_ROUND_UP_TO_NATIVE_WORD(length)
diff -urN linux-2.5.68-bk4/include/asm-alpha/irq.h linux-2.5.68-bk5/include/asm-alpha/irq.h
--- linux-2.5.68-bk4/include/asm-alpha/irq.h	2003-04-19 19:51:16.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-alpha/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -64,7 +64,7 @@
 # define NR_IRQS	16
 #endif
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	/*
 	 * XXX is this true for all Alpha's?  The old serial driver
diff -urN linux-2.5.68-bk4/include/asm-arm/arch-arc/irqs.h linux-2.5.68-bk5/include/asm-arm/arch-arc/irqs.h
--- linux-2.5.68-bk4/include/asm-arm/arch-arc/irqs.h	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-arm/arch-arc/irqs.h	2003-04-24 04:34:52.000000000 -0700
@@ -57,4 +57,4 @@
  */
 #define FIQ_START		64
 
-#define irq_cannonicalize(i)	(i)
+#define irq_canonicalize(i)	(i)
diff -urN linux-2.5.68-bk4/include/asm-arm/arch-ebsa285/irqs.h linux-2.5.68-bk5/include/asm-arm/arch-ebsa285/irqs.h
--- linux-2.5.68-bk4/include/asm-arm/arch-ebsa285/irqs.h	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-arm/arch-ebsa285/irqs.h	2003-04-24 04:34:52.000000000 -0700
@@ -95,4 +95,4 @@
 #define AUX_IRQ		(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
 #define IRQ_FLOPPYDISK	IRQ_ISA_FLOPPY
 
-#define irq_cannonicalize(_i)	(((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
+#define irq_canonicalize(_i)	(((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
diff -urN linux-2.5.68-bk4/include/asm-arm/arch-nexuspci/irqs.h linux-2.5.68-bk5/include/asm-arm/arch-nexuspci/irqs.h
--- linux-2.5.68-bk4/include/asm-arm/arch-nexuspci/irqs.h	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-arm/arch-nexuspci/irqs.h	2003-04-24 04:34:52.000000000 -0700
@@ -31,4 +31,4 @@
 /* timer is part of the DUART */
 #define IRQ_TIMER		IRQ_DUART
 
-#define irq_cannonicalize(i)	(i)
+#define irq_canonicalize(i)	(i)
diff -urN linux-2.5.68-bk4/include/asm-arm/arch-tbox/irqs.h linux-2.5.68-bk5/include/asm-arm/arch-tbox/irqs.h
--- linux-2.5.68-bk4/include/asm-arm/arch-tbox/irqs.h	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-arm/arch-tbox/irqs.h	2003-04-24 04:34:52.000000000 -0700
@@ -26,4 +26,4 @@
 #define IRQ_EXPMODCS0		12
 #define IRQ_EXPMODCS1		13
 
-#define irq_cannonicalize(i)	(i)
+#define irq_canonicalize(i)	(i)
diff -urN linux-2.5.68-bk4/include/asm-arm/irq.h linux-2.5.68-bk5/include/asm-arm/irq.h
--- linux-2.5.68-bk4/include/asm-arm/irq.h	2003-04-19 19:51:22.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-arm/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -3,8 +3,8 @@
 
 #include <asm/arch/irqs.h>
 
-#ifndef irq_cannonicalize
-#define irq_cannonicalize(i)	(i)
+#ifndef irq_canonicalize
+#define irq_canonicalize(i)	(i)
 #endif
 
 #ifndef NR_IRQS
diff -urN linux-2.5.68-bk4/include/asm-h8300/irq.h linux-2.5.68-bk5/include/asm-h8300/irq.h
--- linux-2.5.68-bk4/include/asm-h8300/irq.h	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-h8300/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -13,7 +13,7 @@
 
 #define IRQ_SCHED_TIMER	(40)    /* interrupt source for scheduling timer */
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return irq;
 }
diff -urN linux-2.5.68-bk4/include/asm-i386/irq.h linux-2.5.68-bk5/include/asm-i386/irq.h
--- linux-2.5.68-bk4/include/asm-i386/irq.h	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-i386/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -15,7 +15,7 @@
 /* include comes from machine specific directory */
 #include "irq_vectors.h"
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return ((irq == 2) ? 9 : irq);
 }
diff -urN linux-2.5.68-bk4/include/asm-ia64/irq.h linux-2.5.68-bk5/include/asm-ia64/irq.h
--- linux-2.5.68-bk4/include/asm-ia64/irq.h	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-ia64/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  *	Stephane Eranian <eranian@hpl.hp.com>
  *
- * 11/24/98	S.Eranian 	updated TIMER_IRQ and irq_cannonicalize
+ * 11/24/98	S.Eranian 	updated TIMER_IRQ and irq_canonicalize
  * 01/20/99	S.Eranian	added keyboard interrupt
  * 02/29/00     D.Mosberger	moved most things into hw_irq.h
  */
@@ -14,7 +14,7 @@
 #define NR_IRQS		256
 
 static __inline__ int
-irq_cannonicalize (int irq)
+irq_canonicalize (int irq)
 {
 	/*
 	 * We do the legacy thing here of pretending that irqs < 16
diff -urN linux-2.5.68-bk4/include/asm-m68k/irq.h linux-2.5.68-bk5/include/asm-m68k/irq.h
--- linux-2.5.68-bk4/include/asm-m68k/irq.h	2003-04-19 19:50:09.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-m68k/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -45,7 +45,7 @@
 
 #define IRQ_SCHED_TIMER	(8)    /* interrupt source for scheduling timer */
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return irq;
 }
diff -urN linux-2.5.68-bk4/include/asm-m68k/sun3_pgalloc.h linux-2.5.68-bk5/include/asm-m68k/sun3_pgalloc.h
--- linux-2.5.68-bk4/include/asm-m68k/sun3_pgalloc.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-m68k/sun3_pgalloc.h	2003-04-24 04:34:52.000000000 -0700
@@ -18,7 +18,7 @@
 
 extern const char bad_pmd_string[];
 
-#define lpmd_alloc_one(mm,address)       ({ BUG(); ((pmd_t *)2); })
+#define pmd_alloc_one(mm,address)       ({ BUG(); ((pmd_t *)2); })
 
 
 static inline void pte_free_kernel(pte_t * pte)
diff -urN linux-2.5.68-bk4/include/asm-mips/irq.h linux-2.5.68-bk5/include/asm-mips/irq.h
--- linux-2.5.68-bk4/include/asm-mips/irq.h	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-mips/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -16,12 +16,12 @@
 #define TIMER_IRQ 0
 
 #ifdef CONFIG_I8259
-static inline int irq_cannonicalize(int irq)
+static inline int irq_canonicalize(int irq)
 {
 	return ((irq == 2) ? 9 : irq);
 }
 #else
-#define irq_cannonicalize(irq) (irq)	/* Sane hardware, sane code ... */
+#define irq_canonicalize(irq) (irq)	/* Sane hardware, sane code ... */
 #endif
 
 struct irqaction;
diff -urN linux-2.5.68-bk4/include/asm-mips64/irq.h linux-2.5.68-bk5/include/asm-mips64/irq.h
--- linux-2.5.68-bk4/include/asm-mips64/irq.h	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-mips64/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -34,12 +34,12 @@
 			(node_level_to_irq[CPUID_TO_COMPACT_NODEID(c)][(l)])
 
 #ifdef CONFIG_I8259
-static inline int irq_cannonicalize(int irq)
+static inline int irq_canonicalize(int irq)
 {
 	return ((irq == 2) ? 9 : irq);
 }
 #else
-#define irq_cannonicalize(irq) (irq)	/* Sane hardware, sane code ... */
+#define irq_canonicalize(irq) (irq)	/* Sane hardware, sane code ... */
 #endif
 
 
diff -urN linux-2.5.68-bk4/include/asm-parisc/irq.h linux-2.5.68-bk5/include/asm-parisc/irq.h
--- linux-2.5.68-bk4/include/asm-parisc/irq.h	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-parisc/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -66,7 +66,7 @@
 
 extern struct irq_region *irq_region[NR_IRQ_REGS];
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 #ifdef CONFIG_EISA
 	return (irq == (IRQ_FROM_REGION(EISA_IRQ_REGION)+2) 
diff -urN linux-2.5.68-bk4/include/asm-ppc/irq.h linux-2.5.68-bk5/include/asm-ppc/irq.h
--- linux-2.5.68-bk4/include/asm-ppc/irq.h	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-ppc/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -66,7 +66,7 @@
 #define NR_IRQS		((NR_UIC_IRQS * NR_UICS) + NR_BOARD_IRQS)
 #endif
 static __inline__ int
-irq_cannonicalize(int irq)
+irq_canonicalize(int irq)
 {
 	return (irq);
 }
@@ -78,7 +78,7 @@
 #define	NR_IRQS		(NR_UIC_IRQS + NR_BOARD_IRQS)
 
 static __inline__ int
-irq_cannonicalize(int irq)
+irq_canonicalize(int irq)
 {
 	return (irq);
 }
@@ -148,7 +148,7 @@
 #define	mk_int_int_mask(IL) (1 << (7 - (IL/2)))
 
 /* always the same on 8xx -- Cort */
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return irq;
 }
@@ -196,10 +196,10 @@
  * powermacs as well as prep/chrp boxes.
  * Prep and chrp both have cascaded 8259 PICs.
  */
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
-	if (ppc_md.irq_cannonicalize)
-		return ppc_md.irq_cannonicalize(irq);
+	if (ppc_md.irq_canonicalize)
+		return ppc_md.irq_canonicalize(irq);
 	return irq;
 }
 
diff -urN linux-2.5.68-bk4/include/asm-ppc/machdep.h linux-2.5.68-bk5/include/asm-ppc/machdep.h
--- linux-2.5.68-bk4/include/asm-ppc/machdep.h	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-ppc/machdep.h	2003-04-24 04:34:52.000000000 -0700
@@ -25,7 +25,7 @@
 	int		(*show_cpuinfo)(struct seq_file *m);
 	int		(*show_percpuinfo)(struct seq_file *m, int i);
 	/* Optional, may be NULL. */
-	unsigned int	(*irq_cannonicalize)(unsigned int irq);
+	unsigned int	(*irq_canonicalize)(unsigned int irq);
 	void		(*init_IRQ)(void);
 	int		(*get_irq)(struct pt_regs *);
 	
diff -urN linux-2.5.68-bk4/include/asm-ppc/ocp.h linux-2.5.68-bk5/include/asm-ppc/ocp.h
--- linux-2.5.68-bk4/include/asm-ppc/ocp.h	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-ppc/ocp.h	2003-04-24 04:34:52.000000000 -0700
@@ -36,7 +36,6 @@
 #include <linux/list.h>
 #include <linux/config.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 
 #include <asm/ocp_ids.h>
 #include <asm/mmu.h>		/* For phys_addr_t */
diff -urN linux-2.5.68-bk4/include/asm-ppc64/irq.h linux-2.5.68-bk5/include/asm-ppc64/irq.h
--- linux-2.5.68-bk4/include/asm-ppc64/irq.h	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-ppc64/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -46,7 +46,7 @@
  * powermacs as well as prep/chrp boxes.
  * Prep and chrp both have cascaded 8259 PICs.
  */
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return irq;
 }
diff -urN linux-2.5.68-bk4/include/asm-sh/serial-bigsur.h linux-2.5.68-bk5/include/asm-sh/serial-bigsur.h
--- linux-2.5.68-bk4/include/asm-sh/serial-bigsur.h	2003-04-19 19:50:10.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sh/serial-bigsur.h	2003-04-24 04:34:52.000000000 -0700
@@ -25,6 +25,6 @@
 #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
 
 /* XXX: This should be moved ino irq.h */
-#define irq_cannonicalize(x) (x)
+#define irq_canonicalize(x) (x)
 
 #endif /* _ASM_SERIAL_BIGSUR_H */
diff -urN linux-2.5.68-bk4/include/asm-sh/serial-ec3104.h linux-2.5.68-bk5/include/asm-sh/serial-ec3104.h
--- linux-2.5.68-bk4/include/asm-sh/serial-ec3104.h	2003-04-19 19:49:28.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sh/serial-ec3104.h	2003-04-24 04:34:52.000000000 -0700
@@ -21,4 +21,4 @@
 #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
 
 /* XXX: This should be moved ino irq.h */
-#define irq_cannonicalize(x) (x)
+#define irq_canonicalize(x) (x)
diff -urN linux-2.5.68-bk4/include/asm-sh/serial.h linux-2.5.68-bk5/include/asm-sh/serial.h
--- linux-2.5.68-bk4/include/asm-sh/serial.h	2003-04-19 19:49:58.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sh/serial.h	2003-04-24 04:34:52.000000000 -0700
@@ -49,7 +49,7 @@
 #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
 
 /* XXX: This should be moved ino irq.h */
-#define irq_cannonicalize(x) (x)
+#define irq_canonicalize(x) (x)
 
 #endif
 #endif /* _ASM_SERIAL_H */
diff -urN linux-2.5.68-bk4/include/asm-sparc/auxio.h linux-2.5.68-bk5/include/asm-sparc/auxio.h
--- linux-2.5.68-bk4/include/asm-sparc/auxio.h	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/auxio.h	2003-04-24 04:34:52.000000000 -0700
@@ -9,8 +9,6 @@
 #include <asm/system.h>
 #include <asm/vaddrs.h>
 
-extern unsigned char *auxio_register;
-
 /* This register is an unsigned char in IO space.  It does two things.
  * First, it is used to control the front panel LED light on machines
  * that have it (good for testing entry points to trap handlers and irq's)
@@ -31,41 +29,52 @@
 #define AUXIO_FLPY_EJCT   0x02    /* Eject floppy disk.  Write only. */
 #define AUXIO_LED         0x01    /* On if set, off if unset. Read/Write */
 
-#define AUXREG   ((volatile unsigned char *)(auxio_register))
+#ifndef __ASSEMBLY__
+
+/* 
+ * NOTE: these routines are implementation dependent-- 
+ * understand the hardware you are querying! 
+ */
+extern void set_auxio(unsigned char bits_on, unsigned char bits_off);
+extern unsigned char get_auxio(void); /* .../asm-sparc/floppy.h */
 
-/* These are available on sun4c */
-#define TURN_ON_LED   if (AUXREG) *AUXREG = (*AUXREG | AUXIO_ORMEIN | AUXIO_LED)
-#define TURN_OFF_LED  if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) & (~AUXIO_LED))
-#define FLIP_LED      if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) ^ AUXIO_LED)
-#define FLPY_MOTORON  if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) | AUXIO_FLPY_DSEL)
-#define FLPY_MOTOROFF if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) & (~AUXIO_FLPY_DSEL))
-#define FLPY_TCNTON   if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) | AUXIO_FLPY_TCNT)
-#define FLPY_TCNTOFF  if (AUXREG) *AUXREG = ((*AUXREG | AUXIO_ORMEIN) & (~AUXIO_FLPY_TCNT))
+/*
+ * The following routines are provided for driver-compatibility
+ * with sparc64 (primarily sunlance.c)
+ */
 
-#ifndef __ASSEMBLY__
-#define set_auxio(bits_on, bits_off) \
+#define AUXIO_LTE_ON    1
+#define AUXIO_LTE_OFF   0
+
+/* auxio_set_lte - Set Link Test Enable (TPE Link Detect)
+ *
+ * on - AUXIO_LTE_ON or AUXIO_LTE_OFF
+ */
+#define auxio_set_lte(on) \
 do { \
-	unsigned char regval; \
-	unsigned long flags; \
-	save_flags(flags); cli(); \
-	switch(sparc_cpu_model) { \
-	case sun4c: \
-		regval = *AUXREG; \
-		*AUXREG = ((regval | bits_on) & ~bits_off) | AUXIO_ORMEIN; \
-		break; \
-	case sun4m: \
-		if(!AUXREG) \
-			break;     /* VME chassic sun4m, no auxio. */ \
-		regval = *AUXREG; \
-		*AUXREG = ((regval | bits_on) & ~bits_off) | AUXIO_ORMEIN4M; \
-		break; \
-	case sun4d: \
-		break; \
-	default: \
-		panic("Can't set AUXIO register on this machine."); \
-	}; \
-	restore_flags(flags); \
-} while(0)
+	if(on) { \
+		set_auxio(AUXIO_LINK_TEST, 0); \
+	} else { \
+		set_auxio(0, AUXIO_LINK_TEST); \
+	} \
+} while (0)
+
+#define AUXIO_LED_ON    1
+#define AUXIO_LED_OFF   0
+
+/* auxio_set_led - Set system front panel LED
+ *
+ * on - AUXIO_LED_ON or AUXIO_LED_OFF
+ */
+#define auxio_set_led(on) \
+do { \
+	if(on) { \
+		set_auxio(AUXIO_LED, 0); \
+	} else { \
+		set_auxio(0, AUXIO_LED); \
+	} \
+} while (0)
+
 #endif /* !(__ASSEMBLY__) */
 
 
diff -urN linux-2.5.68-bk4/include/asm-sparc/floppy.h linux-2.5.68-bk5/include/asm-sparc/floppy.h
--- linux-2.5.68-bk4/include/asm-sparc/floppy.h	2003-04-19 19:48:48.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/floppy.h	2003-04-24 04:34:52.000000000 -0700
@@ -115,7 +115,7 @@
 	case 5: /* FD_DATA */
 		return sun_fdc->data_82072;
 	case 7: /* FD_DIR */
-		return (*AUXREG & AUXIO_FLPY_DCHG)? 0x80: 0;
+		return (get_auxio() & AUXIO_FLPY_DCHG)? 0x80: 0;
 	};
 	panic("sun_82072_fd_inb: How did I get here?");
 }
@@ -337,7 +337,7 @@
                 sun_fdops.fd_inb = sun_82072_fd_inb;
                 sun_fdops.fd_outb = sun_82072_fd_outb;
                 fdc_status = &sun_fdc->status_82072;
-                /* printk("AUXIO @0x%p\n", auxio_register); */ /* P3 */
+                /* printk("AUXIO @0x%lx\n", auxio_register); */ /* P3 */
         } else {
                 sun_fdops.fd_inb = sun_82077_fd_inb;
                 sun_fdops.fd_outb = sun_82077_fd_outb;
diff -urN linux-2.5.68-bk4/include/asm-sparc/irq.h linux-2.5.68-bk5/include/asm-sparc/irq.h
--- linux-2.5.68-bk4/include/asm-sparc/irq.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -22,7 +22,7 @@
 
 #define NR_IRQS    16
 
-#define irq_cannonicalize(irq)	(irq)
+#define irq_canonicalize(irq)	(irq)
 
 /* Dave Redman (djhr@tadpole.co.uk)
  * changed these to function pointers.. it saves cycles and will allow
diff -urN linux-2.5.68-bk4/include/asm-sparc/kgdb.h linux-2.5.68-bk5/include/asm-sparc/kgdb.h
--- linux-2.5.68-bk4/include/asm-sparc/kgdb.h	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/kgdb.h	2003-04-24 04:34:52.000000000 -0700
@@ -52,43 +52,43 @@
 #define KGDB_NPC    0x114
 
 #define SAVE_KGDB_GLOBALS(reg) \
-        std     %g0, [%reg + REGWIN_SZ + KGDB_G0]; \
-        std     %g2, [%reg + REGWIN_SZ + KGDB_G2]; \
-        std     %g4, [%reg + REGWIN_SZ + KGDB_G4]; \
-        std     %g6, [%reg + REGWIN_SZ + KGDB_G6];
+        std     %g0, [%reg + STACKFRAME_SZ + KGDB_G0]; \
+        std     %g2, [%reg + STACKFRAME_SZ + KGDB_G2]; \
+        std     %g4, [%reg + STACKFRAME_SZ + KGDB_G4]; \
+        std     %g6, [%reg + STACKFRAME_SZ + KGDB_G6];
 
 #define SAVE_KGDB_INS(reg) \
-        std     %i0, [%reg + REGWIN_SZ + KGDB_I0]; \
-        std     %i2, [%reg + REGWIN_SZ + KGDB_I2]; \
-        std     %i4, [%reg + REGWIN_SZ + KGDB_I4]; \
-        std     %i6, [%reg + REGWIN_SZ + KGDB_I6];
+        std     %i0, [%reg + STACKFRAME_SZ + KGDB_I0]; \
+        std     %i2, [%reg + STACKFRAME_SZ + KGDB_I2]; \
+        std     %i4, [%reg + STACKFRAME_SZ + KGDB_I4]; \
+        std     %i6, [%reg + STACKFRAME_SZ + KGDB_I6];
 
 #define SAVE_KGDB_SREGS(reg, reg_y, reg_psr, reg_wim, reg_tbr, reg_pc, reg_npc) \
-        st      %reg_y, [%reg + REGWIN_SZ + KGDB_Y]; \
-        st      %reg_psr, [%reg + REGWIN_SZ + KGDB_PSR]; \
-        st      %reg_wim, [%reg + REGWIN_SZ + KGDB_WIM]; \
-        st      %reg_tbr, [%reg + REGWIN_SZ + KGDB_TBR]; \
-        st      %reg_pc, [%reg + REGWIN_SZ + KGDB_PC]; \
-        st      %reg_npc, [%reg + REGWIN_SZ + KGDB_NPC];
+        st      %reg_y, [%reg + STACKFRAME_SZ + KGDB_Y]; \
+        st      %reg_psr, [%reg + STACKFRAME_SZ + KGDB_PSR]; \
+        st      %reg_wim, [%reg + STACKFRAME_SZ + KGDB_WIM]; \
+        st      %reg_tbr, [%reg + STACKFRAME_SZ + KGDB_TBR]; \
+        st      %reg_pc, [%reg + STACKFRAME_SZ + KGDB_PC]; \
+        st      %reg_npc, [%reg + STACKFRAME_SZ + KGDB_NPC];
 
 #define LOAD_KGDB_GLOBALS(reg) \
-        ld      [%reg + REGWIN_SZ + KGDB_G1], %g1; \
-        ldd     [%reg + REGWIN_SZ + KGDB_G2], %g2; \
-        ldd     [%reg + REGWIN_SZ + KGDB_G4], %g4; \
-        ldd     [%reg + REGWIN_SZ + KGDB_G6], %g6;
+        ld      [%reg + STACKFRAME_SZ + KGDB_G1], %g1; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_G2], %g2; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_G4], %g4; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_G6], %g6;
 
 #define LOAD_KGDB_INS(reg) \
-        ldd     [%reg + REGWIN_SZ + KGDB_I0], %i0; \
-        ldd     [%reg + REGWIN_SZ + KGDB_I2], %i2; \
-        ldd     [%reg + REGWIN_SZ + KGDB_I4], %i4; \
-        ldd     [%reg + REGWIN_SZ + KGDB_I6], %i6;
+        ldd     [%reg + STACKFRAME_SZ + KGDB_I0], %i0; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_I2], %i2; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_I4], %i4; \
+        ldd     [%reg + STACKFRAME_SZ + KGDB_I6], %i6;
 
 #define LOAD_KGDB_SREGS(reg, reg_y, reg_psr, reg_wim, reg_tbr, reg_pc, reg_npc) \
-	ld	[%reg + REGWIN_SZ + KGDB_Y], %reg_y; \
-	ld	[%reg + REGWIN_SZ + KGDB_PSR], %reg_psr; \
-	ld	[%reg + REGWIN_SZ + KGDB_WIM], %reg_wim; \
-	ld	[%reg + REGWIN_SZ + KGDB_TBR], %reg_tbr; \
-	ld	[%reg + REGWIN_SZ + KGDB_PC], %reg_pc; \
-	ld	[%reg + REGWIN_SZ + KGDB_NPC], %reg_npc;
+	ld	[%reg + STACKFRAME_SZ + KGDB_Y], %reg_y; \
+	ld	[%reg + STACKFRAME_SZ + KGDB_PSR], %reg_psr; \
+	ld	[%reg + STACKFRAME_SZ + KGDB_WIM], %reg_wim; \
+	ld	[%reg + STACKFRAME_SZ + KGDB_TBR], %reg_tbr; \
+	ld	[%reg + STACKFRAME_SZ + KGDB_PC], %reg_pc; \
+	ld	[%reg + STACKFRAME_SZ + KGDB_NPC], %reg_npc;
 
 #endif /* !(_SPARC_KGDB_H) */
diff -urN linux-2.5.68-bk4/include/asm-sparc/processor.h linux-2.5.68-bk5/include/asm-sparc/processor.h
--- linux-2.5.68-bk4/include/asm-sparc/processor.h	2003-04-19 19:51:16.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/processor.h	2003-04-24 04:34:52.000000000 -0700
@@ -131,7 +131,7 @@
 			     "std\t%%g0, [%0 + %3 + 0x30]\n\t"
 			     "st\t%1, [%0 + %3 + 0x38]\n\t"
 			     "st\t%%g0, [%0 + %3 + 0x3c]"
-			     : : "r" (regs), "r" (sp - REGWIN_SZ), "r" (zero),
+			     : : "r" (regs), "r" (sp - sizeof(struct reg_window)), "r" (zero),
 			     "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0])));
 }
 
diff -urN linux-2.5.68-bk4/include/asm-sparc/ptrace.h linux-2.5.68-bk5/include/asm-sparc/ptrace.h
--- linux-2.5.68-bk4/include/asm-sparc/ptrace.h	2003-04-19 19:50:46.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/ptrace.h	2003-04-24 04:34:52.000000000 -0700
@@ -58,7 +58,6 @@
 
 #define TRACEREG_SZ   sizeof(struct pt_regs)
 #define STACKFRAME_SZ sizeof(struct sparc_stackf)
-#define REGWIN_SZ     sizeof(struct reg_window)
 
 #ifdef __KERNEL__
 #define user_mode(regs) (!((regs)->psr & PSR_PS))
@@ -70,7 +69,6 @@
 /* For assembly code. */
 #define TRACEREG_SZ       0x50
 #define STACKFRAME_SZ     0x60
-#define REGWIN_SZ         0x40
 #endif
 
 /*
diff -urN linux-2.5.68-bk4/include/asm-sparc/winmacro.h linux-2.5.68-bk5/include/asm-sparc/winmacro.h
--- linux-2.5.68-bk4/include/asm-sparc/winmacro.h	2003-04-19 19:49:14.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc/winmacro.h	2003-04-24 04:34:52.000000000 -0700
@@ -11,14 +11,6 @@
 #include <asm/ptrace.h>
 #include <asm/psr.h>
 
-/* These are just handy. */
-#define _SV	save	%sp, -REGWIN_SZ, %sp
-#define _RS     restore 
-
-#define FLUSH_ALL_KERNEL_WINDOWS \
-	_SV; _SV; _SV; _SV; _SV; _SV; _SV; \
-	_RS; _RS; _RS; _RS; _RS; _RS; _RS;
-
 /* Store the register window onto the 8-byte aligned area starting
  * at %reg.  It might be %sp, it might not, we don't care.
  */
@@ -45,25 +37,25 @@
 
 /* Loading and storing struct pt_reg trap frames. */
 #define LOAD_PT_INS(base_reg) \
-        ldd     [%base_reg + REGWIN_SZ + PT_I0], %i0; \
-        ldd     [%base_reg + REGWIN_SZ + PT_I2], %i2; \
-        ldd     [%base_reg + REGWIN_SZ + PT_I4], %i4; \
-        ldd     [%base_reg + REGWIN_SZ + PT_I6], %i6;
+        ldd     [%base_reg + STACKFRAME_SZ + PT_I0], %i0; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_I2], %i2; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_I4], %i4; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_I6], %i6;
 
 #define LOAD_PT_GLOBALS(base_reg) \
-        ld      [%base_reg + REGWIN_SZ + PT_G1], %g1; \
-        ldd     [%base_reg + REGWIN_SZ + PT_G2], %g2; \
-        ldd     [%base_reg + REGWIN_SZ + PT_G4], %g4; \
-        ldd     [%base_reg + REGWIN_SZ + PT_G6], %g6;
+        ld      [%base_reg + STACKFRAME_SZ + PT_G1], %g1; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_G2], %g2; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_G4], %g4; \
+        ldd     [%base_reg + STACKFRAME_SZ + PT_G6], %g6;
 
 #define LOAD_PT_YREG(base_reg, scratch) \
-        ld      [%base_reg + REGWIN_SZ + PT_Y], %scratch; \
+        ld      [%base_reg + STACKFRAME_SZ + PT_Y], %scratch; \
         wr      %scratch, 0x0, %y;
 
 #define LOAD_PT_PRIV(base_reg, pt_psr, pt_pc, pt_npc) \
-        ld      [%base_reg + REGWIN_SZ + PT_PSR], %pt_psr; \
-        ld      [%base_reg + REGWIN_SZ + PT_PC], %pt_pc; \
-        ld      [%base_reg + REGWIN_SZ + PT_NPC], %pt_npc;
+        ld      [%base_reg + STACKFRAME_SZ + PT_PSR], %pt_psr; \
+        ld      [%base_reg + STACKFRAME_SZ + PT_PC], %pt_pc; \
+        ld      [%base_reg + STACKFRAME_SZ + PT_NPC], %pt_npc;
 
 #define LOAD_PT_ALL(base_reg, pt_psr, pt_pc, pt_npc, scratch) \
         LOAD_PT_YREG(base_reg, scratch) \
@@ -72,25 +64,25 @@
         LOAD_PT_PRIV(base_reg, pt_psr, pt_pc, pt_npc)
 
 #define STORE_PT_INS(base_reg) \
-        std     %i0, [%base_reg + REGWIN_SZ + PT_I0]; \
-        std     %i2, [%base_reg + REGWIN_SZ + PT_I2]; \
-        std     %i4, [%base_reg + REGWIN_SZ + PT_I4]; \
-        std     %i6, [%base_reg + REGWIN_SZ + PT_I6];
+        std     %i0, [%base_reg + STACKFRAME_SZ + PT_I0]; \
+        std     %i2, [%base_reg + STACKFRAME_SZ + PT_I2]; \
+        std     %i4, [%base_reg + STACKFRAME_SZ + PT_I4]; \
+        std     %i6, [%base_reg + STACKFRAME_SZ + PT_I6];
 
 #define STORE_PT_GLOBALS(base_reg) \
-        st      %g1, [%base_reg + REGWIN_SZ + PT_G1]; \
-        std     %g2, [%base_reg + REGWIN_SZ + PT_G2]; \
-        std     %g4, [%base_reg + REGWIN_SZ + PT_G4]; \
-        std     %g6, [%base_reg + REGWIN_SZ + PT_G6];
+        st      %g1, [%base_reg + STACKFRAME_SZ + PT_G1]; \
+        std     %g2, [%base_reg + STACKFRAME_SZ + PT_G2]; \
+        std     %g4, [%base_reg + STACKFRAME_SZ + PT_G4]; \
+        std     %g6, [%base_reg + STACKFRAME_SZ + PT_G6];
 
 #define STORE_PT_YREG(base_reg, scratch) \
         rd      %y, %scratch; \
-        st      %scratch, [%base_reg + REGWIN_SZ + PT_Y];
+        st      %scratch, [%base_reg + STACKFRAME_SZ + PT_Y];
 
 #define STORE_PT_PRIV(base_reg, pt_psr, pt_pc, pt_npc) \
-        st      %pt_psr, [%base_reg + REGWIN_SZ + PT_PSR]; \
-        st      %pt_pc,  [%base_reg + REGWIN_SZ + PT_PC]; \
-        st      %pt_npc, [%base_reg + REGWIN_SZ + PT_NPC];
+        st      %pt_psr, [%base_reg + STACKFRAME_SZ + PT_PSR]; \
+        st      %pt_pc,  [%base_reg + STACKFRAME_SZ + PT_PC]; \
+        st      %pt_npc, [%base_reg + STACKFRAME_SZ + PT_NPC];
 
 #define STORE_PT_ALL(base_reg, reg_psr, reg_pc, reg_npc, g_scratch) \
         STORE_PT_PRIV(base_reg, reg_psr, reg_pc, reg_npc) \
diff -urN linux-2.5.68-bk4/include/asm-sparc64/auxio.h linux-2.5.68-bk5/include/asm-sparc64/auxio.h
--- linux-2.5.68-bk4/include/asm-sparc64/auxio.h	2003-04-19 19:51:22.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc64/auxio.h	2003-04-24 04:34:52.000000000 -0700
@@ -1,111 +1,98 @@
 /* $Id: auxio.h,v 1.3 2001/06/05 08:16:34 davem Exp $
- * auxio.h:  Definitions and code for the Auxiliary I/O register.
+ * auxio.h:  Definitions and code for the Auxiliary I/O registers.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
+ *
+ * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net)
  */
 #ifndef _SPARC64_AUXIO_H
 #define _SPARC64_AUXIO_H
 
-#include <asm/system.h>
-#include <asm/io.h>
-
-/* FIXME: All of this should be checked for sun4u. It has /sbus/auxio, but
-   I don't know whether it is the same and don't have a floppy */
+/* AUXIO implementations:
+ * sbus-based NCR89C105 "Slavio"
+ *	LED/Floppy (AUX1) register
+ *	Power (AUX2) register
+ *
+ * ebus-based auxio on PCIO 
+ *	LED Auxio Register
+ *	Power Auxio Register
+ *
+ * Register definitions from NCR _NCR89C105 Chip Specification_
+ * 
+ * SLAVIO AUX1 @ 0x1900000
+ * -------------------------------------------------
+ * | (R) | (R) |  D  | (R) |  E  |  M  |  T  |  L  |
+ * -------------------------------------------------
+ * (R) - bit 7:6,4 are reserved and should be masked in s/w
+ *  D  - Floppy Density Sense (1=high density) R/O
+ *  E  - Link Test Enable, directly reflected on AT&T 7213 LTE pin
+ *  M  - Monitor/Mouse Mux, directly reflected on MON_MSE_MUX pin
+ *  T  - Terminal Count: sends TC pulse to 82077 floppy controller
+ *  L  - System LED on front panel (0=off, 1=on) 
+ */
+#define AUXIO_AUX1_MASK		0xc0 /* Mask bits 		*/
+#define AUXIO_AUX1_FDENS	0x20 /* Floppy Density Sense	*/
+#define AUXIO_AUX1_LTE 		0x08 /* Link Test Enable 	*/
+#define AUXIO_AUX1_MMUX		0x04 /* Monitor/Mouse Mux	*/
+#define AUXIO_AUX1_FTCNT	0x02 /* Terminal Count, 	*/
+#define AUXIO_AUX1_LED		0x01 /* System LED		*/
+
+/* SLAVIO AUX2 @ 0x1910000
+ * -------------------------------------------------
+ * | (R) | (R) |  D  | (R) | (R) | (R) |  C  |  F  |
+ * -------------------------------------------------
+ * (R) - bits 7:6,4:2 are reserved and should be masked in s/w
+ *  D  - Power Failure Detect (1=power fail)
+ *  C  - Clear Power Failure Detect Int (1=clear)
+ *  F  - Power Off (1=power off)
+ */
+#define AUXIO_AUX2_MASK		0xdc /* Mask Bits		*/
+#define AUXIO_AUX2_PFAILDET	0x20 /* Power Fail Detect	*/
+#define AUXIO_AUX2_PFAILCLR 	0x02 /* Clear Pwr Fail Det Intr	*/
+#define AUXIO_AUX2_PWR_OFF	0x01 /* Power Off		*/
 
-extern unsigned long auxio_register;
+/* Register definitions from Sun Microsystems _PCIO_ p/n 802-7837
+ *
+ * PCIO LED Auxio @ 0x726000
+ * -------------------------------------------------
+ * |             31:1 Unused                 | LED |
+ * -------------------------------------------------
+ * Bits 31:1 unused
+ * LED - System LED on front panel (0=off, 1=on)
+ */
+#define AUXIO_PCIO_LED		0x01 /* System LED 		*/ 
 
-/* This register is an unsigned char in IO space.  It does two things.
- * First, it is used to control the front panel LED light on machines
- * that have it (good for testing entry points to trap handlers and irq's)
- * Secondly, it controls various floppy drive parameters.
- */
-#define AUXIO_ORMEIN      0xf0    /* All writes must set these bits. */
-#define AUXIO_ORMEIN4M    0xc0    /* sun4m - All writes must set these bits. */
-#define AUXIO_FLPY_DENS   0x20    /* Floppy density, high if set. Read only. */
-#define AUXIO_FLPY_DCHG   0x10    /* A disk change occurred.  Read only. */
-#define AUXIO_EDGE_ON     0x10    /* sun4m - On means Jumper block is in. */
-#define AUXIO_FLPY_DSEL   0x08    /* Drive select/start-motor. Write only. */
-#define AUXIO_LINK_TEST   0x08    /* sun4m - On means TPE Carrier detect. */
-
-/* Set the following to one, then zero, after doing a pseudo DMA transfer. */
-#define AUXIO_FLPY_TCNT   0x04    /* Floppy terminal count. Write only. */
-
-/* Set the following to zero to eject the floppy. */
-#define AUXIO_FLPY_EJCT   0x02    /* Eject floppy disk.  Write only. */
-#define AUXIO_LED         0x01    /* On if set, off if unset. Read/Write */
-
-#define AUXREG   (auxio_register)
-
-/* These are available on sun4c */
-#define TURN_ON_LED   \
-do {	if (AUXREG) \
-		sbus_writeb(sbus_readb(AUXREG) | \
-			    (AUXIO_ORMEIN | AUXIO_LED), AUXREG); \
-} while(0)
-#define TURN_OFF_LED  \
-do {	if (AUXREG) \
-		sbus_writeb((sbus_readb(AUXREG) | \
-			     AUXIO_ORMEIN) & (~AUXIO_LED), \
-			    AUXREG); \
-} while(0)
-#define FLIP_LED	\
-do {	if (AUXREG)  \
-		sbus_writeb((sbus_readb(AUXREG) | \
-			     AUXIO_ORMEIN) ^ AUXIO_LEN, \
-			    AUXREG); \
-} while(0)
-#define FLPY_MOTORON	\
-do {	if (AUXREG) \
-		sbus_writeb(sbus_readb(AUXREG) | \
-			    (AUXIO_ORMEIN | AUXIO_FLPY_DSEL), \
-			    AUXREG); \
-} while(0)
-#define FLPY_MOTOROFF	\
-do {	if (AUXREG) \
-		sbus_writeb((sbus_readb(AUXREG) | \
-			     AUXIO_ORMEIN) & (~AUXIO_FLPY_DSEL), \
-			    AUXREG); \
-} while(0)
-#define FLPY_TCNTON	\
-do {	if (AUXREG) \
-		sbus_writeb((sbus_readb(AUXREG) | \
-			     AUXIO_ORMEIN) | AUXIO_FLPY_TCNT, \
-			    AUXREG); \
-} while(0)
-#define FLPY_TCNTOFF	\
-do {	if (AUXREG) \
-		sbus_writeb((sbus_readb(AUXREG) | \
-			     AUXIO_ORMEIN) & (~AUXIO_FLPY_TCNT), \
-			    AUXREG); \
-} while(0)
+/* PCIO Power Auxio @ 0x724000
+ * -------------------------------------------------
+ * |             31:2 Unused           | CPO | SPO |
+ * -------------------------------------------------
+ * Bits 31:2 unused
+ * CPO - Courtesy Power Off (1=off)
+ * SPO - System Power Off   (1=off)
+ */
+#define AUXIO_PCIO_CPWR_OFF	0x02 /* Courtesy Power Off	*/
+#define AUXIO_PCIO_SPWR_OFF	0x01 /* System Power Off	*/
 
 #ifndef __ASSEMBLY__
-static __inline__ void set_auxio(unsigned char bits_on, unsigned char bits_off)
-{
-	unsigned char regval;
-	unsigned long flags;
-
-	local_irq_save(flags);
-	if (AUXREG) {
-		unsigned char newval;
-
-		regval = sbus_readb(AUXREG);
-		newval  = regval | bits_on;
-		newval &= ~bits_off;
-		newval |= AUXIO_ORMEIN4M;
-		sbus_writeb(newval, AUXREG);
-	}
-	local_irq_restore(flags);
-}
-#endif /* !(__ASSEMBLY__) */
-
-
-/* AUXIO2 (Power Off Control) */
-extern __volatile__ unsigned char * auxio_power_register;
-
-#define	AUXIO_POWER_DETECT_FAILURE	32
-#define	AUXIO_POWER_CLEAR_FAILURE	2
-#define	AUXIO_POWER_OFF			1
 
+#define AUXIO_LTE_ON	1
+#define AUXIO_LTE_OFF	0
+
+/* auxio_set_lte - Set Link Test Enable (TPE Link Detect)
+ *
+ * on - AUXIO_LTE_ON or AUXIO_LTE_OFF
+ */
+extern void auxio_set_lte(int on);
+
+#define AUXIO_LED_ON	1
+#define AUXIO_LED_OFF	0
+
+/* auxio_set_led - Set system front panel LED 
+ *
+ * on - AUXIO_LED_ON or AUXIO_LED_OFF
+ */
+extern void auxio_set_led(int on);
+
+#endif /* ifndef __ASSEMBLY__ */ 
 
-#endif /* !(_SPARC_AUXIO_H) */
+#endif /* !(_SPARC64_AUXIO_H) */
diff -urN linux-2.5.68-bk4/include/asm-sparc64/irq.h linux-2.5.68-bk5/include/asm-sparc64/irq.h
--- linux-2.5.68-bk4/include/asm-sparc64/irq.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-sparc64/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -114,7 +114,7 @@
 
 #define NR_IRQS    16
 
-#define irq_cannonicalize(irq)	(irq)
+#define irq_canonicalize(irq)	(irq)
 extern void disable_irq(unsigned int);
 #define disable_irq_nosync disable_irq
 extern void enable_irq(unsigned int);
diff -urN linux-2.5.68-bk4/include/asm-v850/irq.h linux-2.5.68-bk5/include/asm-v850/irq.h
--- linux-2.5.68-bk4/include/asm-v850/irq.h	2003-04-19 19:51:08.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-v850/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -37,7 +37,7 @@
 struct hw_interrupt_type;
 struct irqaction;
 
-#define irq_cannonicalize(irq)	(irq)
+#define irq_canonicalize(irq)	(irq)
 
 /* Initialize irq handling for IRQs.
    BASE_IRQ, BASE_IRQ+INTERVAL, ..., BASE_IRQ+NUM*INTERVAL
diff -urN linux-2.5.68-bk4/include/asm-x86_64/irq.h linux-2.5.68-bk5/include/asm-x86_64/irq.h
--- linux-2.5.68-bk4/include/asm-x86_64/irq.h	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/include/asm-x86_64/irq.h	2003-04-24 04:34:52.000000000 -0700
@@ -23,7 +23,7 @@
  */
 #define NR_IRQS 224
 
-static __inline__ int irq_cannonicalize(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
 	return ((irq == 2) ? 9 : irq);
 }
diff -urN linux-2.5.68-bk4/include/linux/acpi.h linux-2.5.68-bk5/include/linux/acpi.h
--- linux-2.5.68-bk4/include/linux/acpi.h	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/acpi.h	2003-04-24 04:34:52.000000000 -0700
@@ -33,6 +33,7 @@
 
 #include <acpi/acpi.h>
 #include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
 #include <asm/acpi.h>
 
 
diff -urN linux-2.5.68-bk4/include/linux/blk.h linux-2.5.68-bk5/include/linux/blk.h
--- linux-2.5.68-bk4/include/linux/blk.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/blk.h	2003-04-24 04:34:52.000000000 -0700
@@ -25,6 +25,7 @@
 extern int end_that_request_first(struct request *, int, int);
 extern int end_that_request_chunk(struct request *, int, int);
 extern void end_that_request_last(struct request *);
+extern void end_request(struct request *req, int uptodate);
 struct request *elv_next_request(request_queue_t *q);
 
 static inline void blkdev_dequeue_request(struct request *req)
@@ -37,19 +38,4 @@
 		elv_remove_request(req->q, req);
 }
 
-/*
- * If we have our own end_request, we do not want to include this mess
- */
-#ifndef LOCAL_END_REQUEST
-static inline void end_request(struct request *req, int uptodate)
-{
-	if (end_that_request_first(req, uptodate, req->hard_cur_sectors))
-		return;
-
-	add_disk_randomness(req->rq_disk);
-	blkdev_dequeue_request(req);
-	end_that_request_last(req);
-}
-#endif /* !LOCAL_END_REQUEST */
-
 #endif /* _BLK_H */
diff -urN linux-2.5.68-bk4/include/linux/cdrom.h linux-2.5.68-bk5/include/linux/cdrom.h
--- linux-2.5.68-bk4/include/linux/cdrom.h	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/cdrom.h	2003-04-24 04:34:52.000000000 -0700
@@ -715,7 +715,7 @@
 };
 
 #ifdef __KERNEL__
-#include <linux/devfs_fs_kernel.h>
+#include <linux/fs.h>		/* not really needed, later.. */
 #include <linux/device.h>
 
 struct cdrom_write_settings {
diff -urN linux-2.5.68-bk4/include/linux/devfs_fs_kernel.h linux-2.5.68-bk5/include/linux/devfs_fs_kernel.h
--- linux-2.5.68-bk4/include/linux/devfs_fs_kernel.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/devfs_fs_kernel.h	2003-04-24 04:34:52.000000000 -0700
@@ -27,8 +27,8 @@
 				      umode_t mode, void *ops, void *info);
 extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
 	__attribute__((format (printf, 3, 4)));
-extern int devfs_mk_symlink (const char *name, const char *link);
-extern devfs_handle_t devfs_mk_dir(const char *fmt, ...)
+extern int devfs_mk_symlink(const char *name, const char *link);
+extern int devfs_mk_dir(const char *fmt, ...)
 	__attribute__((format (printf, 1, 2)));
 extern void devfs_remove(const char *fmt, ...)
 	__attribute__((format (printf, 1, 2)));
@@ -55,9 +55,9 @@
 {
     return 0;
 }
-static inline devfs_handle_t devfs_mk_dir(const char *fmt, ...)
+static inline int devfs_mk_dir(const char *fmt, ...)
 {
-    return NULL;
+	return 0;
 }
 static inline void devfs_remove(const char *fmt, ...)
 {
diff -urN linux-2.5.68-bk4/include/linux/fb.h linux-2.5.68-bk5/include/linux/fb.h
--- linux-2.5.68-bk4/include/linux/fb.h	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/fb.h	2003-04-24 04:34:52.000000000 -0700
@@ -348,7 +348,6 @@
 
 #include <linux/fs.h>
 #include <linux/init.h>
-#include <linux/devfs_fs_kernel.h>
 
 struct fb_info;
 struct vm_area_struct;
diff -urN linux-2.5.68-bk4/include/linux/genhd.h linux-2.5.68-bk5/include/linux/genhd.h
--- linux-2.5.68-bk4/include/linux/genhd.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/genhd.h	2003-04-24 04:34:52.000000000 -0700
@@ -15,6 +15,7 @@
 #include <linux/device.h>
 #include <linux/smp.h>
 #include <linux/string.h>
+#include <linux/fs.h>
 
 enum {
 /* These three have identical behaviour; use the second one if DOS FDISK gets
@@ -55,10 +56,6 @@
 } __attribute__((packed));
 
 #ifdef __KERNEL__
-#include <linux/devfs_fs_kernel.h>	/* we don't need any devfs crap
-					   here, but some of the implicitly
-					   included headers.   will clean
-					   this mess up later.	--hch */
 struct hd_struct {
 	sector_t start_sect;
 	sector_t nr_sects;
diff -urN linux-2.5.68-bk4/include/linux/ide.h linux-2.5.68-bk5/include/linux/ide.h
--- linux-2.5.68-bk4/include/linux/ide.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/ide.h	2003-04-24 04:34:52.000000000 -0700
@@ -1245,7 +1245,6 @@
  * We need blk.h, but we replace its end_request by our own version.
  */
 #define IDE_DRIVER		/* Toggle some magic bits in blk.h */
-#define LOCAL_END_REQUEST	/* Don't generate end_request in blk.h */
 #include <linux/blk.h>
 
 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
diff -urN linux-2.5.68-bk4/include/linux/igmp.h linux-2.5.68-bk5/include/linux/igmp.h
--- linux-2.5.68-bk4/include/linux/igmp.h	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/igmp.h	2003-04-24 04:34:52.000000000 -0700
@@ -191,7 +191,7 @@
          (IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp))))
 
 #define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value)
-#define IGMPV3_MRC(value) IGMPV3_EXP(0x8000, 12, 3, value)
+#define IGMPV3_MRC(value) IGMPV3_EXP(0x80, 4, 3, value)
 
 extern int ip_check_mc(struct in_device *dev, u32 mc_addr, u32 src_addr, u16 proto);
 extern int igmp_rcv(struct sk_buff *);
@@ -199,10 +199,12 @@
 extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
 extern void ip_mc_drop_socket(struct sock *sk);
 extern int ip_mc_source(int add, int omode, struct sock *sk,
-		struct ip_mreq_source *mreqs);
-extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf);
+		struct ip_mreq_source *mreqs, int ifindex);
+extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex);
 extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
 		struct ip_msfilter *optval, int *optlen);
+extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
+		struct group_filter *optval, int *optlen);
 extern int ip_mc_sf_allow(struct sock *sk, u32 local, u32 rmt, int dif);
 extern void ip_mr_init(void);
 extern void ip_mc_init_dev(struct in_device *);
diff -urN linux-2.5.68-bk4/include/linux/input.h linux-2.5.68-bk5/include/linux/input.h
--- linux-2.5.68-bk4/include/linux/input.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/input.h	2003-04-24 04:34:52.000000000 -0700
@@ -734,7 +734,6 @@
  * In-kernel definitions.
  */
 
-#include <linux/devfs_fs_kernel.h>
 #include <linux/fs.h>
 #include <linux/timer.h>
 
diff -urN linux-2.5.68-bk4/include/linux/isdn.h linux-2.5.68-bk5/include/linux/isdn.h
--- linux-2.5.68-bk4/include/linux/isdn.h	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/isdn.h	2003-04-24 04:34:52.000000000 -0700
@@ -201,10 +201,6 @@
 #  include <linux/concap.h>
 #endif
 
-#ifdef CONFIG_DEVFS_FS
-#  include <linux/devfs_fs_kernel.h>
-#endif
-
 #include <linux/isdnif.h>
 
 #define ISDN_DRVIOCTL_MASK       0x7f  /* Mask for Device-ioctl */
diff -urN linux-2.5.68-bk4/include/linux/miscdevice.h linux-2.5.68-bk5/include/linux/miscdevice.h
--- linux-2.5.68-bk4/include/linux/miscdevice.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/miscdevice.h	2003-04-24 04:34:52.000000000 -0700
@@ -1,8 +1,6 @@
 #ifndef _LINUX_MISCDEVICE_H
 #define _LINUX_MISCDEVICE_H
 
-#include <linux/devfs_fs_kernel.h>
-
 #define BUSMOUSE_MINOR 0
 #define PSMOUSE_MINOR  1
 #define MS_BUSMOUSE_MINOR 2
diff -urN linux-2.5.68-bk4/include/linux/net.h linux-2.5.68-bk5/include/linux/net.h
--- linux-2.5.68-bk4/include/linux/net.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/net.h	2003-04-24 04:34:52.000000000 -0700
@@ -140,6 +140,9 @@
 	struct module	*owner;
 };
 
+extern int	     net_family_get(int family);
+extern void	     net_family_put(int family);
+
 struct iovec;
 
 extern int	     sock_wake_async(struct socket *sk, int how, int band);
diff -urN linux-2.5.68-bk4/include/linux/tty.h linux-2.5.68-bk5/include/linux/tty.h
--- linux-2.5.68-bk4/include/linux/tty.h	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/tty.h	2003-04-24 04:34:52.000000000 -0700
@@ -259,12 +259,14 @@
  */
 struct tty_struct {
 	int	magic;
-	struct tty_driver driver;
+	struct tty_driver *driver;
+	int index;
 	struct tty_ldisc ldisc;
 	struct termios *termios, *termios_locked;
+	char name[64];
 	int pgrp;
 	int session;
-	kdev_t	device;
+	dev_t	device;
 	unsigned long flags;
 	int count;
 	struct winsize winsize;
@@ -378,8 +380,8 @@
 extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);
 extern int tty_register_driver(struct tty_driver *driver);
 extern int tty_unregister_driver(struct tty_driver *driver);
-extern void tty_register_device(struct tty_driver *driver, unsigned minor);
-extern void tty_unregister_device(struct tty_driver *driver, unsigned minor);
+extern void tty_register_device(struct tty_driver *driver, unsigned index);
+extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
 extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
 			     int buflen);
 extern void tty_write_message(struct tty_struct *tty, char *msg);
diff -urN linux-2.5.68-bk4/include/linux/videodev.h linux-2.5.68-bk5/include/linux/videodev.h
--- linux-2.5.68-bk4/include/linux/videodev.h	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/include/linux/videodev.h	2003-04-24 04:34:52.000000000 -0700
@@ -19,7 +19,6 @@
 #ifdef __KERNEL__
 
 #include <linux/poll.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/mm.h>
 
 struct video_device
diff -urN linux-2.5.68-bk4/include/net/ip6_route.h linux-2.5.68-bk5/include/net/ip6_route.h
--- linux-2.5.68-bk4/include/net/ip6_route.h	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk5/include/net/ip6_route.h	2003-04-24 04:34:52.000000000 -0700
@@ -59,7 +59,7 @@
 					    struct in6_addr *saddr,
 					    int oif, int flags);
 
-extern struct rt6_info		*ndisc_get_dummy_rt(void);
+extern struct rt6_info		*ip6_dst_alloc(void);
 
 /*
  *	support functions for ND
diff -urN linux-2.5.68-bk4/include/pcmcia/bus_ops.h linux-2.5.68-bk5/include/pcmcia/bus_ops.h
--- linux-2.5.68-bk4/include/pcmcia/bus_ops.h	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk5/include/pcmcia/bus_ops.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,2 +0,0 @@
-/* now empty */
-#warning please remove the reference to this file
diff -urN linux-2.5.68-bk4/include/pcmcia/driver_ops.h linux-2.5.68-bk5/include/pcmcia/driver_ops.h
--- linux-2.5.68-bk4/include/pcmcia/driver_ops.h	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk5/include/pcmcia/driver_ops.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,2 +0,0 @@
-/* now empty */
-#warning please remove the reference to this file
diff -urN linux-2.5.68-bk4/include/pcmcia/ds.h linux-2.5.68-bk5/include/pcmcia/ds.h
--- linux-2.5.68-bk4/include/pcmcia/ds.h	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk5/include/pcmcia/ds.h	2003-04-24 04:34:52.000000000 -0700
@@ -31,7 +31,6 @@
 #define _LINUX_DS_H
 
 #include <pcmcia/bulkmem.h>
-#include <linux/device.h>
 #include <pcmcia/cs_types.h>
 
 typedef struct tuple_parse_t {
@@ -107,6 +106,7 @@
 #define DS_BIND_MTD			_IOWR('d', 64, mtd_info_t)
 
 #ifdef __KERNEL__
+#include <linux/device.h>
 
 typedef struct dev_node_t {
     char		dev_name[DEV_NAME_LEN];
diff -urN linux-2.5.68-bk4/kernel/acct.c linux-2.5.68-bk5/kernel/acct.c
--- linux-2.5.68-bk4/kernel/acct.c	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk5/kernel/acct.c	2003-04-24 04:34:52.000000000 -0700
@@ -335,7 +335,7 @@
 	ac.ac_stime = encode_comp_t(current->stime);
 	ac.ac_uid = current->uid;
 	ac.ac_gid = current->gid;
-	ac.ac_tty = (current->tty) ? kdev_t_to_nr(current->tty->device) : 0;
+	ac.ac_tty = current->tty ? current->tty->device : 0;
 
 	ac.ac_flag = 0;
 	if (current->flags & PF_FORKNOEXEC)
diff -urN linux-2.5.68-bk4/kernel/printk.c linux-2.5.68-bk5/kernel/printk.c
--- linux-2.5.68-bk4/kernel/printk.c	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk5/kernel/printk.c	2003-04-24 04:34:52.000000000 -0700
@@ -674,7 +674,7 @@
  */
 void tty_write_message(struct tty_struct *tty, char *msg)
 {
-	if (tty && tty->driver.write)
-		tty->driver.write(tty, 0, msg, strlen(msg));
+	if (tty && tty->driver->write)
+		tty->driver->write(tty, 0, msg, strlen(msg));
 	return;
 }
diff -urN linux-2.5.68-bk4/mm/mmap.c linux-2.5.68-bk5/mm/mmap.c
--- linux-2.5.68-bk4/mm/mmap.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/mm/mmap.c	2003-04-24 04:34:52.000000000 -0700
@@ -369,6 +369,8 @@
 		return 0;
 	if (vma->vm_flags != vm_flags)
 		return 0;
+	if (vma->vm_private_data)
+		return 0;
 	return 1;
 }
 
diff -urN linux-2.5.68-bk4/net/bluetooth/rfcomm/tty.c linux-2.5.68-bk5/net/bluetooth/rfcomm/tty.c
--- linux-2.5.68-bk4/net/bluetooth/rfcomm/tty.c	2003-04-19 19:49:54.000000000 -0700
+++ linux-2.5.68-bk5/net/bluetooth/rfcomm/tty.c	2003-04-24 04:34:52.000000000 -0700
@@ -532,7 +532,7 @@
 	struct rfcomm_dlc *dlc;
 	int err, id;
 
-        id = minor(tty->device) - tty->driver.minor_start;
+        id = tty->index;
 
 	BT_DBG("tty %p id %d", tty, id);
 
@@ -852,7 +852,7 @@
 	.magic			= TTY_DRIVER_MAGIC,
 	.driver_name		= "rfcomm",
 #ifdef CONFIG_DEVFS_FS
-	.name			= "bluetooth/rfcomm/%d",
+	.name			= "bluetooth/rfcomm/",
 #else
 	.name			= "rfcomm",
 #endif
diff -urN linux-2.5.68-bk4/net/bridge/netfilter/ebtables.c linux-2.5.68-bk5/net/bridge/netfilter/ebtables.c
--- linux-2.5.68-bk4/net/bridge/netfilter/ebtables.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk5/net/bridge/netfilter/ebtables.c	2003-04-24 04:34:52.000000000 -0700
@@ -48,8 +48,8 @@
 	/* The tty for the current task */
 	my_tty = current->tty;
 	if (my_tty != NULL) {
-		(*(my_tty->driver).write)(my_tty, 0, str, strlen(str));
-		(*(my_tty->driver).write)(my_tty, 0, "\015\012", 2);
+		my_tty->driver->write(my_tty, 0, str, strlen(str));
+		my_tty->driver->write(my_tty, 0, "\015\012", 2);
 	}
 }
 
diff -urN linux-2.5.68-bk4/net/core/dev.c linux-2.5.68-bk5/net/core/dev.c
--- linux-2.5.68-bk4/net/core/dev.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/net/core/dev.c	2003-04-24 04:34:52.000000000 -0700
@@ -2582,6 +2582,16 @@
 	if ((ret = kobject_register(&dev->kobj)))
 		goto out_err;
 	
+	/* Fix illegal SG+CSUM combinations. */
+	if ((dev->features & NETIF_F_SG) &&
+	    !(dev->features & (NETIF_F_IP_CSUM |
+			       NETIF_F_NO_CSUM |
+			       NETIF_F_HW_CSUM))) {
+		printk("%s: Dropping NETIF_F_SG since no checksum feature.\n",
+		       dev->name);
+		dev->features &= ~NETIF_F_SG;
+	}
+
 	/*
 	 *	nil rebuild_header routine,
 	 *	that should be never called and used as just bug trap.
diff -urN linux-2.5.68-bk4/net/core/sock.c linux-2.5.68-bk5/net/core/sock.c
--- linux-2.5.68-bk4/net/core/sock.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/net/core/sock.c	2003-04-24 04:34:52.000000000 -0700
@@ -589,8 +589,10 @@
  */
 struct sock *sk_alloc(int family, int priority, int zero_it, kmem_cache_t *slab)
 {
-	struct sock *sk;
-       
+	struct sock *sk = NULL;
+
+	if (!net_family_get(family))
+		goto out;
 	if (!slab)
 		slab = sk_cachep;
 	sk = kmem_cache_alloc(slab, priority);
@@ -602,14 +604,16 @@
 			sock_lock_init(sk);
 		}
 		sk->slab = slab;
-	}
-
+	} else
+		net_family_put(family);
+out:
 	return sk;
 }
 
 void sk_free(struct sock *sk)
 {
 	struct sk_filter *filter;
+	const int family = sk->family;
 
 	if (sk->destruct)
 		sk->destruct(sk);
@@ -624,6 +628,7 @@
 		printk(KERN_DEBUG "sk_free: optmem leakage (%d bytes) detected.\n", atomic_read(&sk->omem_alloc));
 
 	kmem_cache_free(sk->slab, sk);
+	net_family_put(family);
 }
 
 void __init sk_init(void)
diff -urN linux-2.5.68-bk4/net/ipv4/igmp.c linux-2.5.68-bk5/net/ipv4/igmp.c
--- linux-2.5.68-bk4/net/ipv4/igmp.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv4/igmp.c	2003-04-24 04:34:52.000000000 -0700
@@ -103,6 +103,7 @@
 
 #define IP_MAX_MEMBERSHIPS 20
 
+#ifdef CONFIG_IP_MULTICAST
 /* Parameter names and values are taken from igmp-v2-06 draft */
 
 #define IGMP_V1_Router_Present_Timeout		(400*HZ)
@@ -126,13 +127,12 @@
 #define IGMP_V2_SEEN(in_dev) ((in_dev)->mr_v2_seen && \
 		time_before(jiffies, (in_dev)->mr_v2_seen))
 
-#ifdef CONFIG_MULTICAST
 static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im);
-#endif
 static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr);
 static void igmpv3_clear_delrec(struct in_device *in_dev);
 static int sf_setstate(struct ip_mc_list *pmc);
 static void sf_markstate(struct ip_mc_list *pmc);
+#endif
 static void ip_mc_clear_src(struct ip_mc_list *pmc);
 int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
 	int sfcount, __u32 *psfsrc, int delta);
@@ -770,11 +770,18 @@
 			in_dev->mr_v2_seen = jiffies +
 				IGMP_V2_Router_Present_Timeout;
 		}
+		/* cancel the interface change timer */
+		in_dev->mr_ifc_count = 0;
+		if (del_timer(&in_dev->mr_ifc_timer))
+			atomic_dec(&in_dev->refcnt);
+		/* clear deleted report items */
 		igmpv3_clear_delrec(in_dev);
 	} else if (len < 12) {
 		return;	/* ignore bogus packet; freed by caller */
 	} else { /* v3 */
 		max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
+		if (!max_delay)
+			max_delay = 1;	/* can't mod w/ 0 */
 		in_dev->mr_maxdelay = max_delay;
 		if (ih3->qrv)
 			in_dev->mr_qrv = ih3->qrv;
@@ -951,7 +958,6 @@
 	in_dev->mc_tomb = pmc;
 	write_unlock_bh(&in_dev->mc_lock);
 }
-#endif
 
 static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr)
 {
@@ -997,7 +1003,23 @@
 		in_dev_put(pmc->interface);
 		kfree(pmc);
 	}
+	/* clear dead sources, too */
+	read_lock(&in_dev->lock);
+	for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) {
+		struct ip_sf_list *psf, *psf_next;
+
+		spin_lock_bh(&pmc->lock);
+		psf = pmc->tomb;
+		pmc->tomb = 0;
+		spin_unlock_bh(&pmc->lock);
+		for (; psf; psf=psf_next) {
+			psf_next = psf->sf_next;
+			kfree(psf);
+		}
+	}
+	read_unlock(&in_dev->lock);
 }
+#endif
 
 static void igmp_group_dropped(struct ip_mc_list *im)
 {
@@ -1030,8 +1052,8 @@
 
 	igmp_ifc_event(in_dev);
 done:
-	ip_mc_clear_src(im);
 #endif
+	ip_mc_clear_src(im);
 }
 
 static void igmp_group_added(struct ip_mc_list *im)
@@ -1102,7 +1124,7 @@
 	im->crcount = 0;
 	atomic_set(&im->refcnt, 1);
 	spin_lock_init(&im->lock);
-#ifdef  CONFIG_IP_MULTICAST
+#ifdef CONFIG_IP_MULTICAST
 	im->tm_running=0;
 	init_timer(&im->timer);
 	im->timer.data=(unsigned long)im;
@@ -1116,7 +1138,9 @@
 	im->next=in_dev->mc_list;
 	in_dev->mc_list=im;
 	write_unlock_bh(&in_dev->lock);
+#ifdef CONFIG_IP_MULTICAST
 	igmpv3_del_delrec(in_dev, im->multiaddr);
+#endif
 	igmp_group_added(im);
 	if (in_dev->dev->flags & IFF_UP)
 		ip_rt_multicast_event(in_dev);
@@ -1173,7 +1197,9 @@
 	for (i=in_dev->mc_list; i; i=i->next)
 		igmp_group_dropped(i);
 
+#ifdef CONFIG_IP_MULTICAST
 	igmpv3_clear_delrec(in_dev);
+#endif
 
 	ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS);
 }
@@ -1186,12 +1212,12 @@
 
 	ASSERT_RTNL();
 
+	in_dev->mc_tomb = 0;
 #ifdef CONFIG_IP_MULTICAST
 	in_dev->mr_gq_running = 0;
 	init_timer(&in_dev->mr_gq_timer);
 	in_dev->mr_gq_timer.data=(unsigned long) in_dev;
 	in_dev->mr_gq_timer.function=&igmp_gq_timer_expire;
-	in_dev->mc_tomb = 0;
 	in_dev->mr_ifc_count = 0;
 	init_timer(&in_dev->mr_ifc_timer);
 	in_dev->mr_ifc_timer.data=(unsigned long) in_dev;
@@ -1237,6 +1263,12 @@
 	struct net_device *dev = NULL;
 	struct in_device *idev = NULL;
 
+	if (imr->imr_ifindex) {
+		idev = inetdev_by_index(imr->imr_ifindex);
+		if (idev)
+			__in_dev_put(idev);
+		return idev;
+	}
 	if (imr->imr_address.s_addr) {
 		dev = ip_dev_find(imr->imr_address.s_addr);
 		if (!dev)
@@ -1282,13 +1314,16 @@
 		ip_rt_multicast_event(pmc->interface);
 	}
 	if (!psf->sf_count[MCAST_INCLUDE] && !psf->sf_count[MCAST_EXCLUDE]) {
+#ifdef CONFIG_IP_MULTICAST
 		struct in_device *in_dev = pmc->interface;
+#endif
 
 		/* no more filters for this source */
 		if (psf_prev)
 			psf_prev->sf_next = psf->sf_next;
 		else
 			pmc->sources = psf->sf_next;
+#ifdef CONFIG_IP_MULTICAST
 		if (psf->sf_oldin &&
 		    !IGMP_V1_SEEN(in_dev) && !IGMP_V2_SEEN(in_dev)) {
 			psf->sf_crcount = in_dev->mr_qrv ? in_dev->mr_qrv : 
@@ -1297,6 +1332,7 @@
 			pmc->tomb = psf;
 			rv = 1;
 		} else
+#endif
 			kfree(psf);
 	}
 	return rv;
@@ -1327,7 +1363,9 @@
 	}
 	spin_lock_bh(&pmc->lock);
 	read_unlock(&in_dev->lock);
+#ifdef CONFIG_IP_MULTICAST
 	sf_markstate(pmc);
+#endif
 	if (!delta) {
 		if (!pmc->sfcount[sfmode])
 			return -EINVAL;
@@ -1344,10 +1382,13 @@
 	if (pmc->sfmode == MCAST_EXCLUDE &&
 	    pmc->sfcount[MCAST_EXCLUDE] == 0 &&
 	    pmc->sfcount[MCAST_INCLUDE]) {
+#ifdef CONFIG_IP_MULTICAST
 		struct ip_sf_list *psf;
+#endif
 
 		/* filter mode change */
 		pmc->sfmode = MCAST_INCLUDE;
+#ifdef CONFIG_IP_MULTICAST
 		pmc->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : 
 			IGMP_Unsolicited_Report_Count;
 		in_dev->mr_ifc_count = pmc->crcount;
@@ -1356,6 +1397,7 @@
 		igmp_ifc_event(pmc->interface);
 	} else if (sf_setstate(pmc) || changerec) {
 		igmp_ifc_event(pmc->interface);
+#endif
 	}
 	spin_unlock_bh(&pmc->lock);
 	return err;
@@ -1393,6 +1435,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_IP_MULTICAST
 static void sf_markstate(struct ip_mc_list *pmc)
 {
 	struct ip_sf_list *psf;
@@ -1428,6 +1471,7 @@
 	}
 	return rv;
 }
+#endif
 
 /*
  * Add multicast source filter list to the interface list
@@ -1454,7 +1498,9 @@
 	spin_lock_bh(&pmc->lock);
 	read_unlock(&in_dev->lock);
 
+#ifdef CONFIG_IP_MULTICAST
 	sf_markstate(pmc);
+#endif
 	isexclude = pmc->sfmode == MCAST_EXCLUDE;
 	if (!delta)
 		pmc->sfcount[sfmode]++;
@@ -1471,14 +1517,17 @@
 		for (j=0; j<i; j++)
 			(void) ip_mc_del1_src(pmc, sfmode, &psfsrc[i]);
 	} else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) {
+#ifdef CONFIG_IP_MULTICAST
 		struct in_device *in_dev = pmc->interface;
 		struct ip_sf_list *psf;
+#endif
 
 		/* filter mode change */
 		if (pmc->sfcount[MCAST_EXCLUDE])
 			pmc->sfmode = MCAST_EXCLUDE;
 		else if (pmc->sfcount[MCAST_INCLUDE])
 			pmc->sfmode = MCAST_INCLUDE;
+#ifdef CONFIG_IP_MULTICAST
 		/* else no filters; keep old mode for reports */
 
 		pmc->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : 
@@ -1487,8 +1536,10 @@
 		for (psf=pmc->sources; psf; psf = psf->sf_next)
 			psf->sf_crcount = 0;
 		igmp_ifc_event(in_dev);
-	} else if (sf_setstate(pmc))
+	} else if (sf_setstate(pmc)) {
 		igmp_ifc_event(in_dev);
+#endif
+	}
 	spin_unlock_bh(&pmc->lock);
 	return err;
 }
@@ -1530,13 +1581,7 @@
 
 	rtnl_shlock();
 
-	if (!imr->imr_ifindex)
-		in_dev = ip_mc_find_dev(imr);
-	else {
-		in_dev = inetdev_by_index(imr->imr_ifindex);
-		if (in_dev)
-			__in_dev_put(in_dev);
-	}
+	in_dev = ip_mc_find_dev(imr);
 
 	if (!in_dev) {
 		iml = NULL;
@@ -1638,13 +1683,13 @@
 }
 
 int ip_mc_source(int add, int omode, struct sock *sk, struct
-	ip_mreq_source *mreqs)
+	ip_mreq_source *mreqs, int ifindex)
 {
 	int err;
-	struct ip_mreqn	imr;
+	struct ip_mreqn imr;
 	u32 addr = mreqs->imr_multiaddr;
 	struct ip_mc_socklist *pmc;
-	struct in_device *in_dev;
+	struct in_device *in_dev = 0;
 	struct inet_opt *inet = inet_sk(sk);
 	struct ip_sf_socklist *psl;
 	int i, j, rv;
@@ -1656,7 +1701,7 @@
 
 	imr.imr_multiaddr.s_addr = mreqs->imr_multiaddr;
 	imr.imr_address.s_addr = mreqs->imr_interface;
-	imr.imr_ifindex = 0;
+	imr.imr_ifindex = ifindex;
 	in_dev = ip_mc_find_dev(&imr);
 
 	if (!in_dev) {
@@ -1753,7 +1798,7 @@
 	return err;
 }
 
-int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf)
+int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
 {
 	int err;
 	struct ip_mreqn	imr;
@@ -1773,7 +1818,7 @@
 
 	imr.imr_multiaddr.s_addr = msf->imsf_multiaddr;
 	imr.imr_address.s_addr = msf->imsf_interface;
-	imr.imr_ifindex = 0;
+	imr.imr_ifindex = ifindex;
 	in_dev = ip_mc_find_dev(&imr);
 
 	if (!in_dev) {
@@ -1783,7 +1828,8 @@
 	err = -EADDRNOTAVAIL;
 
 	for (pmc=inet->mc_list; pmc; pmc=pmc->next) {
-		if (memcmp(&pmc->multi, &imr, sizeof(imr)) == 0)
+		if (pmc->multi.imr_multiaddr.s_addr == msf->imsf_multiaddr &&
+		    pmc->multi.imr_ifindex == imr.imr_ifindex)
 			break;
 	}
 	if (!pmc)		/* must have a prior join */
@@ -1834,9 +1880,6 @@
 
 	if (!MULTICAST(addr))
 		return -EINVAL;
-	if (msf->imsf_fmode != MCAST_INCLUDE &&
-	    msf->imsf_fmode != MCAST_EXCLUDE)
-		return -EINVAL;
 
 	rtnl_shlock();
 
@@ -1852,7 +1895,8 @@
 	err = -EADDRNOTAVAIL;
 
 	for (pmc=inet->mc_list; pmc; pmc=pmc->next) {
-		if (memcmp(&pmc->multi, &imr, sizeof(imr)) == 0)
+		if (pmc->multi.imr_multiaddr.s_addr == msf->imsf_multiaddr &&
+		    pmc->multi.imr_ifindex == imr.imr_ifindex)
 			break;
 	}
 	if (!pmc)		/* must have a prior join */
@@ -1882,6 +1926,61 @@
 	return err;
 }
 
+int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
+	struct group_filter *optval, int *optlen)
+{
+	int err, i, count, copycount;
+	struct sockaddr_in *psin;
+	u32 addr;
+	struct ip_mc_socklist *pmc;
+	struct inet_opt *inet = inet_sk(sk);
+	struct ip_sf_socklist *psl;
+
+	psin = (struct sockaddr_in *)&gsf->gf_group;
+	if (psin->sin_family != AF_INET)
+		return -EINVAL;
+	addr = psin->sin_addr.s_addr;
+	if (!MULTICAST(addr))
+		return -EINVAL;
+
+	rtnl_shlock();
+
+	err = -EADDRNOTAVAIL;
+
+	for (pmc=inet->mc_list; pmc; pmc=pmc->next) {
+		if (pmc->multi.imr_multiaddr.s_addr == addr &&
+		    pmc->multi.imr_ifindex == gsf->gf_interface)
+			break;
+	}
+	if (!pmc)		/* must have a prior join */
+		goto done;
+	gsf->gf_fmode = pmc->sfmode;
+	psl = pmc->sflist;
+	rtnl_shunlock();
+	count = psl ? psl->sl_count : 0;
+	copycount = count < gsf->gf_numsrc ? count : gsf->gf_numsrc;
+	gsf->gf_numsrc = count;
+	if (put_user(GROUP_FILTER_SIZE(copycount), optlen) ||
+	    copy_to_user((void *)optval, gsf, GROUP_FILTER_SIZE(0))) {
+		return -EFAULT;
+	}
+	for (i=0; i<copycount; i++) {
+		struct sockaddr_in *psin;
+		struct sockaddr_storage ss;
+
+		psin = (struct sockaddr_in *)&ss;
+		memset(&ss, 0, sizeof(ss));
+		psin->sin_family = AF_INET;
+		psin->sin_addr.s_addr = psl->sl_addr[i];
+		if (copy_to_user((void *)&optval->gf_slist[i], &ss, sizeof(ss)))
+			return -EFAULT;
+	}
+	return 0;
+done:
+	rtnl_shunlock();
+	return err;
+}
+
 /*
  * check if a multicast source filter allows delivery for a given <src,dst,intf>
  */
@@ -1892,6 +1991,9 @@
 	struct ip_sf_socklist *psl;
 	int i;
 
+	if (!MULTICAST(loc_addr))
+		return 1;
+
 	for (pmc=inet->mc_list; pmc; pmc=pmc->next) {
 		if (pmc->multi.imr_multiaddr.s_addr == loc_addr &&
 		    pmc->multi.imr_ifindex == dif)
@@ -1972,8 +2074,6 @@
 }
 
 
-#ifdef CONFIG_IP_MULTICAST
- 
 int ip_mc_procinfo(char *buffer, char **start, off_t offset, int length)
 {
 	off_t pos=0, begin=0;
@@ -1991,7 +2091,9 @@
 		if (in_dev == NULL)
 			continue;
 
+#ifdef CONFIG_IP_MULTICAST
 		querier = IGMP_V1_SEEN(in_dev) ? "V1" : "V2";
+#endif
 
 		len+=sprintf(buffer+len,"%d\t%-10s: %5d %7s\n",
 			     dev->ifindex, dev->name, dev->mc_count, querier);
@@ -2049,11 +2151,8 @@
 
 		for (imc=in_dev->mc_list; imc; imc=imc->next) {
 			struct ip_sf_list *psf;
-			unsigned long icount, xcount;
 
 			spin_lock_bh(&imc->lock);
-			icount = imc->sfcount[MCAST_INCLUDE];
-			xcount = imc->sfcount[MCAST_EXCLUDE];
 			for (psf=imc->sources; psf; psf=psf->sf_next) {
 				if (first) {
 					len += sprintf(buffer+len, "%3s %6s "
@@ -2080,33 +2179,6 @@
 					in_dev_put(in_dev);
 					goto done;
 				}
-				icount -= psf->sf_count[MCAST_INCLUDE];
-				xcount -= psf->sf_count[MCAST_EXCLUDE];
-			}
-			if (icount > 0 || xcount > 0) {
-				if (first) {
-					len += sprintf(buffer+len, "%3s %6s "
-						"%10s %10s %6s %6s\n", "Idx",
-						"Device", "MCA", "SRC", "INC",
-						"EXC");
-					first = 0;
-				}
-				len += sprintf(buffer+len, "%3d %6.6s 0x%08x "
-					"%10s %6lu %6lu\n", dev->ifindex,
-					dev->name, ntohl(imc->multiaddr),
-					"NONE", icount, xcount);
-				pos=begin+len;
-				if(pos<offset)
-				{
-					len=0;
-					begin=pos;
-				}
-				if(pos>offset+length) {
-					spin_unlock_bh(&imc->lock);
-					read_unlock(&in_dev->lock);
-					in_dev_put(in_dev);
-					goto done;
-				}
 			}
 			spin_unlock_bh(&imc->lock);
 		}
@@ -2125,5 +2197,3 @@
 	return len;
 }
 
-#endif
-
diff -urN linux-2.5.68-bk4/net/ipv4/ip_output.c linux-2.5.68-bk5/net/ipv4/ip_output.c
--- linux-2.5.68-bk4/net/ipv4/ip_output.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv4/ip_output.c	2003-04-24 04:34:52.000000000 -0700
@@ -1312,6 +1312,6 @@
 
 #ifdef CONFIG_IP_MULTICAST
 	proc_net_create("igmp", 0, ip_mc_procinfo);
-	proc_net_create("mcfilter", 0, ip_mcf_procinfo);
 #endif
+	proc_net_create("mcfilter", 0, ip_mcf_procinfo);
 }
diff -urN linux-2.5.68-bk4/net/ipv4/ip_sockglue.c linux-2.5.68-bk5/net/ipv4/ip_sockglue.c
--- linux-2.5.68-bk4/net/ipv4/ip_sockglue.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv4/ip_sockglue.c	2003-04-24 04:34:52.000000000 -0700
@@ -631,7 +631,7 @@
 				kfree(msf);
 				break;
 			}
-			err = ip_mc_msfilter(sk, msf);
+			err = ip_mc_msfilter(sk, msf, 0);
 			kfree(msf);
 			break;
 		}
@@ -670,7 +670,142 @@
 				omode = MCAST_INCLUDE;
 				add = 0;
 			}
-			err = ip_mc_source(add, omode, sk, &mreqs);
+			err = ip_mc_source(add, omode, sk, &mreqs, 0);
+			break;
+		}
+		case MCAST_JOIN_GROUP:
+		case MCAST_LEAVE_GROUP: 
+		{
+			struct group_req greq;
+			struct sockaddr_in *psin;
+			struct ip_mreqn mreq;
+
+			if (optlen < sizeof(struct group_req))
+				goto e_inval;
+			err = -EFAULT;
+			if(copy_from_user(&greq, optval, sizeof(greq)))
+				break;
+			psin = (struct sockaddr_in *)&greq.gr_group;
+			if (psin->sin_family != AF_INET)
+				goto e_inval;
+			memset(&mreq, 0, sizeof(mreq));
+			mreq.imr_multiaddr = psin->sin_addr;
+			mreq.imr_ifindex = greq.gr_interface;
+
+			if (optname == MCAST_JOIN_GROUP)
+				err = ip_mc_join_group(sk, &mreq);
+			else
+				err = ip_mc_leave_group(sk, &mreq);
+			break;
+		}
+		case MCAST_JOIN_SOURCE_GROUP:
+		case MCAST_LEAVE_SOURCE_GROUP:
+		case MCAST_BLOCK_SOURCE:
+		case MCAST_UNBLOCK_SOURCE:
+		{
+			struct group_source_req greqs;
+			struct ip_mreq_source mreqs;
+			struct sockaddr_in *psin;
+			int omode, add;
+
+			if (optlen != sizeof(struct group_source_req))
+				goto e_inval;
+			if (copy_from_user(&greqs, optval, sizeof(greqs))) {
+				err = -EFAULT;
+				break;
+			}
+			if (greqs.gsr_group.ss_family != AF_INET ||
+			    greqs.gsr_source.ss_family != AF_INET) {
+				err = -EADDRNOTAVAIL;
+				break;
+			}
+			psin = (struct sockaddr_in *)&greqs.gsr_group;
+			mreqs.imr_multiaddr = psin->sin_addr.s_addr;
+			psin = (struct sockaddr_in *)&greqs.gsr_source;
+			mreqs.imr_sourceaddr = psin->sin_addr.s_addr;
+			mreqs.imr_interface = 0; /* use index for mc_source */
+
+			if (optname == MCAST_BLOCK_SOURCE) {
+				omode = MCAST_EXCLUDE;
+				add = 1;
+			} else if (optname == MCAST_UNBLOCK_SOURCE) {
+				omode = MCAST_EXCLUDE;
+				add = 0;
+			} else if (optname == MCAST_JOIN_SOURCE_GROUP) {
+				struct ip_mreqn mreq;
+
+				psin = (struct sockaddr_in *)&greqs.gsr_group;
+				mreq.imr_multiaddr = psin->sin_addr;
+				mreq.imr_address.s_addr = 0;
+				mreq.imr_ifindex = greqs.gsr_interface;
+				err = ip_mc_join_group(sk, &mreq);
+				if (err)
+					break;
+				omode = MCAST_INCLUDE;
+				add = 1;
+			} else /* MCAST_LEAVE_SOURCE_GROUP */ {
+				omode = MCAST_INCLUDE;
+				add = 0;
+			}
+			err = ip_mc_source(add, omode, sk, &mreqs,
+				greqs.gsr_interface);
+			break;
+		}
+		case MCAST_MSFILTER:
+		{
+			struct sockaddr_in *psin;
+			struct ip_msfilter *msf = 0;
+			struct group_filter *gsf = 0;
+			int msize, i, ifindex;
+
+			if (optlen < GROUP_FILTER_SIZE(0))
+				goto e_inval;
+			gsf = (struct group_filter *)kmalloc(optlen,GFP_KERNEL);
+			if (gsf == 0) {
+				err = -ENOBUFS;
+				break;
+			}
+			err = -EFAULT;
+			if (copy_from_user(gsf, optval, optlen)) {
+				goto mc_msf_out;
+			}
+			if (GROUP_FILTER_SIZE(gsf->gf_numsrc) < optlen) {
+				err = EINVAL;
+				goto mc_msf_out;
+			}
+			msize = IP_MSFILTER_SIZE(gsf->gf_numsrc);
+			msf = (struct ip_msfilter *)kmalloc(msize,GFP_KERNEL);
+			if (msf == 0) {
+				err = -ENOBUFS;
+				goto mc_msf_out;
+			}
+			ifindex = gsf->gf_interface;
+			psin = (struct sockaddr_in *)&gsf->gf_group;
+			if (psin->sin_family != AF_INET) {
+				err = -EADDRNOTAVAIL;
+				goto mc_msf_out;
+			}
+			msf->imsf_multiaddr = psin->sin_addr.s_addr;
+			msf->imsf_interface = 0;
+			msf->imsf_fmode = gsf->gf_fmode;
+			msf->imsf_numsrc = gsf->gf_numsrc;
+			err = -EADDRNOTAVAIL;
+			for (i=0; i<gsf->gf_numsrc; ++i) {
+				psin = (struct sockaddr_in *)&gsf->gf_slist[i];
+
+				if (psin->sin_family != AF_INET)
+					goto mc_msf_out;
+				msf->imsf_slist[i] = psin->sin_addr.s_addr;
+			}
+			kfree(gsf);
+			gsf = 0;
+
+			err = ip_mc_msfilter(sk, msf, ifindex);
+mc_msf_out:
+			if (msf)
+				kfree(msf);
+			if (gsf)
+				kfree(gsf);
 			break;
 		}
 		case IP_ROUTER_ALERT:	
@@ -826,15 +961,37 @@
 			struct ip_msfilter msf;
 			int err;
 
-			if (len < IP_MSFILTER_SIZE(0))
+			if (len < IP_MSFILTER_SIZE(0)) {
+				release_sock(sk);
 				return -EINVAL;
-			if (copy_from_user(&msf, optval, IP_MSFILTER_SIZE(0)))
+			}
+			if (copy_from_user(&msf, optval, IP_MSFILTER_SIZE(0))) {
+				release_sock(sk);
 				return -EFAULT;
+			}
 			err = ip_mc_msfget(sk, &msf,
 				(struct ip_msfilter *)optval, optlen);
 			release_sock(sk);
 			return err;
 		}
+		case MCAST_MSFILTER:
+		{
+			struct group_filter gsf;
+			int err;
+
+			if (len < GROUP_FILTER_SIZE(0)) {
+				release_sock(sk);
+				return -EINVAL;
+			}
+			if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) {
+				release_sock(sk);
+				return -EFAULT;
+			}
+			err = ip_mc_gsfget(sk, &gsf,
+				(struct group_filter *)optval, optlen);
+			release_sock(sk);
+			return err;
+		}
 		case IP_PKTOPTIONS:		
 		{
 			struct msghdr msg;
diff -urN linux-2.5.68-bk4/net/ipv4/netfilter/Kconfig linux-2.5.68-bk5/net/ipv4/netfilter/Kconfig
--- linux-2.5.68-bk4/net/ipv4/netfilter/Kconfig	2003-04-19 19:50:40.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv4/netfilter/Kconfig	2003-04-24 04:34:52.000000000 -0700
@@ -48,7 +48,7 @@
 	  <file:Documentation/modules.txt>.  If unsure, say `Y'.
 
 config IP_NF_TFTP
-	tristate "TFTP prtocol support"
+	tristate "TFTP protocol support"
 	depends on IP_NF_CONNTRACK
 	help
 	  TFTP connection tracking helper, this is required depending
diff -urN linux-2.5.68-bk4/net/ipv6/ipv6_sockglue.c linux-2.5.68-bk5/net/ipv6/ipv6_sockglue.c
--- linux-2.5.68-bk4/net/ipv6/ipv6_sockglue.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv6/ipv6_sockglue.c	2003-04-24 04:34:52.000000000 -0700
@@ -120,6 +120,12 @@
 	return 0;
 }
 
+extern int ip6_mc_source(int add, int omode, struct sock *sk,
+	struct group_source_req *pgsr);
+extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf);
+extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
+	struct group_filter *optval, int *optlen);
+
 
 int ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, 
 		    int optlen)
@@ -393,12 +399,13 @@
 			break;
 		}
 		psin6 = (struct sockaddr_in6 *)&greq.gr_group;
-		if (optname == IPV6_ADD_MEMBERSHIP)
+		if (optname == MCAST_JOIN_GROUP)
 			retv = ipv6_sock_mc_join(sk, greq.gr_interface,
 				&psin6->sin6_addr);
 		else
 			retv = ipv6_sock_mc_drop(sk, greq.gr_interface,
 				&psin6->sin6_addr);
+		break;
 	}
 	case MCAST_JOIN_SOURCE_GROUP:
 	case MCAST_LEAVE_SOURCE_GROUP:
@@ -414,7 +421,8 @@
 			retv = -EFAULT;
 			break;
 		}
-		if (greqs.gsr_group.ss_family != AF_INET6) {
+		if (greqs.gsr_group.ss_family != AF_INET6 ||
+		    greqs.gsr_source.ss_family != AF_INET6) {
 			retv = -EADDRNOTAVAIL;
 			break;
 		}
diff -urN linux-2.5.68-bk4/net/ipv6/mcast.c linux-2.5.68-bk5/net/ipv6/mcast.c
--- linux-2.5.68-bk4/net/ipv6/mcast.c	2003-04-19 19:50:44.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv6/mcast.c	2003-04-24 04:34:52.000000000 -0700
@@ -768,7 +768,7 @@
 		psf = pmc->mca_tomb;
 		pmc->mca_tomb = 0;
 		spin_unlock_bh(&pmc->mca_lock);
-		for (psf=pmc->mca_tomb; psf; psf=psf_next) {
+		for (; psf; psf=psf_next) {
 			psf_next = psf->sf_next;
 			kfree(psf);
 		}
@@ -1042,6 +1042,8 @@
 		mld_clear_delrec(idev);
 	} else if (len >= 28) {
 		max_delay = MLDV2_MRC(ntohs(mlh2->mrc))*(HZ/10);
+		if (!max_delay)
+			max_delay = 1;
 		idev->mc_maxdelay = max_delay;
 		if (mlh2->qrv)
 			idev->mc_qrv = mlh2->qrv;
@@ -2096,8 +2098,6 @@
 			unsigned long icount, xcount, i;
 
 			spin_lock_bh(&imc->mca_lock);
-			icount = imc->mca_sfcount[MCAST_INCLUDE];
-			xcount = imc->mca_sfcount[MCAST_EXCLUDE];
 			for (psf=imc->mca_sources; psf; psf=psf->sf_next) {
 				if (first) {
 					len += sprintf(buffer+len, "%3s %6s "
@@ -2130,36 +2130,6 @@
 					in6_dev_put(idev);
 					goto done;
 				}
-				icount -= psf->sf_count[MCAST_INCLUDE];
-				xcount -= psf->sf_count[MCAST_EXCLUDE];
-			}
-			if (icount > 0 || xcount > 0) {
-				if (first) {
-					len += sprintf(buffer+len, "%3s %6s "
-						"%32s %32s %6s %6s\n", "Idx",
-						"Device", "Multicast Address",
-						"Source Address", "INC", "EXC");
-					first = 0;
-				}
-				len += sprintf(buffer+len,"%3d %6.6s ",
-					dev->ifindex, dev->name);
-
-				for (i=0; i<16; i++)
-					len += sprintf(buffer+len, "%02x",
-						imc->mca_addr.s6_addr[i]);
-				len += sprintf(buffer+len, " %32s %6lu %6lu\n",
-					"NONE", icount, xcount);
-				pos = begin+len;
-				if (pos < offset) {
-					len=0;
-					begin=pos;
-				}
-				if (pos > offset+length) {
-					spin_unlock_bh(&imc->mca_lock);
-					read_unlock_bh(&idev->lock);
-					in6_dev_put(idev);
-					goto done;
-				}
 			}
 			spin_unlock_bh(&imc->mca_lock);
 		}
diff -urN linux-2.5.68-bk4/net/ipv6/ndisc.c linux-2.5.68-bk5/net/ipv6/ndisc.c
--- linux-2.5.68-bk4/net/ipv6/ndisc.c	2003-04-19 19:50:01.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv6/ndisc.c	2003-04-24 04:34:52.000000000 -0700
@@ -427,7 +427,7 @@
 
 	len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
 
-	rt = ndisc_get_dummy_rt();
+	rt = ip6_dst_alloc();
 	if (!rt) 
 		return;
 
@@ -524,7 +524,7 @@
 		saddr = &addr_buf;
 	}
 
-	rt = ndisc_get_dummy_rt();
+	rt = ip6_dst_alloc();
 	if (!rt) 
 		return;
 
@@ -595,7 +595,7 @@
         int len;
 	int err;
 
-	rt = ndisc_get_dummy_rt();
+	rt = ip6_dst_alloc();
 	if (!rt) 
 		return;
 
diff -urN linux-2.5.68-bk4/net/ipv6/route.c linux-2.5.68-bk5/net/ipv6/route.c
--- linux-2.5.68-bk4/net/ipv6/route.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk5/net/ipv6/route.c	2003-04-24 04:34:52.000000000 -0700
@@ -130,12 +130,17 @@
 rwlock_t rt6_lock = RW_LOCK_UNLOCKED;
 
 
-/*	Dummy rt for ndisc */
-struct rt6_info *ndisc_get_dummy_rt()
+/* allocate dst with ip6_dst_ops */
+static __inline__ struct rt6_info *__ip6_dst_alloc(void)
 {
 	return dst_alloc(&ip6_dst_ops);
 }
 
+struct rt6_info *ip6_dst_alloc(void)
+{
+	return __ip6_dst_alloc();
+}
+
 /*
  *	Route lookup. Any rt6_lock is implied.
  */
@@ -640,7 +645,7 @@
 	if (rtmsg->rtmsg_metric == 0)
 		rtmsg->rtmsg_metric = IP6_RT_PRIO_USER;
 
-	rt = dst_alloc(&ip6_dst_ops);
+	rt = __ip6_dst_alloc();
 
 	if (rt == NULL)
 		return -ENOMEM;
@@ -1035,9 +1040,7 @@
 
 static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
 {
-	struct rt6_info *rt;
-
-	rt = dst_alloc(&ip6_dst_ops);
+	struct rt6_info *rt = __ip6_dst_alloc();
 
 	if (rt) {
 		rt->u.dst.input = ort->u.dst.input;
@@ -1181,9 +1184,8 @@
 
 int ip6_rt_addr_add(struct in6_addr *addr, struct net_device *dev)
 {
-	struct rt6_info *rt;
+	struct rt6_info *rt = __ip6_dst_alloc();
 
-	rt = dst_alloc(&ip6_dst_ops);
 	if (rt == NULL)
 		return -ENOMEM;
 
diff -urN linux-2.5.68-bk4/net/irda/ircomm/ircomm_tty.c linux-2.5.68-bk5/net/irda/ircomm/ircomm_tty.c
--- linux-2.5.68-bk4/net/irda/ircomm/ircomm_tty.c	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk5/net/irda/ircomm/ircomm_tty.c	2003-04-24 04:34:52.000000000 -0700
@@ -99,11 +99,7 @@
 	memset(&driver, 0, sizeof(struct tty_driver));
 	driver.magic           = TTY_DRIVER_MAGIC;
 	driver.driver_name     = "ircomm";
-#ifdef CONFIG_DEVFS_FS
-	driver.name            = "ircomm%d";
-#else
 	driver.name            = "ircomm";
-#endif
 	driver.major           = IRCOMM_TTY_MAJOR;
 	driver.minor_start     = IRCOMM_TTY_MINOR;
 	driver.num             = IRCOMM_TTY_PORTS;
@@ -251,7 +247,7 @@
 
 	tty = self->tty;
 
-	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+	if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 		/* this is a callout device */
 		/* just verify that normal device is not in use */
 		if (self->flags & ASYNC_NORMAL_ACTIVE)
@@ -306,7 +302,7 @@
 	add_wait_queue(&self->open_wait, &wait);
 	
 	IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
-	      __FILE__,__LINE__, tty->driver.name, self->open_count );
+	      __FILE__,__LINE__, tty->driver->name, self->open_count );
 
 	/* As far as I can see, we protect open_count - Jean II */
 	spin_lock_irqsave(&self->spinlock, flags);
@@ -356,7 +352,7 @@
 		}
 		
 		IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
-		      __FILE__,__LINE__, tty->driver.name, self->open_count );
+		      __FILE__,__LINE__, tty->driver->name, self->open_count );
 		
 		schedule();
 	}
@@ -373,7 +369,7 @@
 	self->blocked_open--;
 	
 	IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n",
-	      __FILE__,__LINE__, tty->driver.name, self->open_count);
+	      __FILE__,__LINE__, tty->driver->name, self->open_count);
 			 
 	if (!retval)
 		self->flags |= ASYNC_NORMAL_ACTIVE;
@@ -398,7 +394,7 @@
 	IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
 
 	MOD_INC_USE_COUNT;
-	line = minor(tty->device) - tty->driver.minor_start;
+	line = tty->index;
 	if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
 		MOD_DEC_USE_COUNT;
 		return -ENODEV;
@@ -451,7 +447,7 @@
 	self->tty = tty;
 	spin_unlock_irqrestore(&self->spinlock, flags);
 
-	IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver.name, 
+	IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name, 
 		   self->line, self->open_count);
 
 	/* Not really used by us, but lets do it anyway */
@@ -592,8 +588,8 @@
 
 	ircomm_tty_shutdown(self);
 
-	if (tty->driver.flush_buffer)
-		tty->driver.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 
diff -urN linux-2.5.68-bk4/net/netlink/af_netlink.c linux-2.5.68-bk5/net/netlink/af_netlink.c
--- linux-2.5.68-bk4/net/netlink/af_netlink.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk5/net/netlink/af_netlink.c	2003-04-24 04:34:52.000000000 -0700
@@ -1052,6 +1052,7 @@
 struct net_proto_family netlink_family_ops = {
 	.family = PF_NETLINK,
 	.create = netlink_create,
+	.owner	= THIS_MODULE,	/* for consistency 8) */
 };
 
 static int __init netlink_proto_init(void)
@@ -1066,6 +1067,11 @@
 #ifdef CONFIG_PROC_FS
 	create_proc_read_entry("net/netlink", 0, 0, netlink_read_proc, NULL);
 #endif
+	/* The netlink device handler may be needed early. */ 
+	rtnetlink_init();
+#ifdef CONFIG_NETLINK_DEV
+	init_netlink();
+#endif
 	return 0;
 }
 
@@ -1075,7 +1081,7 @@
        remove_proc_entry("net/netlink", NULL);
 }
 
-module_init(netlink_proto_init);
+subsys_initcall(netlink_proto_init);
 module_exit(netlink_proto_exit);
 
 MODULE_LICENSE("GPL");
diff -urN linux-2.5.68-bk4/net/socket.c linux-2.5.68-bk5/net/socket.c
--- linux-2.5.68-bk4/net/socket.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/net/socket.c	2003-04-24 04:34:52.000000000 -0700
@@ -69,8 +69,6 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/wanrouter.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
 #include <linux/if_bridge.h>
 #include <linux/init.h>
 #include <linux/poll.h>
@@ -143,6 +141,36 @@
 
 static struct net_proto_family *net_families[NPROTO];
 
+static __inline__ void net_family_bug(int family)
+{
+	printk(KERN_ERR "%d is not yet sock_registered!\n", family);
+	BUG();
+}
+
+int net_family_get(int family)
+{
+	struct net_proto_family *prot = net_families[family];
+	int rc = 1;
+
+	barrier();
+	if (likely(prot != NULL))
+		rc = try_module_get(prot->owner);
+	else
+		net_family_bug(family);
+	return rc;
+}
+
+void net_family_put(int family)
+{
+	struct net_proto_family *prot = net_families[family];
+
+	barrier();
+	if (likely(prot != NULL))
+		module_put(prot->owner);
+	else
+		net_family_bug(family);
+}
+
 #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
 static atomic_t net_family_lockct = ATOMIC_INIT(0);
 static spinlock_t net_family_lock = SPIN_LOCK_UNLOCKED;
@@ -511,7 +539,7 @@
 
 		sock->ops->release(sock);
 		sock->ops = NULL;
-		module_put(net_families[family]->owner);
+		net_family_put(family);
 	}
 
 	if (sock->fasync_list)
@@ -1064,7 +1092,7 @@
 	sock->type  = type;
 
 	i = -EBUSY;
-	if (!try_module_get(net_families[family]->owner))
+	if (!net_family_get(family))
 		goto out_release;
 
 	if ((i = net_families[family]->create(sock, protocol)) < 0) 
@@ -1953,17 +1981,6 @@
 	 *  do_initcalls is run.  
 	 */
 
-
-	/*
-	 * The netlink device handler may be needed early.
-	 */
-
-#ifdef CONFIG_NET
-	rtnetlink_init();
-#endif
-#ifdef CONFIG_NETLINK_DEV
-	init_netlink();
-#endif
 #ifdef CONFIG_NETFILTER
 	netfilter_init();
 #endif
diff -urN linux-2.5.68-bk4/sound/oss/cmpci.c linux-2.5.68-bk5/sound/oss/cmpci.c
--- linux-2.5.68-bk4/sound/oss/cmpci.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/cmpci.c	2003-04-24 04:34:52.000000000 -0700
@@ -938,7 +938,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (pstart = virt_to_page(db->rawbuf); pstart <= pend; pstart++)
-			mem_map_unreserve(pstart);
+			ClearPageReserved(pstart);
 		free_pages((unsigned long)db->rawbuf, db->buforder);
 	}
 	db->rawbuf = NULL;
@@ -987,7 +987,7 @@
 		/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (pstart = virt_to_page(db->rawbuf); pstart <= pend; pstart++)
-			mem_map_reserve(pstart);
+			SetPageReserved(pstart);
 	}
 	bytepersec = rate << sample_shift[fmt];
 	bufs = PAGE_SIZE << db->buforder;
diff -urN linux-2.5.68-bk4/sound/oss/cs4281/cs4281_wrapper-24.c linux-2.5.68-bk5/sound/oss/cs4281/cs4281_wrapper-24.c
--- linux-2.5.68-bk4/sound/oss/cs4281/cs4281_wrapper-24.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/cs4281/cs4281_wrapper-24.c	2003-04-24 04:34:52.000000000 -0700
@@ -28,8 +28,6 @@
 
 int cs4281_resume_null(struct pci_dev *pcidev) { return 0; }
 int cs4281_suspend_null(struct pci_dev *pcidev, u32 state) { return 0; }
-#define cs4x_mem_map_reserve(page) mem_map_reserve(page)
-#define cs4x_mem_map_unreserve(page) mem_map_unreserve(page)
 
 #define free_dmabuf(state, dmabuf) \
 	pci_free_consistent(state->pcidev, \
diff -urN linux-2.5.68-bk4/sound/oss/cs4281/cs4281m.c linux-2.5.68-bk5/sound/oss/cs4281/cs4281m.c
--- linux-2.5.68-bk4/sound/oss/cs4281/cs4281m.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/cs4281/cs4281m.c	2003-04-24 04:34:52.000000000 -0700
@@ -1705,7 +1705,7 @@
 		    virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) -
 				 1);
 		for (map = virt_to_page(db->rawbuf); map <= mapend; map++)
-			cs4x_mem_map_unreserve(map);
+			ClearPageReserved(map);
 		free_dmabuf(s, db);
 	}
 	if (s->tmpbuff && (db->type == CS_TYPE_ADC)) {
@@ -1714,7 +1714,7 @@
 		    virt_to_page(s->tmpbuff +
 				 (PAGE_SIZE << s->buforder_tmpbuff) - 1);
 		for (map = virt_to_page(s->tmpbuff); map <= mapend; map++)
-			cs4x_mem_map_unreserve(map);
+			ClearPageReserved(map);
 		free_dmabuf2(s, db);
 	}
 	s->tmpbuff = NULL;
@@ -1763,7 +1763,7 @@
 
 		// 2. mark each physical page in range as 'reserved'.
 		for (map = virt_to_page(db->rawbuf); map <= mapend; map++)
-			cs4x_mem_map_reserve(map);
+			SetPageReserved(map);
 	}
 	if (!s->tmpbuff && (db->type == CS_TYPE_ADC)) {
 		for (order = df; order >= DMABUF_MINORDER;
@@ -1786,7 +1786,7 @@
 
 		// 2. mark each physical page in range as 'reserved'.
 		for (map = virt_to_page(s->tmpbuff); map <= mapend; map++)
-			cs4x_mem_map_reserve(map);
+			SetPageReserved(map);
 	}
 	if (db->type == CS_TYPE_DAC) {
 		if (s->prop_dac.fmt & (AFMT_S16_LE | AFMT_U16_LE))
diff -urN linux-2.5.68-bk4/sound/oss/cs46xx.c linux-2.5.68-bk5/sound/oss/cs46xx.c
--- linux-2.5.68-bk4/sound/oss/cs46xx.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/cs46xx.c	2003-04-24 04:34:52.000000000 -0700
@@ -1196,7 +1196,7 @@
 
 	// 2. mark each physical page in range as 'reserved'.
 	for (map = virt_to_page(dmabuf->rawbuf); map <= mapend; map++)
-		cs4x_mem_map_reserve(map);
+		SetPageReserved(map);
 
 	CS_DBGOUT(CS_PARMS, 9, printk("cs46xx: alloc_dmabuf(): allocated %ld (order = %d) bytes at %p\n",
 	       PAGE_SIZE << order, order, rawbuf) );
@@ -1233,7 +1233,7 @@
 
 	// 2. mark each physical page in range as 'reserved'.
 	for (map = virt_to_page(dmabuf->tmpbuff); map <= mapend; map++)
-		cs4x_mem_map_reserve(map);
+		SetPageReserved(map);
 	return 0;
 }
 
@@ -1248,7 +1248,7 @@
 		mapend = virt_to_page(dmabuf->rawbuf + 
 				(PAGE_SIZE << dmabuf->buforder) - 1);
 		for (map = virt_to_page(dmabuf->rawbuf); map <= mapend; map++)
-			cs4x_mem_map_unreserve(map);
+			cs4x_ClearPageReserved(map);
 		free_dmabuf(state->card, dmabuf);
 	}
 
@@ -1257,7 +1257,7 @@
 		mapend = virt_to_page(dmabuf->tmpbuff +
 				(PAGE_SIZE << dmabuf->buforder_tmpbuff) - 1);
 		for (map = virt_to_page(dmabuf->tmpbuff); map <= mapend; map++)
-			cs4x_mem_map_unreserve(map);
+			cs4x_ClearPageReserved(map);
 		free_dmabuf2(state->card, dmabuf);
 	}
 
diff -urN linux-2.5.68-bk4/sound/oss/cs46xx_wrapper-24.h linux-2.5.68-bk5/sound/oss/cs46xx_wrapper-24.h
--- linux-2.5.68-bk4/sound/oss/cs46xx_wrapper-24.h	2003-04-19 19:50:06.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/cs46xx_wrapper-24.h	2003-04-24 04:34:52.000000000 -0700
@@ -31,9 +31,6 @@
 #define CS_OWNER owner:
 #define CS_THIS_MODULE THIS_MODULE,
 void cs46xx_null(struct pci_dev *pcidev) { return; }
-#define cs4x_mem_map_reserve(page) mem_map_reserve(page)
-#define cs4x_mem_map_unreserve(page) mem_map_unreserve(page)
-
 #define free_dmabuf(card, dmabuf) \
 	pci_free_consistent((card)->pci_dev, \
 			    PAGE_SIZE << (dmabuf)->buforder, \
diff -urN linux-2.5.68-bk4/sound/oss/dmabuf.c linux-2.5.68-bk5/sound/oss/dmabuf.c
--- linux-2.5.68-bk4/sound/oss/dmabuf.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/dmabuf.c	2003-04-24 04:34:52.000000000 -0700
@@ -116,7 +116,7 @@
 	dmap->raw_buf_phys = virt_to_bus(start_addr);
 
 	for (page = virt_to_page(start_addr); page <= virt_to_page(end_addr); page++)
-		mem_map_reserve(page);
+		SetPageReserved(page);
 	return 0;
 }
 
@@ -136,7 +136,7 @@
 	end_addr = start_addr + dmap->buffsize;
 
 	for (page = virt_to_page(start_addr); page <= virt_to_page(end_addr); page++)
-		mem_map_unreserve(page);
+		ClearPageReserved(page);
 
 	free_pages((unsigned long) dmap->raw_buf, sz);
 	dmap->raw_buf = NULL;
diff -urN linux-2.5.68-bk4/sound/oss/es1370.c linux-2.5.68-bk5/sound/oss/es1370.c
--- linux-2.5.68-bk4/sound/oss/es1370.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/es1370.c	2003-04-24 04:34:52.000000000 -0700
@@ -551,7 +551,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(s->dev, PAGE_SIZE << db->buforder, db->rawbuf, db->dmaaddr);
 	}
 	db->rawbuf = NULL;
@@ -577,7 +577,7 @@
 		/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_reserve(page);
+			SetPageReserved(page);
 	}
 	fmt &= ES1370_FMT_MASK;
 	bytepersec = rate << sample_shift[fmt];
diff -urN linux-2.5.68-bk4/sound/oss/es1371.c linux-2.5.68-bk5/sound/oss/es1371.c
--- linux-2.5.68-bk4/sound/oss/es1371.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/es1371.c	2003-04-24 04:34:52.000000000 -0700
@@ -887,7 +887,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(s->dev, PAGE_SIZE << db->buforder, db->rawbuf, db->dmaaddr);
 	}
 	db->rawbuf = NULL;
@@ -913,7 +913,7 @@
 		/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_reserve(page);
+			SetPageReserved(page);
 	}
 	fmt &= ES1371_FMT_MASK;
 	bytepersec = rate << sample_shift[fmt];
diff -urN linux-2.5.68-bk4/sound/oss/esssolo1.c linux-2.5.68-bk5/sound/oss/esssolo1.c
--- linux-2.5.68-bk4/sound/oss/esssolo1.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/esssolo1.c	2003-04-24 04:34:52.000000000 -0700
@@ -423,7 +423,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(s->dev, PAGE_SIZE << db->buforder, db->rawbuf, db->dmaaddr);
 	}
 	db->rawbuf = NULL;
@@ -449,7 +449,7 @@
 		/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_reserve(page);
+			SetPageReserved(page);
 	}
 	if (s->fmt & (AFMT_S16_LE | AFMT_U16_LE))
 		sample_shift++;
diff -urN linux-2.5.68-bk4/sound/oss/i810_audio.c linux-2.5.68-bk5/sound/oss/i810_audio.c
--- linux-2.5.68-bk4/sound/oss/i810_audio.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/i810_audio.c	2003-04-24 04:34:52.000000000 -0700
@@ -941,7 +941,7 @@
 	/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 	pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1);
 	for (page = virt_to_page(rawbuf); page <= pend; page++)
-		mem_map_reserve(page);
+		SetPageReserved(page);
 
 	return 0;
 }
@@ -956,7 +956,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(dmabuf->rawbuf + (PAGE_SIZE << dmabuf->buforder) - 1);
 		for (page = virt_to_page(dmabuf->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(state->card->pci_dev, PAGE_SIZE << dmabuf->buforder,
 				    dmabuf->rawbuf, dmabuf->dma_handle);
 	}
diff -urN linux-2.5.68-bk4/sound/oss/ite8172.c linux-2.5.68-bk5/sound/oss/ite8172.c
--- linux-2.5.68-bk4/sound/oss/ite8172.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/ite8172.c	2003-04-24 04:34:52.000000000 -0700
@@ -640,7 +640,7 @@
 	/* undo marking the pages as reserved */
 	pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 	for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-	    mem_map_unreserve(page);
+	    ClearPageReserved(page);
 	pci_free_consistent(s->dev, PAGE_SIZE << db->buforder,
 			    db->rawbuf, db->dmaaddr);
     }
@@ -670,7 +670,7 @@
 	   otherwise remap_page_range doesn't do what we want */
 	pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 	for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-	    mem_map_reserve(page);
+	    SetPageReserved(page);
     }
 
     db->count = 0;
diff -urN linux-2.5.68-bk4/sound/oss/maestro.c linux-2.5.68-bk5/sound/oss/maestro.c
--- linux-2.5.68-bk4/sound/oss/maestro.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/maestro.c	2003-04-24 04:34:52.000000000 -0700
@@ -2949,7 +2949,7 @@
 	/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 	pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1);
 	for (page = virt_to_page(rawbuf); page <= pend; page++)
-		mem_map_reserve(page);
+		SetPageReserved(page);
 
 	return 0;
 } 
@@ -2967,7 +2967,7 @@
 
 	pend = virt_to_page(s->card->dmapages + (PAGE_SIZE << s->card->dmaorder) - 1);
 	for (page = virt_to_page(s->card->dmapages); page <= pend; page++)
-		mem_map_unreserve(page);
+		ClearPageReserved(page);
 
 	free_pages((unsigned long)s->card->dmapages,s->card->dmaorder);
 	s->card->dmapages = NULL;
diff -urN linux-2.5.68-bk4/sound/oss/maestro3.c linux-2.5.68-bk5/sound/oss/maestro3.c
--- linux-2.5.68-bk4/sound/oss/maestro3.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/maestro3.c	2003-04-24 04:34:52.000000000 -0700
@@ -1939,7 +1939,7 @@
 
         pend = virt_to_page(db->rawbuf + (PAGE_SIZE << order) - 1);
         for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-            mem_map_reserve(page);
+            SetPageReserved(page);
     }
 
 
@@ -1970,7 +1970,7 @@
         struct page *page, *pend;
         pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
         for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-            mem_map_unreserve(page);
+            ClearPageReserved(page);
     }
 
 
diff -urN linux-2.5.68-bk4/sound/oss/sonicvibes.c linux-2.5.68-bk5/sound/oss/sonicvibes.c
--- linux-2.5.68-bk4/sound/oss/sonicvibes.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/sonicvibes.c	2003-04-24 04:34:52.000000000 -0700
@@ -709,7 +709,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(s->dev, PAGE_SIZE << db->buforder, db->rawbuf, db->dmaaddr);
 	}
 	db->rawbuf = NULL;
@@ -760,7 +760,7 @@
 		/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 		pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
 		for (page = virt_to_page(db->rawbuf); page <= pend; page++)
-			mem_map_reserve(page);
+			SetPageReserved(page);
 	}
 	bytepersec = rate << sample_shift[fmt];
 	bufs = PAGE_SIZE << db->buforder;
diff -urN linux-2.5.68-bk4/sound/oss/sscape.c linux-2.5.68-bk5/sound/oss/sscape.c
--- linux-2.5.68-bk4/sound/oss/sscape.c	2003-04-19 19:50:06.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/sscape.c	2003-04-24 04:34:52.000000000 -0700
@@ -839,7 +839,7 @@
 	devc->raw_buf_phys = virt_to_bus(start_addr);
 
 	for (page = virt_to_page(start_addr); page <= virt_to_page(end_addr); page++)
-		mem_map_reserve(page);
+		SetPageReserved(page);
 	return 1;
 }
 
@@ -855,7 +855,7 @@
 	end_addr = start_addr + devc->buffsize;
 
 	for (page = virt_to_page(start_addr); page <= virt_to_page(end_addr); page++)
-		mem_map_unreserve(page);
+		ClearPageReserved(page);
 
 	free_pages((unsigned long) devc->raw_buf, sz);
 	devc->raw_buf = NULL;
diff -urN linux-2.5.68-bk4/sound/oss/trident.c linux-2.5.68-bk5/sound/oss/trident.c
--- linux-2.5.68-bk4/sound/oss/trident.c	2003-04-24 04:34:48.000000000 -0700
+++ linux-2.5.68-bk5/sound/oss/trident.c	2003-04-24 04:34:52.000000000 -0700
@@ -1222,7 +1222,7 @@
 	/* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */
 	pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1);
 	for (page = virt_to_page(rawbuf); page <= pend; page++)
-		mem_map_reserve(page);
+		SetPageReserved(page);
 
 	return 0;
 }
@@ -1253,7 +1253,7 @@
 		/* undo marking the pages as reserved */
 		pend = virt_to_page(dmabuf->rawbuf + (PAGE_SIZE << dmabuf->buforder) - 1);
 		for (page = virt_to_page(dmabuf->rawbuf); page <= pend; page++)
-			mem_map_unreserve(page);
+			ClearPageReserved(page);
 		pci_free_consistent(pci_dev, PAGE_SIZE << dmabuf->buforder,
 				    dmabuf->rawbuf, dmabuf->dma_handle);
 		dmabuf->rawbuf = NULL;
