diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt
--- a/Documentation/crypto/api-intro.txt	Fri Jan 10 12:12:38 2003
+++ b/Documentation/crypto/api-intro.txt	Fri Jan 10 12:12:38 2003
@@ -186,6 +186,7 @@
   Kazunori Miyazawa / USAGI (HMAC)
   Matthew Skala (Twofish)
   Dag Arne Osvik (Serpent)
+  Brian Gladman (AES)
   
 DES algorithm contributors:
   Raimar Falke
@@ -202,6 +203,12 @@
 
 SHA256 algorithm contributors:
   Andrew McDonald
+
+AES algorithm contributors:
+  Alexander Kjeldaas
+  Herbert Valerio Riedel
+  Kyle McMartin
+  Adam J. Richter
 
 Please send any credits updates or corrections to:
 James Morris <jmorris@intercode.com.au>
diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
--- a/Documentation/filesystems/proc.txt	Fri Jan 10 12:12:38 2003
+++ b/Documentation/filesystems/proc.txt	Fri Jan 10 12:12:38 2003
@@ -1462,10 +1462,14 @@
 error_burst and error_cost
 --------------------------
 
-These parameters  are used to limit the warning messages written to the kernel
-log from  the  routing  code.  The  higher the error_cost factor is, the fewer
-messages will  be written. Error_burst controls when messages will be dropped.
-The default settings limit warning messages to one every five seconds.
+These  parameters  are used to limit how many ICMP destination unreachable to 
+send  from  the  host  in question. ICMP destination unreachable messages are 
+sent  when  we can not reach the next hop, while trying to transmit a packet. 
+It  will also print some error messages to kernel logs if someone is ignoring 
+our   ICMP  redirects.  The  higher  the  error_cost  factor  is,  the  fewer 
+destination  unreachable  and error messages will be let through. Error_burst 
+controls  when  destination  unreachable  messages and error messages will be
+dropped. The default settings limit warning messages to five every second.
 
 flush
 -----
diff -Nru a/Documentation/networking/NAPI_HOWTO.txt b/Documentation/networking/NAPI_HOWTO.txt
--- a/Documentation/networking/NAPI_HOWTO.txt	Fri Jan 10 12:12:38 2003
+++ b/Documentation/networking/NAPI_HOWTO.txt	Fri Jan 10 12:12:38 2003
@@ -721,6 +721,23 @@
 
 
 
+
+APPENDIX 3: Scheduling issues.
+==============================
+As seen NAPI moves processing to softirq level. Linux uses the ksoftirqd as the 
+general solution to schedule softirq's to run before next interrupt and by putting 
+them under scheduler control. Also this prevents consecutive softirq's from 
+monopolize the CPU. This also have the effect that the priority of ksoftirq needs 
+to be considered when running very CPU-intensive applications and networking to
+get the proper balance of softirq/user balance. Increasing ksoftirq priority to 0 
+(eventually more) is reported cure problems with low network performance at high 
+CPU load.
+
+Most used processes in a GIGE router:
+USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
+root         3  0.2  0.0     0     0  ?  RWN Aug 15 602:00 (ksoftirqd_CPU0)
+root       232  0.0  7.9 41400 40884  ?  S   Aug 15  74:12 gated 
+
 --------------------------------------------------------------------
 
 relevant sites:
diff -Nru a/Documentation/serial/driver b/Documentation/serial/driver
--- a/Documentation/serial/driver	Fri Jan 10 12:12:38 2003
+++ b/Documentation/serial/driver	Fri Jan 10 12:12:38 2003
@@ -176,11 +176,11 @@
 	Locking: port_sem taken.
 	Interrupts: caller dependent.
 
-  change_speed(port,cflag,iflag,quot)
+  set_termios(port,termios,oldtermios)
 	Change the port parameters, including word length, parity, stop
 	bits.  Update read_status_mask and ignore_status_mask to indicate
 	the types of events we are interested in receiving.  Relevant
-	cflag bits are:
+	termios->c_cflag bits are:
 		CSIZE	- word size
 		CSTOPB	- 2 stop bits
 		PARENB	- parity enable
@@ -191,7 +191,7 @@
 		CRTSCTS	- if set, enable CTS status change reporting
 		CLOCAL	- if not set, enable modem status change
 			  reporting.
-	Relevant iflag bits are:
+	Relevant termios->c_iflag bits are:
 		INPCK	- enable frame and parity error events to be
 			  passed to the TTY layer.
 		BRKINT
@@ -278,6 +278,35 @@
 	Locking: none.
 	Interrupts: caller dependent.
 
+Other functions
+---------------
+
+uart_update_timeout(port,cflag,quot)
+	Update the FIFO drain timeout, port->timeout, according to the
+	number of bits, parity, stop bits and quotient.
+
+	Locking: caller is expected to take port->lock
+	Interrupts: n/a
+
+uart_get_baud_rate(port,termios)
+	Return the numeric baud rate for the specified termios, taking
+	account of the special 38400 baud "kludge".  The B0 baud rate
+	is mapped to 9600 baud.
+
+	Locking: caller dependent.
+	Interrupts: n/a
+
+uart_get_divisor(port,termios,oldtermios)
+	Return the divsor (baud_base / baud) for the selected baud rate
+	specified by termios.  If the baud rate is out of range, try
+	the original baud rate specified by oldtermios (if non-NULL).
+	If that fails, try 9600 baud.
+
+	If 38400 baud and custom divisor is selected, return the
+	custom divisor instead.
+
+	Locking: caller dependent.
+	Interrupts: n/a
 
 Other notes
 -----------
@@ -292,10 +321,3 @@
 		struct uart_port	port;
 		int			my_stuff;
 	};
-
-Todo
-----
-
-Please see the BUGS file in CVS at
-
-	http://cvs.arm.linux.org.uk/cgi/viewcvs.cgi/serial/BUGS
diff -Nru a/Documentation/usb/scanner-hp-sane.txt b/Documentation/usb/scanner-hp-sane.txt
--- a/Documentation/usb/scanner-hp-sane.txt	Fri Jan 10 12:12:38 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,81 +0,0 @@
-Copyright (C) 1999, 2000 David E. Nelson
-
-April 26, 2000
-
-CHANGES
-
-- Amended for Linux-2.3.99-pre6-3
-- Updated for multiple scanner support
-
-INTRODUCTION
-
-This document will hopefully provide enough info on how to get SANE
-working with a Hewlett Packard USB capable scanner using the USB
-interface.  The majority of HP Scanners support the Scanner Control
-Language (SCL) which is both published by HP and supported by SANE.
-The only HP Scanners that I'm aware of that do not support SCL are the
-4200C ,3300C, and the PhotoSmart S20.  All other HP scanners with USB
-interfaces should work (4100C, 5200C, 6200C, and 6300C) as do models
-that are derived from the models above. ie the 6350C which is a 6300C
-with a transparency adaptor included with the scanner at time of
-purchase.  Of course as HP releases new scanners this information may
-change.
-
-
-REQUIREMENTS
-
-In order to get this running you'll need USB support in your kernel in
-addition to USB Scanner support.  Please refer to scanner.txt for
-issues pertaining to Linux USB and USB Scanner support.
-
-An installed version of SANE which is available from
-http://www.mostang.com/sane/.  Testing has been performed using
-version SANE-1.0.1.  For instructions on building and installing SANE,
-refer to the various README files within the SANE distribution.
-
-The latest SANE HP backend is available from http://www.kirchgessner.net.
-At the time of this writing, version 0.83 was available.
-
-
-OK, I'VE INSTALLED SANE. SO WHAT DO I DO NOW?
-
-NOTE: $INSTALL_DIR is the location where SANE is installed.  It may be
-/usr/local, /usr, /opt or somewhere else.  If you don't know, ask your
-system administrator.
-
-1) Make sure that you have the libsane-hp.* libraries under the
-$INSTALL_DIR/lib/sane/ directory.  If you don't, then the HP backend
-was either not compiled or installed properly.
-
-2) Under the directory $INSTALL_DIR/etc/sane.d/ edit the following
-files: dll.conf, hp.conf.
-
-  dll.conf:  Make sure that the 'hp' entry is present and uncommented.
-
-  hp.conf: This should contain two lines:
-
-    /dev/usbscanner
-    option connect-device
-
-NOTE: If you are using multiple scanners, make sure to have the correct
-device, ie /dev/usbscanner0.  See scanner.txt for more info.
-
-3) You should now be able to use SANE (xscanimage or scanimage).
-
-Don't forget to read any relevant man pages regarding the usage of
-SANE.  If you have other entries uncommented in 'dll.conf', you may
-have to specify the device to (x)scanimage.  Again, `man` is your
-friend.  The xscanimage (1) man page has info on how to get 'The Gimp'
-to work with xscanimage.  Note that Gimp support must be compiled into
-SANE for it to work.  If you are dealing with a RedHat system, this
-means that you'll also need to install the gimp-devel rpm package
-prior to compiling SANE.
-
-NOTE: The issues regarding core dumping by (x)scanimage have (or seem
-to be thus far) been resolved with version 0.2+ of the USB scanner
-driver which should be available in linux-2.3.23.  If you notice
-otherwise, please contact me.
-
-David /\/elson
-dnelson@jump.net
-http://www.jump.net/~dnelson
diff -Nru a/Documentation/usb/scanner.txt b/Documentation/usb/scanner.txt
--- a/Documentation/usb/scanner.txt	Fri Jan 10 12:12:38 2003
+++ b/Documentation/usb/scanner.txt	Fri Jan 10 12:12:38 2003
@@ -1,154 +1,114 @@
 Copyright (C) 1999, 2000 David E. Nelson <dnelson@jump.net>
+Updated 2003 by Henning Meier-Geinitz <henning@meier-geinitz.de>
 
-April 26, 2000
-
-CHANGES
-
-- Amended for linux-2.4.12
-- Updated devfs support
-- Amended for linux-2.3.99-pre6-3
-- Appended hp_scan.c to end of this README
-- Removed most references to HP
-- Updated uhci/ohci host controller info
-- Updated support for multiple scanner support
-- Updated supported scanners list
-- Updated usbdevfs info
-- Spellcheck
 
 OVERVIEW
 
-This README addresses issues regarding how to configure the kernel
-to access a USB scanner.  Although the driver was originally conceived
-for USB HP scanners, it's general enough so that it can be used with
-other scanners.  Also, one can now pass the USB Vendor and Product
-ID's using module parameters for unknown scanners.  Refer to the
-document scanner-hp-sane.txt for guidance on how to configure SANE to
-use a USB HP Scanner.
+This README addresses issues regarding how to configure the kernel to access a
+USB scanner.  Although the driver was originally conceived for USB HP
+scanners, it's general enough so that it can be used with most other USB
+scanners.  Also, one can pass the USB Vendor and Product IDs using module
+parameters for unknown scanners.
+
+There are two drivers for SCSI-over-USB scanners: 
+* The "hpusbscsi" module for Hewlett-Packard 53xx series, Hewlett-Packard 7400,
+  Minolta Scan Dual II, Minolta Elite II
+* The "microtek" module for the Microtek Scanmaker X6
+
+In addition to the kernel driver, user-space tools like SANE are necessary to
+actually use the scanner.  SANE ("Scanner Access Now Easy") provides drivers
+for a variety of USB scanners.  See the appropriate SANE man page for details,
+e.g. man sane-usb and man sane-hp (for HP scanners).
+
+NOTE: Just because a product is detected by this driver does not mean that
+applications exist that support the product.  It's in the hopes that this will
+allow developers a means to produce applications that will support the listed
+USB products.
 
 
 ADDITIONAL INFORMATION
 
-http://www.linux-usb.org/
+http://www.linux-usb.org/           (General information, mailing lists, links)
+http://www.mostang.com/sane/        (SANE user-space tools)
+http://www.meier-geinitz.de/kernel/ (USB scanner driver information and patches)
 
 
 REQUIREMENTS
 
-A host with a USB port.  Ideally, either a UHCI (Intel) or OHCI
-(Compaq and others) hardware port should work.  At the time of this
-writing, there are two UHCI drivers and one OHCI.
-
-A Linux kernel with USB support enabled or a backported version to
-linux-2.2.x.  See http://www.linux-usb.org for more information on
-accomplishing this.
-
-'lspci' which is only needed to determine the type of USB hardware
-available/installed in your machine.
-
-CONFIGURATION
-
-Using `lspci -v`, determine the type of USB hardware available/installed.
+A host with a USB port.  Ideally, either a UHCI (Intel), OHCI (Compaq and
+others) or EHCI hardware should work.  
 
-  If you see something like:
+Using "make menuconfig" or your preferred method for configuring the kernel,
+select "Support for USB", "OHCI HCD/UHCI HCD/EHCI HCD" depending on your
+hardware, "USB Scanner support", and "USB device filesystem".  Compile and
+install the modules (you may need to execute "depmod -a" to update the module
+dependencies).  If any of the USB sections were compiled into the kernel, a
+reboot is necessary.  NOTE: Updating the boot disk with "lilo" may also be
+required.  Testing was performed only as modules, YMMV.
+
+Up to 16 scanners can be connected/used simultaneously.  If devfs support is
+enabled, see next section.  Otherwise, the device files must be created
+manually if they don't exist yet, either by MAKEDEV or mknod.
+
+MAKEDEV method:
+  cd /dev
+  MAKEDEV usb
+  Check that the device files "/dev/usb/scanner0" - "/dev/usb/scanner15" have
+  been created.
+
+mknod method:
+  mknod /dev/usb/scanner0 c 180 48
+  mknod /dev/usb/scanner1 c 180 49
+                  . 
+                  .
+  mknod /dev/usb/scanner15 c 180 63
 
-    USB Controller: ......
-    Flags: .....
-    I/O ports at ....
-
-  Then you have a UHCI based controller.
-
-  If you see something like:
-
-     USB Controller: .....
-     Flags: ....
-     Memory at .....
-
-  Then you have a OHCI based controller.
-
-Using `make menuconfig` or your preferred method for configuring the
-kernel, select 'Support for USB', 'OHCI/UHCI' depending on your
-hardware (determined from the steps above), 'USB Scanner support', and
-'Preliminary USB device filesystem'.  Compile and install the modules
-(you may need to execute `depmod -a` to update the module
-dependencies). If any of the USB sections were compiled into the
-kernel, a reboot is necessary. NOTE: Updating the boot disk with
-'lilo' may also be required. Testing was performed only as modules,
-YMMV.
-
-Beginning with version 0.4 of the driver, up to 16 scanners can be
-connected/used simultaneously.  For devfs support, see next section.
-If you intend to use more than one scanner at a time w/o devfs support:
-
-   Add a device for the USB scanner:
-	`mknod /dev/usbscanner0 c 180 48`
-	`mknod /dev/usbscanner1 c 180 49`
-                      . 
-                      .
-	`mknod /dev/usbscanner15 c 180 63`
-
-
-If you foresee using only one scanner it is best to:
-	`mknod /dev/usbscanner0 c 180 48`
-	`ln -s /dev/usbscanner0 /dev/usbscanner`
-
-
-Set appropriate permissions for /dev/usbscanner[0-15] (don't forget
+Set appropriate permissions for /dev/usb/scanner[0-15] (don't forget
 about group and world permissions).  Both read and write permissions
-are required for proper operation. For example:
-	`chmod 666 /dev/usbscanner0`
+are required for proper operation.  For example:
+  chmod 666 /dev/usb/scanner0
 
 Load the appropriate modules (if compiled as modules):
 
-  OHCI:
-    modprobe usb-ohci
-    modprobe scanner
-
-  UHCI:
-    modprobe usb-uhci
-    modprobe scanner
+  modprobe ohci-hcd (or uhci-hcd, ehci-hcd)
+  modprobe scanner
+
 
 DEVFS
 
 The later versions of the Linux kernel (2.4.8'ish) included a dynamic
-device filesystem call 'devfs'.  With devfs, there is no need to
+device filesystem call "devfs".  With devfs, there is no need to
 create the device files as explained above; instead, they are
 dynamically created for you.  For USB Scanner, the device is created
 in /dev/usb/scannerX where X can range from 0 to 15 depending on the
 number of scanners connected to the system.
 
-To see if you have devfs, issue the command `cat /proc/filesytems`.
-If devfs is listed you should be ready to go.  You sould also have a
-process running called 'devfsd'.  In order to make sure, issue the
-command `ps aux | grep '[d]evfsd'`.
-
-If you would like to maintain /dev/usbscanner0 in order to maintain
-compatibility with applications, then add the following to
-/etc/devfsd.conf:
-
-REGISTER ^usb/scanner0$ CFUNCTION GLOBAL symlink usb/scanner0 usbscanner0
-UNREGISTER ^usb/scanner0$ CFUNCTION GLOBAL unlink usbscanner0
+To see if you have devfs, issue the command "cat /proc/filesytems".
+If devfs is listed you should be ready to go.  You should also have a
+process running called "devfsd".  In order to make sure, issue the
+command "ps aux | grep '[d]evfsd'".
 
-Then reset the scanner (reseat the USB connector or power cycle). This
-will create the necessary symlinks in /dev to /dev/usb.
 
 CONCLUSION
 
-That's it.  SANE should now be able to access the device.  
+That's it.  SANE should now be able to access the device.  To make sure the
+device was detected, use "cat /proc/bus/usb/devices".  Your scanner should be
+listed and the line starting with "I:" should look similar to this example:
+
+  I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbscanner
+
+The important part is "Driver=usbscanner".  If it reads "Driver=(none)", the
+USB scanner driver didn't recognize the scanner.  Have a look at the MODULE
+PARAMETERS section for what to do in this case.
+
+For more details on the format of "/proc/bus/usb/devices" see
+Documentation/usb/proc_usb_info.txt.
 
-There is a small test program (hp_scan.c -- appended below) that can
-be used to test the scanner device if it's an HP scanner that supports
-SCL (Scanner Control Language).  Known HP scanner that support SCL are
-the 4100, 5200, 6200, the 6300 -- note that the 4200 is *not*
-supported since it does not understand SCL; it's also strongly
-suspected that the 3300 and the PhotoSmart S20 are not SCL compliant.
-Hp_scan.c's purpose is to test the driver without having to
-retrieve/configure SANE.  Hp_scan.c will scan the entire bed and put
-the output into a file called 'out.dat' in the current directory.  The
-data in the file is raw data so it's not very useful for imaging.
 
 MESSAGES
 
 usb_control/bulk_msg: timeout -- On occasions this message will appear
-in '/var/adm/messages', on the console, or both depending on how
+in "/var/adm/messages", on the console, or both depending on how
 your system is configured.  This is a side effect that scanners are
 sometimes very slow at warming up and/or initializing.  In most cases,
 however, only several of these messages should appear and is generally
@@ -165,122 +125,91 @@
 
 probe_scanner: Endpoint determination failed -- This means that the
 driver is unable to detect a supported configuration for means to
-communicate with the scanner.  See also 'probe_scanner: Undetected
-endpoint'.
+communicate with the scanner.  See also "probe_scanner: Undetected
+endpoint".
 
 funky result -- Most of the time the data flow between the computer
 and the scanner goes smoothly.  However, due to whatever reason,
 whether it be solar flares or stray neutrons, sometimes the
 communications don't work as expected.  The driver tries to handle
 most types of errors but not all.  When this message is seen,
-something weird happened.  Please contact the maintaner listed at the
-top of this file.
-
-SUPPORTED SCANNERS
-
-NOTE: Just because a product is listed here does not mean that
-applications exist that support the product.  It's in the hopes that
-this will allow developers a means to produce applications that will
-support the listed USB products.
-
-At the time of this writing, the following scanners were supported by
-scanner.c:
-
- Acer
-	 Prisa Acerscan 620U & 640U (!)
-	 Prisa AcerScan 620U (!)
- Agfa
-	 SnapScan 1212U
-	 Another SnapScan 1212U (?)
-	 SnapScan Touch
- Colorado -- See Primax/Colorado below
- Epson -- See Seiko/Epson below
- Genius
-         ColorPage-Vivid Pro
- Hewlett Packard
-	 3300C
-	 4100C
-	 4200C
-	 PhotoSmart S20
-	 5200C
-	 6200C
-	 6300C
- Microtek
-	 ScanMaker X6 - X6U
-	 Phantom 336CX - C3
-	 Phantom 336CX - C3 #2
-	 Phantom C6
-	 ScanMaker V6USL
-	 ScanMaker V6USL #2
-	 ScanMaker V6UL - SpicyU
- Mustek
-	 1200 CU
- Primax/Colorado
-	 G2-300 #1
-	 G2-600 #1
-	 G2E-300 #1
-	 ReadyScan 636i
-	 G2-300 #2
-	 G2-600 #2
-	 G2E-300 #2
-	 G2E-600
-	 Colorado USB 9600
-	 Colorado USB 19200
-	 Colorado 600u
-	 Colorado 1200u
- Seiko/Epson Corp.
-	 Perfection 636U and 636Photo
-	 Perfection 610
-	 Perfection 1200U and 1200Photo
- Umax
-	 Astra 1220U
-	 Astra 1236U
-	 Astra 2000U
-	 Astra 2200U
- Visioneer
-	 OneTouch 5300
-	 OneTouch 7600 duplicate ID (!)
-	 6100
+something weird happened.  Please contact the mailing list (see
+CONTACT section for details).
 
 
 MODULE PARAMETERS
 
 If you have a device that you wish to experiment with or try using
-this driver with, but the Vendor and Product ID's are not coded in,
+this driver with, but the Vendor and Product IDs are not coded in,
 don't despair.  If the driver was compiled as a module, you can pass
 options to the driver.  Simply add 
 
   options scanner vendor=0x#### product=0x****
 
 to the /etc/modules.conf file replacing the #'s and the *'s with the
-correct ID's.  The ID's can be retrieved from the messages file or
-using `cat /proc/bus/usb/devices`. Note that USB /proc support must be
-enabled during kernel configuration.  If the 'scanner' module is
-already loaded into memory, it must be reloaded for the module
-parameters to take effect.  In essence, `rmmod scanner; modprobe
-scanner` must be performed.
+correct IDs.  The IDs can be retrieved from the messages file or
+using "cat /proc/bus/usb/devices".
 
-**NOTE**: In later kernels (2.3.38+), a new filesystem was introduced,
-usbdevfs.  To mount the filesystem, issue the command (as root):
+If the default timeout is too low, i.e. there are frequent "timeout" messages,
+you may want to increase the timeout manually by using the parameter
+"read_timeout".  The time is given in seconds.  This is an example for
+modules.conf with a timeout of 60 seconds:
+
+  options scanner read_timeout=60
+ 
+If the "scanner" module is already loaded into memory, it must be reloaded for
+the module parameters to take effect.  In essence, "rmmod scanner; modprobe
+scanner" must be performed.
 
-  mount -t usbdevfs /proc/bus/usb /proc/bus/usb
 
-An alternative and more permanent method would be to add
+BUGS
 
-  none  /proc/bus/usb  usbdevfs  defaults  0  0
+Just look at the list of fixes in the source files. 
 
-to /etc/fstab.  This will mount usbdevfs at each reboot.  You can then
-issue `cat /proc/bus/usb/devices` to extract USB device information.
 
+CONTACT
 
-BUGS
+For asking about problems and fixes, use the linux-usb-users mailing list. For
+patches, linux-usb-devel should be used. Information on both lists can be
+found on http://www.linux-usb.org/.
+
+
+CHANGES
+
+- Amended for linux-2.5.54
+- Added information about read_timeout
+- Added more details about /proc/bus/usb/devices
+- Added/updated links
+- Added pointers two "special" scanner drivers
+- Reordering, spell-checking, formatting
+- Used /dev/usb/scanner[0-15] instead of /dev/usbscanner[0-15]
+- Removed some basic USB configuration stuff
+- Added EHCI
+- Removed some more references to HP
+- Amended for linux-2.4.12
+- Updated devfs support
+- Amended for linux-2.3.99-pre6-3
+- Appended hp_scan.c to end of this README
+- Removed most references to HP
+- Updated uhci/ohci host controller info
+- Updated support for multiple scanner support
+- Updated supported scanners list
+- Updated usbdevfs info
+- Spellcheck
 
-Just look at the list of fixes in the source files.  So, if you
-encounter any problems feel free to drop me an email.
 
-David /\/elson
-dnelson@jump.net
-http://www.jump.net/~dnelson
+HP TEST PROGRAM
+
+There is a small test program (hp_scan.c -- appended below) that can
+be used to test the scanner device if it's an HP scanner that supports
+SCL (Scanner Control Language).  Known HP scanner that support SCL are
+the 4100, 5200, 6200, the 6300 -- note that the 4200 is *not*
+supported since it does not understand SCL; it's also strongly
+suspected that the 3300 and the PhotoSmart S20 are not SCL compliant.
+Hp_scan.c's purpose is to test the driver without having to
+retrieve/configure SANE.  Hp_scan.c will scan the entire bed and put
+the output into a file called "out.dat" in the current directory.  The
+data in the file is raw data so it's not very useful for imaging.
 
 --------------- snip -- hp_scan.c -- snip ---------------
 /*
@@ -347,7 +276,7 @@
 		exit (1);
 	}
 	
-	if((fp=open("/dev/usbscanner", O_RDWR)) < 0) {
+	if((fp=open("/dev/usb/scanner0", O_RDWR)) < 0) {
 		perror("Unable to open scanner device");
 		exit (1);
 	}
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Fri Jan 10 12:12:37 2003
+++ b/Makefile	Fri Jan 10 12:12:37 2003
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 5
-SUBLEVEL = 55
+SUBLEVEL = 56
 EXTRAVERSION =
 
 # *DOCUMENTATION*
diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	Fri Jan 10 12:12:38 2003
+++ b/arch/i386/kernel/entry.S	Fri Jan 10 12:12:38 2003
@@ -126,10 +126,9 @@
 	addl $4, %esp;	\
 1:	iret;		\
 .section .fixup,"ax";   \
-2:	pushl %ss;	\
-	popl %ds;	\
-	pushl %ss;	\
-	popl %es;	\
+2:	movl $(__USER_DS), %edx; \
+	movl %edx, %ds; \
+	movl %edx, %es; \
 	pushl $11;	\
 	call do_exit;	\
 .previous;		\
@@ -145,16 +144,16 @@
 				# gates, which has to be cleaned up later..
 	pushl %eax
 	SAVE_ALL
-	movl %esp, %ebx
-	pushl %ebx
+	movl %esp, %ebp
+	pushl %ebp
 	pushl $0x7
 do_lcall:
-	movl EIP(%ebx), %eax	# due to call gates, this is eflags, not eip..
-	movl CS(%ebx), %edx	# this is eip..
-	movl EFLAGS(%ebx), %ecx	# and this is cs..
-	movl %eax,EFLAGS(%ebx)	#
-	movl %edx,EIP(%ebx)	# Now we move them to their "normal" places
-	movl %ecx,CS(%ebx)	#
+	movl EIP(%ebp), %eax	# due to call gates, this is eflags, not eip..
+	movl CS(%ebp), %edx	# this is eip..
+	movl EFLAGS(%ebp), %ecx	# and this is cs..
+	movl %eax,EFLAGS(%ebp)	#
+	movl %edx,EIP(%ebp)	# Now we move them to their "normal" places
+	movl %ecx,CS(%ebp)	#
 
 	#
 	# Call gates don't clear TF and NT in eflags like
@@ -166,8 +165,8 @@
 	pushl %eax
 	popfl
 
-	andl $-8192, %ebx	# GET_THREAD_INFO
-	movl TI_EXEC_DOMAIN(%ebx), %edx	# Get the execution domain
+	andl $-8192, %ebp	# GET_THREAD_INFO
+	movl TI_EXEC_DOMAIN(%ebp), %edx	# Get the execution domain
 	call *4(%edx)		# Call the lcall7 handler for the domain
 	addl $4, %esp
 	popl %eax
@@ -178,8 +177,8 @@
 				# gates, which has to be cleaned up later..
 	pushl %eax
 	SAVE_ALL
-	movl %esp, %ebx
-	pushl %ebx
+	movl %esp, %ebp
+	pushl %ebp
 	pushl $0x27
 	jmp do_lcall
 
@@ -187,7 +186,7 @@
 ENTRY(ret_from_fork)
 	# NOTE: this function takes a parameter but it's unused on x86.
 	call schedule_tail
-	GET_THREAD_INFO(%ebx)
+	GET_THREAD_INFO(%ebp)
 	jmp syscall_exit
 
 /*
@@ -202,7 +201,7 @@
 ret_from_exception:
 	preempt_stop
 ret_from_intr:
-	GET_THREAD_INFO(%ebx)
+	GET_THREAD_INFO(%ebp)
 	movl EFLAGS(%esp), %eax		# mix EFLAGS and CS
 	movb CS(%esp), %al
 	testl $(VM_MASK | 3), %eax
@@ -211,7 +210,7 @@
  	cli				# make sure we don't miss an interrupt
 					# setting need_resched or sigpending
 					# between sampling and the iret
-	movl TI_FLAGS(%ebx), %ecx
+	movl TI_FLAGS(%ebp), %ecx
 	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done on
 					# int/exception return?
 	jne work_pending
@@ -219,18 +218,18 @@
 
 #ifdef CONFIG_PREEMPT
 ENTRY(resume_kernel)
-	cmpl $0,TI_PRE_COUNT(%ebx)	# non-zero preempt_count ?
+	cmpl $0,TI_PRE_COUNT(%ebp)	# non-zero preempt_count ?
 	jnz restore_all
 need_resched:
-	movl TI_FLAGS(%ebx), %ecx	# need_resched set ?
+	movl TI_FLAGS(%ebp), %ecx	# need_resched set ?
 	testb $_TIF_NEED_RESCHED, %cl
 	jz restore_all
-	testl $IF_MASK,EFLAGS(%esp)     # interrupts off (execption path) ?
+	testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
 	jz restore_all
-	movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebx)
+	movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebp)
 	sti
 	call schedule
-	movl $0,TI_PRE_COUNT(%ebx) 
+	movl $0,TI_PRE_COUNT(%ebp)
 	cli
 	jmp need_resched
 #endif
@@ -262,21 +261,21 @@
 
 	pushl %eax
 	SAVE_ALL
-	GET_THREAD_INFO(%ebx)
+	GET_THREAD_INFO(%ebp)
 	cmpl $(NR_syscalls), %eax
 	jae syscall_badsys
 
-	testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebx)
+	testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
 	jnz syscall_trace_entry
 	call *sys_call_table(,%eax,4)
 	movl %eax,EAX(%esp)
 	cli
-	movl TI_FLAGS(%ebx), %ecx
+	movl TI_FLAGS(%ebp), %ecx
 	testw $_TIF_ALLWORK_MASK, %cx
 	jne syscall_exit_work
-	RESTORE_INT_REGS
-	movl 12(%esp),%edx
-	movl 24(%esp),%ecx
+/* if something modifies registers it must also disable sysexit */
+	movl EIP(%esp), %edx
+	movl OLDESP(%esp), %ecx
 	sti
 	sysexit
 
@@ -286,11 +285,11 @@
 ENTRY(system_call)
 	pushl %eax			# save orig_eax
 	SAVE_ALL
-	GET_THREAD_INFO(%ebx)
+	GET_THREAD_INFO(%ebp)
 	cmpl $(NR_syscalls), %eax
 	jae syscall_badsys
 					# system call tracing in operation
-	testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebx)
+	testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
 	jnz syscall_trace_entry
 syscall_call:
 	call *sys_call_table(,%eax,4)
@@ -299,7 +298,7 @@
 	cli				# make sure we don't miss an interrupt
 					# setting need_resched or sigpending
 					# between sampling and the iret
-	movl TI_FLAGS(%ebx), %ecx
+	movl TI_FLAGS(%ebp), %ecx
 	testw $_TIF_ALLWORK_MASK, %cx	# current->work
 	jne syscall_exit_work
 restore_all:
@@ -315,7 +314,7 @@
 	cli				# make sure we don't miss an interrupt
 					# setting need_resched or sigpending
 					# between sampling and the iret
-	movl TI_FLAGS(%ebx), %ecx
+	movl TI_FLAGS(%ebp), %ecx
 	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done other
 					# than syscall tracing?
 	jz restore_all
@@ -370,7 +369,7 @@
 syscall_fault:
 	pushl %eax			# save orig_eax
 	SAVE_ALL
-	GET_THREAD_INFO(%ebx)
+	GET_THREAD_INFO(%ebp)
 	movl $-EFAULT,EAX(%esp)
 	jmp resume_userspace
 
diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
--- a/arch/i386/kernel/mpparse.c	Fri Jan 10 12:12:38 2003
+++ b/arch/i386/kernel/mpparse.c	Fri Jan 10 12:12:38 2003
@@ -1017,7 +1017,7 @@
 	 * walking the MADT again.
 	 */
 	status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
-		(acpi_table_header **) &madt);
+		(struct acpi_table_header **) &madt);
 	if (ACPI_SUCCESS(status)) {
 		madt_end = (void *) (unsigned long)madt + madt->header.length;
 
diff -Nru a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
--- a/arch/i386/kernel/vm86.c	Fri Jan 10 12:12:37 2003
+++ b/arch/i386/kernel/vm86.c	Fri Jan 10 12:12:37 2003
@@ -298,9 +298,10 @@
 	__asm__ __volatile__(
 		"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
 		"movl %0,%%esp\n\t"
+		"movl %1,%%ebp\n\t"
 		"jmp resume_userspace"
 		: /* no outputs */
-		:"r" (&info->regs), "b" (tsk->thread_info) : "ax");
+		:"r" (&info->regs), "r" (tsk->thread_info) : "ax");
 	/* we never return here */
 }
 
@@ -311,8 +312,9 @@
 	regs32 = save_v86_state(regs16);
 	regs32->eax = retval;
 	__asm__ __volatile__("movl %0,%%esp\n\t"
+		"movl %1,%%ebp\n\t"
 		"jmp resume_userspace"
-		: : "r" (regs32), "b" (current_thread_info()));
+		: : "r" (regs32), "r" (current_thread_info()));
 }
 
 static inline void set_IF(struct kernel_vm86_regs * regs)
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	Fri Jan 10 12:12:38 2003
+++ b/arch/ppc/Kconfig	Fri Jan 10 12:12:38 2003
@@ -1077,7 +1077,7 @@
 
 config LOWMEM_SIZE
 	hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
-	default "0x20000000"
+	default "0x30000000"
 
 config KERNEL_START_BOOL
 	bool "Set custom kernel base address"
diff -Nru a/arch/ppc/configs/redwood6_defconfig b/arch/ppc/configs/redwood6_defconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/configs/redwood6_defconfig	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,547 @@
+#
+# Automatically generated by make menuconfig: don't edit
+#
+# CONFIG_UID16 is not set
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_440 is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_PPC_ISERIES is not set
+CONFIG_4xx=y
+# CONFIG_ASH is not set
+# CONFIG_CEDAR is not set
+# CONFIG_BEECH is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
+# CONFIG_REDWOOD_4 is not set
+# CONFIG_REDWOOD_5 is not set
+CONFIG_REDWOOD_6=y
+# CONFIG_TIVO is not set
+# CONFIG_WALNUT is not set
+# CONFIG_XILINX_ML300 is not set
+CONFIG_STB03xxx=y
+CONFIG_IBM_OPENBIOS=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM_OCP=y
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_IBM405_ERR51=y
+CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_PPC4xx_DMA=y
+CONFIG_STBXXX_DMA=y
+CONFIG_OCP=y
+# CONFIG_OCP_PROC is not set
+# CONFIG_PCI is not set
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_PM is not set
+# CONFIG_SERIAL_SICC is not set
+# CONFIG_PPC_STD_MMU is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+
+#
+# General setup
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_ADVANCED_OPTIONS is not set
+# CONFIG_ISA is not set
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+# CONFIG_PNPBIOS is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_CISS_SCSI_TAPE is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_IPV6 is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+
+#
+# Appletalk devices
+#
+# CONFIG_DEV_APPLETALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_OAKNET is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+CONFIG_NET_VENDOR_SMC=y
+# CONFIG_WD80x3 is not set
+# CONFIG_ULTRAMCA is not set
+# CONFIG_ULTRA is not set
+# CONFIG_ULTRA32 is not set
+# CONFIG_SMC9194 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Backplane Networking
+#
+# CONFIG_NPNET is not set
+
+#
+# On-chip net devices
+#
+# CONFIG_IBM_OCP_ENET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+# CONFIG_INPUT_KEYBDEV is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_UINPUT is not set
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_GAMEPORT_NS558 is not set
+# CONFIG_GAMEPORT_L4 is not set
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+# CONFIG_GAMEPORT_FM801 is not set
+# CONFIG_GAMEPORT_CS461x is not set
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_CS is not set
+# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+# CONFIG_SERIAL_8250_SHARE_IRQ is not set
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_MULTIPORT is not set
+# CONFIG_SERIAL_8250_RSA is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_PSMOUSE is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_QFMT_V1 is not set
+# CONFIG_QFMT_V2 is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+CONFIG_TMPFS=y
+CONFIG_RAMFS=y
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_DEBUG is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SMB_NLS is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
+# CONFIG_ZLIB_INFLATE is not set
+# CONFIG_ZLIB_DEFLATE is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY_CAPABILITIES=y
diff -Nru a/arch/ppc/configs/sycamore_defconfig b/arch/ppc/configs/sycamore_defconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/configs/sycamore_defconfig	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,528 @@
+#
+# Automatically generated by make menuconfig: don't edit
+#
+# CONFIG_UID16 is not set
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODVERSIONS=y
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_440 is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_PPC_ISERIES is not set
+CONFIG_4xx=y
+# CONFIG_PPC_STD_MMU is not set
+# CONFIG_ASH is not set
+# CONFIG_CEDER is not set
+# CONFIG_BEECH is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
+# CONFIG_REDWOOD_4 is not set
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+CONFIG_SYCAMORE=y
+# CONFIG_TIVO is not set
+# CONFIG_WALNUT is not set
+# CONFIG_XILINX_ML300 is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_405GPR=y
+CONFIG_BIOS_FIXUP=y
+CONFIG_IBM_OPENBIOS=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM_OCP=y
+CONFIG_PM=y
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_IBM405_ERR51=y
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_PPC4xx_DMA=y
+CONFIG_PPC4xx_EDMA=y
+CONFIG_OCP_PROC=y
+
+#
+# General setup
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_ISA is not set
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+CONFIG_PCI=y
+# CONFIG_PC_KEYBOARD is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_PCI_NAMES is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+CONFIG_PPC_RTC=y
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_CISS_SCSI_TAPE is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+
+#
+# Appletalk devices
+#
+# CONFIG_DEV_APPLETALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Backplane Networking
+#
+# CONFIG_NPNET is not set
+
+#
+# On-chip net devices
+#
+CONFIG_IBM_OCP_ENET=y
+# CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
+CONFIG_IBM_OCP_ENET_RX_BUFF=64
+CONFIG_IBM_OCP_ENET_TX_BUFF=8
+CONFIG_IBM_OCP_ENET_GAP=8
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+# CONFIG_INPUT_KEYBDEV is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_PROC=y
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+CONFIG_IBM_OCP_GPIO=y
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+CONFIG_TMPFS=y
+CONFIG_RAMFS=y
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+# CONFIG_ZLIB_FS_INFLATE is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_SMB_NLS is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# IBM 4xx options
+#
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
--- a/arch/ppc/kernel/traps.c	Fri Jan 10 12:12:38 2003
+++ b/arch/ppc/kernel/traps.c	Fri Jan 10 12:12:38 2003
@@ -112,42 +112,23 @@
 	force_sig(signr, current);
 }
 
-void
-MachineCheckException(struct pt_regs *regs)
+/*
+ * I/O accesses can cause machine checks on powermacs.
+ * Check if the NIP corresponds to the address of a sync
+ * instruction for which there is an entry in the exception
+ * table.
+ * Note that the 601 only takes a machine check on TEA
+ * (transfer error ack) signal assertion, and does not
+ * set any of the top 16 bits of SRR1.
+ *  -- paulus.
+ */
+static inline int check_io_access(struct pt_regs *regs)
 {
 #ifdef CONFIG_ALL_PPC
-	const struct exception_table_entry *entry;
-#endif /* CONFIG_ALL_PPC */
 	unsigned long msr = regs->msr;
+	const struct exception_table_entry *entry;
+	unsigned int *nip = (unsigned int *)regs->nip;
 
-	if (user_mode(regs)) {
-		regs->msr |= MSR_RI;
-		_exception(SIGSEGV, regs);
-		return;
-	}
-
-#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
-	/* the qspan pci read routines can cause machine checks -- Cort */
-	bad_page_fault(regs, regs->dar, SIGBUS);
-	return;
-#endif
-	if (debugger_fault_handler) {
-		debugger_fault_handler(regs);
-		regs->msr |= MSR_RI;
-		return;
-	}
-
-#ifdef CONFIG_ALL_PPC
-	/*
-	 * I/O accesses can cause machine checks on powermacs.
-	 * Check if the NIP corresponds to the address of a sync
-	 * instruction for which there is an entry in the exception
-	 * table.
-	 * Note that the 601 only takes a machine check on TEA
-	 * (transfer error ack) signal assertion, and does not
-	 * set any of the top 16 bits of SRR1.
-	 *  -- paulus.
-	 */
 	if (((msr & 0xffff0000) == 0 || (msr & (0x80000 | 0x40000)))
 	    && (entry = search_exception_tables(regs->nip)) != NULL) {
 		/*
@@ -158,7 +139,6 @@
 		 * For the debug message, we look at the preceding
 		 * load or store.
 		 */
-		unsigned int *nip = (unsigned int *)regs->nip;
 		if (*nip == 0x60000000)		/* nop */
 			nip -= 2;
 		else if (*nip == 0x4c00012c)	/* isync */
@@ -173,14 +153,42 @@
 			       (*nip & 0x100)? "OUT to": "IN from",
 			       regs->gpr[rb] - _IO_BASE, nip);
 			regs->msr |= MSR_RI;
-			regs->nip = fixup;
-			return;
+			regs->nip = entry->fixup;
+			return 1;
 		}
 	}
 #endif /* CONFIG_ALL_PPC */
-	printk("Machine check in kernel mode.\n");
-	printk("Caused by (from SRR1=%lx): ", msr);
-	switch (msr & 0x601F0000) {
+	return 0;
+}
+
+void
+MachineCheckException(struct pt_regs *regs)
+{
+	if (user_mode(regs)) {
+		regs->msr |= MSR_RI;
+		_exception(SIGSEGV, regs);
+		return;
+	}
+
+#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
+	/* the qspan pci read routines can cause machine checks -- Cort */
+	bad_page_fault(regs, regs->dar, SIGBUS);
+	return;
+#endif
+
+	if (debugger_fault_handler) {
+		debugger_fault_handler(regs);
+		regs->msr |= MSR_RI;
+		return;
+	}
+
+	if (check_io_access(regs))
+		return;
+
+#ifndef CONFIG_4xx
+	printk(KERN_CRIT "Machine check in kernel mode.\n");
+	printk(KERN_CRIT "Caused by (from SRR1=%lx): ", regs->msr);
+	switch (regs->msr & 0x601F0000) {
 	case 0x80000:
 		printk("Machine check signal\n");
 		break;
@@ -207,6 +215,17 @@
 	default:
 		printk("Unknown values in msr\n");
 	}
+
+#else /* CONFIG_4xx */
+	/* Note that the ESR gets stored in regs->dsisr on 4xx. */
+	if (regs->dsisr & ESR_MCI) {
+		printk(KERN_CRIT "Instruction");
+		mtspr(SPRN_ESR, regs->dsisr & ~ESR_MCI);
+	} else
+		printk(KERN_CRIT "Data");
+	printk(" machine check in kernel mode.\n");
+#endif /* CONFIG_4xx */
+
 	debugger(regs);
 	die("machine check", regs, SIGBUS);
 }
diff -Nru a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
--- a/arch/ppc/platforms/4xx/Kconfig	Fri Jan 10 12:12:38 2003
+++ b/arch/ppc/platforms/4xx/Kconfig	Fri Jan 10 12:12:38 2003
@@ -44,6 +44,9 @@
 config REDWOOD_6
 	bool "Redwood-6"
 
+config SYCAMORE
+	bool "Sycamore"
+
 config TIVO
 	bool "Tivo"
 
@@ -81,7 +84,7 @@
 
 config IBM_OCP
 	bool
-	depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
+	depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
 	default y
 
 config NP405L
@@ -91,7 +94,7 @@
 
 config BIOS_FIXUP
 	bool
-	depends on CEDAR || EP405 || WALNUT
+	depends on CEDAR || EP405 || SYCAMORE || WALNUT
 	default y
 
 config 403GCX
@@ -104,6 +107,14 @@
 	depends on CPCI405 || EP405 || WALNUT
 	default y
 
+config 405GPR
+	bool
+	depends on SYCAMORE
+
+config 405LP
+	bool
+	depends on CEDAR
+
 config STB03xxx
 	bool
 	depends on REDWOOD_5 || REDWOOD_4 || REDWOOD_6
@@ -116,7 +127,7 @@
 
 config IBM_OPENBIOS
 	bool
-	depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
+	depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
 	default y
 
 config 405_DMA
diff -Nru a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
--- a/arch/ppc/platforms/4xx/Makefile	Fri Jan 10 12:12:38 2003
+++ b/arch/ppc/platforms/4xx/Makefile	Fri Jan 10 12:12:38 2003
@@ -12,6 +12,7 @@
 obj-$(CONFIG_REDWOOD_4)		+= redwood.o
 obj-$(CONFIG_REDWOOD_5)		+= redwood5.o
 obj-$(CONFIG_REDWOOD_6)		+= redwood6.o 
+obj-$(CONFIG_SYCAMORE)		+= sycamore.o
 obj-$(CONFIG_WALNUT)		+= walnut.o
 
 obj-$(CONFIG_NP405L)		+= ibmnp405l.o
diff -Nru a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/sycamore.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,293 @@
+/*
+ *
+ *    Copyright 2000-2002 MontaVista Software Inc.
+ *      Author: Armin Kuster <akuster@mvista.com>
+ *      MontaVista Software, Inc.  <source@mvista.com>
+ *
+ *    Module name: sycamore.c
+ *
+ *    Description:
+ *      Architecture- / platform-specific boot-time initialization code for
+ *      IBM PowerPC 4xx based boards. 
+ *
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/blk.h>
+#include <linux/pci.h>
+#include <linux/rtc.h>
+
+#include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
+#include <asm/system.h>
+#include <asm/pci-bridge.h>
+#include <asm/processor.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/todc.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
+void *kb_cs;
+void *kb_data;
+void *sycamore_rtc_base;
+
+/*
+ * Define all of the IRQ senses and polarities.  
+ */
+
+static u_char Sycamore_IRQ_initsenses[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 0: Uart 0*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 1: Uart 1*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 2: IIC */
+	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 3: External Master */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 4: PCI ext cmd write*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 5: DMA Chan 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 6: DMA Chan 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 7: DMA Chan 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 8: DMA Chan 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 9: Ethernet wakeup (WOL)*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 10: Mal (SEER) */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 11: Mal TXEOB */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 12: Mal RXEOB */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 13: Mal TXDE*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 14: Mal RXDE*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 15: Ethernet */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 16: Ext PCI SERR */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 17: ECC */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 18: PCI PM*/
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 19: Ext Int 7 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 20: Ext Int 8 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 21: Ext Int 9 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 22: Ext Int 10 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 23: Ext Int 11 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 24: Ext Int 12 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 25: Ext Int 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 26: Ext Int 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 27: Ext Int 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 28: Ext Int 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 29: Ext Int 4 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 30: Ext Int 5 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 31: Ext Int 6 */
+};
+
+
+/* Some IRQs unique to Sycamore.
+ * Used by the generic 405 PCI setup functions in ppc4xx_pci.c
+ */
+int __init
+ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] =
+	    /*
+	     *      PCI IDSEL/INTPIN->INTLINE
+	     *      A       B       C       D
+	     */
+	{
+		{28, 28, 28, 28},	/* IDSEL 1 - PCI slot 1 */
+		{29, 29, 29, 29},	/* IDSEL 2 - PCI slot 2 */
+		{30, 30, 30, 30},	/* IDSEL 3 - PCI slot 3 */
+		{31, 31, 31, 31},	/* IDSEL 4 - PCI slot 4 */
+	};
+
+	const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
+	return PCI_IRQ_TABLE_LOOKUP;
+};
+
+void __init
+sycamore_setup_arch(void)
+{
+#define SYCAMORE_PS2_BASE	0xF0100000
+#define SYCAMORE_FPGA_BASE	0xF0300000
+
+	void *fpga_brdc;
+	unsigned char fpga_brdc_data;
+	void *fpga_enable;
+	void *fpga_polarity;
+	void *fpga_status;
+	void *fpga_trigger;
+
+	ppc4xx_setup_arch();
+
+	kb_data = ioremap(SYCAMORE_PS2_BASE, 8);
+	if (!kb_data) {
+		printk(KERN_CRIT
+		       "sycamore_setup_arch() kb_data ioremap failed\n");
+		return;
+	}
+
+	kb_cs = kb_data + 1;
+
+	fpga_status = ioremap(SYCAMORE_FPGA_BASE, 8);
+	if (!fpga_status) {
+		printk(KERN_CRIT
+		       "sycamore_setup_arch() fpga_status ioremap failed\n");
+		return;
+	}
+
+	fpga_enable = fpga_status + 1;
+	fpga_polarity = fpga_status + 2;
+	fpga_trigger = fpga_status + 3;
+	fpga_brdc = fpga_status + 4;
+
+	/* split the keyboard and mouse interrupts */
+	fpga_brdc_data = readb(fpga_brdc);
+	fpga_brdc_data |= 0x80;
+	writeb(fpga_brdc_data, fpga_brdc);
+
+	writeb(0x3, fpga_enable);
+
+	writeb(0x3, fpga_polarity);
+
+	writeb(0x3, fpga_trigger);
+
+	/* RTC step for the sycamore */
+	sycamore_rtc_base = (void *) SYCAMORE_RTC_VADDR;
+	TODC_INIT(TODC_TYPE_DS1743, sycamore_rtc_base, sycamore_rtc_base,
+		  sycamore_rtc_base, 8);
+	ibm4xxPIC_InitSenses = Sycamore_IRQ_initsenses;
+	ibm4xxPIC_NumInitSenses = sizeof(Sycamore_IRQ_initsenses);
+
+	/* Identify the system */
+	printk(KERN_INFO "IBM Sycamore (IBM405GPr) Platform\n");
+	printk(KERN_INFO
+	       "Port by MontaVista Software, Inc. (source@mvista.com)\n");
+}
+
+void __init
+bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip)
+{
+#ifdef CONFIG_PCI
+	unsigned int bar_response, bar;
+	/*
+	 * Expected PCI mapping:
+	 *
+	 *  PLB addr             PCI memory addr
+	 *  ---------------------       ---------------------
+	 *  0000'0000 - 7fff'ffff <---  0000'0000 - 7fff'ffff
+	 *  8000'0000 - Bfff'ffff --->  8000'0000 - Bfff'ffff
+	 *
+	 *  PLB addr             PCI io addr
+	 *  ---------------------       ---------------------
+	 *  e800'0000 - e800'ffff --->  0000'0000 - 0001'0000
+	 *
+	 * The following code is simplified by assuming that the bootrom
+	 * has been well behaved in following this mapping.
+	 */
+
+#ifdef DEBUG
+	int i;
+
+	printk("ioremap PCLIO_BASE = 0x%x\n", pcip);
+	printk("PCI bridge regs before fixup \n");
+	for (i = 0; i <= 3; i++) {
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha)));
+	}
+	printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
+	printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
+	printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
+	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
+
+#endif
+
+	/* added for IBM boot rom version 1.15 bios bar changes  -AK */
+
+	/* Disable region first */
+	out_le32((void *) &(pcip->pmm[0].ma), 0x00000000);
+	/* PLB starting addr, PCI: 0x80000000 */
+	out_le32((void *) &(pcip->pmm[0].la), 0x80000000);
+	/* PCI start addr, 0x80000000 */
+	out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE);
+	/* 512MB range of PLB to PCI */
+	out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000);
+	/* Enable no pre-fetch, enable region */
+	out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff -
+						(PPC405_PCI_UPPER_MEM -
+						 PPC405_PCI_MEM_BASE)) | 0x01));
+
+	/* Disable region one */
+	out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].la), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
+	out_le32((void *) &(pcip->ptm1ms), 0x00000000);
+
+	/* Disable region two */
+	out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].la), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
+	out_le32((void *) &(pcip->ptm2ms), 0x00000000);
+
+	/* Zero config bars */
+	for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) {
+		early_write_config_dword(hose, hose->first_busno,
+					 PCI_FUNC(hose->first_busno), bar,
+					 0x00000000);
+		early_read_config_dword(hose, hose->first_busno,
+					PCI_FUNC(hose->first_busno), bar,
+					&bar_response);
+		DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n",
+		    hose->first_busno, PCI_SLOT(hose->first_busno),
+		    PCI_FUNC(hose->first_busno), bar, bar_response);
+	}
+	/* end work arround */
+
+#ifdef DEBUG
+	printk("PCI bridge regs after fixup \n");
+	for (i = 0; i <= 3; i++) {
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila)));
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha)));
+	}
+	printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
+	printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
+	printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
+	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
+
+#endif
+#endif
+
+}
+
+void __init
+sycamore_map_io(void)
+{
+	ppc4xx_map_io();
+	io_block_mapping(SYCAMORE_RTC_VADDR,
+			 SYCAMORE_RTC_PADDR, SYCAMORE_RTC_SIZE, _PAGE_IO);
+}
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = sycamore_setup_arch;
+	ppc_md.setup_io_mappings = sycamore_map_io;
+
+	ppc_md.time_init = todc_time_init;
+	ppc_md.set_rtc_time = todc_set_rtc_time;
+	ppc_md.get_rtc_time = todc_get_rtc_time;
+	ppc_md.nvram_read_val = todc_direct_read_val;
+	ppc_md.nvram_write_val = todc_direct_write_val;
+}
diff -Nru a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/sycamore.h	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,71 @@
+/*
+ *
+ *    Copyright 2000 MontaVista Software Inc.
+ * 	Author: Armin Kuster <akuster@mvista.com>
+ * 		MontaVista Software, Inc.
+ *
+ *    Module name: sycamore.h
+ *
+ *    Description:
+ *      Macros, definitions, and data structures specific to the IBM PowerPC
+ *      based boards.
+ *
+ *      This includes:
+ *
+ *         405GP "Sycamore" evaluation board
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_SYCAMORE_H__
+#define __ASM_SYCAMORE_H__
+
+#include <platforms/4xx/ibm405gpr.h>
+
+#ifndef __ASSEMBLY__
+/*
+ * Data structure defining board information maintained by the boot
+ * ROM on IBM's "Sycamore" evaluation board. An effort has been made to
+ * keep the field names consistent with the 8xx 'bd_t' board info
+ * structures.
+ */
+
+typedef struct board_info {
+	unsigned char	 bi_s_version[4];	/* Version of this structure */
+	unsigned char	 bi_r_version[30];	/* Version of the IBM ROM */
+	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
+	unsigned char	 bi_enetaddr[6];	/* Local Ethernet MAC address */
+	unsigned char	 bi_pci_enetaddr[6];	/* PCI Ethernet MAC address */
+	unsigned int	 bi_intfreq;		/* Processor speed, in Hz */
+	unsigned int	 bi_busfreq;		/* PLB Bus speed, in Hz */
+	unsigned int	 bi_pci_busfreq;	/* PCI Bus speed, in Hz */
+} bd_t;
+
+/* Some 4xx parts use a different timebase frequency from the internal clock.
+*/
+#define bi_tbfreq bi_intfreq
+
+
+/* Memory map for the IBM "Sycamore" 405GP evaluation board.
+ * Generic 4xx plus RTC.
+ */
+
+extern void *sycamore_rtc_base;
+#define SYCAMORE_RTC_PADDR	((uint)0xf0000000)
+#define SYCAMORE_RTC_VADDR	SYCAMORE_RTC_PADDR
+#define SYCAMORE_RTC_SIZE		((uint)8*1024)
+
+#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
+#define BASE_BAUD		201600
+#else
+#define BASE_BAUD		691200
+#endif
+
+#define SYCAMORE_PS2_BASE		0xF0100000
+#define SYCAMORE_FPGA_BASE	0xF0300000
+
+#define PPC4xx_MACHINE_NAME	"IBM Sycamore"
+
+#endif /* !__ASSEMBLY__ */
+#endif /* __ASM_SYCAMORE_H__ */
+#endif /* __KERNEL__ */
diff -Nru a/arch/sparc/kernel/unaligned.c b/arch/sparc/kernel/unaligned.c
--- a/arch/sparc/kernel/unaligned.c	Fri Jan 10 12:12:38 2003
+++ b/arch/sparc/kernel/unaligned.c	Fri Jan 10 12:12:38 2003
@@ -10,6 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <asm/ptrace.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -342,7 +343,7 @@
 void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
 {
 	unsigned long g2 = regs->u_regs [UREG_G2];
-	unsigned long fixup = search_exception_table (regs->pc, &g2);
+	unsigned long fixup = search_extables_range(regs->pc, &g2);
 
 	if (!fixup) {
 		unsigned long address = compute_effective_address(regs, insn);
diff -Nru a/arch/sparc/mm/extable.c b/arch/sparc/mm/extable.c
--- a/arch/sparc/mm/extable.c	Fri Jan 10 12:12:38 2003
+++ b/arch/sparc/mm/extable.c	Fri Jan 10 12:12:38 2003
@@ -6,13 +6,11 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 
-extern const struct exception_table_entry __start___ex_table[];
-extern const struct exception_table_entry __stop___ex_table[];
-
-static unsigned long
-search_one_table(const struct exception_table_entry *start,
-		 const struct exception_table_entry *end,
-		 unsigned long value, unsigned long *g2)
+/* Caller knows they are in a range if ret->fixup == 0 */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *start,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
 	const struct exception_table_entry *walk;
 
@@ -30,7 +28,7 @@
 	 */
 
 	/* 1. Try to find an exact match. */
-	for (walk = start; walk <= end; walk++) {
+	for (walk = start; walk <= last; walk++) {
 		if (walk->fixup == 0) {
 			/* A range entry, skip both parts. */
 			walk++;
@@ -38,55 +36,37 @@
 		}
 
 		if (walk->insn == value)
-			return walk->fixup;
+			return walk;
 	}
 
 	/* 2. Try to find a range match. */
-	for (walk = start; walk <= (end - 1); walk++) {
+	for (walk = start; walk <= (last - 1); walk++) {
 		if (walk->fixup)
 			continue;
 
-		if (walk[0].insn <= value &&
-		    walk[1].insn > value) {
-			*g2 = (value - walk[0].insn) / 4;
-			return walk[1].fixup;
-		}
+		if (walk[0].insn <= value && walk[1].insn > value)
+			return walk;
+
 		walk++;
 	}
 
-        return 0;
+        return NULL;
 }
 
-extern spinlock_t modlist_lock;
-
-unsigned long
-search_exception_table(unsigned long addr, unsigned long *g2)
+/* Special extable search, which handles ranges.  Returns fixup */
+unsigned long search_extables_range(unsigned long addr, unsigned long *g2)
 {
-	unsigned long ret = 0;
+	const struct exception_table_entry *entry;
 
-#ifndef CONFIG_MODULES
-	/* There is only the kernel to search.  */
-	ret = search_one_table(__start___ex_table,
-			       __stop___ex_table-1, addr, g2);
-	return ret;
-#else
-	unsigned long flags;
-	struct list_head *i;
-
-	/* The kernel is the last "module" -- no need to treat it special.  */
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each(i, &extables) {
-		struct exception_table *ex =
-			list_entry(i, struct exception_table, list);
-		if (ex->num_entries == 0)
-			continue;
-		ret = search_one_table(ex->entry,
-				       ex->entry + ex->num_entries - 1,
-				       addr, g2);
-		if (ret)
-			break;
+	entry = search_exception_tables(addr);
+	if (!entry)
+		return 0;
+
+	/* Inside range?  Fix g2 and return correct fixup */
+	if (!entry->fixup) {
+		*g2 = (addr - entry->insn) / 4;
+		return (entry + 1)->fixup;
 	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-	return ret;
-#endif
+
+	return entry->fixup;
 }
diff -Nru a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
--- a/arch/sparc/mm/fault.c	Fri Jan 10 12:12:38 2003
+++ b/arch/sparc/mm/fault.c	Fri Jan 10 12:12:38 2003
@@ -20,6 +20,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/segment.h>
@@ -161,7 +162,7 @@
 	unsigned int insn;
 	int i;
 	
-	i = search_exception_table(ret_pc, &g2);
+	i = search_extables_range(ret_pc, &g2);
 	switch (i) {
 	case 3:
 		/* load & store will be handled by fixup */
@@ -316,7 +317,7 @@
 	/* Is this in ex_table? */
 no_context:
 	g2 = regs->u_regs[UREG_G2];
-	if (!from_user && (fixup = search_exception_table (regs->pc, &g2))) {
+	if (!from_user && (fixup = search_extables_range(regs->pc, &g2))) {
 		if (fixup > 10) { /* Values below are reserved for other things */
 			extern const unsigned __memset_start[];
 			extern const unsigned __memset_end[];
diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig
--- a/arch/sparc64/defconfig	Fri Jan 10 12:12:38 2003
+++ b/arch/sparc64/defconfig	Fri Jan 10 12:12:38 2003
@@ -12,10 +12,16 @@
 #
 # General setup
 #
-CONFIG_NET=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+CONFIG_LOG_BUF_SHIFT_15=y
+# CONFIG_LOG_BUF_SHIFT_14 is not set
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=15
 
 #
 # Loadable module support
@@ -23,6 +29,7 @@
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -47,6 +54,7 @@
 CONFIG_SUN_IO=y
 CONFIG_PCI=y
 CONFIG_RTC=y
+# CONFIG_PCI_LEGACY_PROC is not set
 # CONFIG_PCI_NAMES is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_KCORE_ELF=y
@@ -76,45 +84,17 @@
 CONFIG_WATCHDOG_RIO=m
 
 #
-# Console drivers
+# Graphics support
 #
-CONFIG_PROM_CONSOLE=y
+# CONFIG_FB is not set
 
 #
-# Frame-buffer support
+# Console display driver support
 #
-CONFIG_FB=y
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_PROM_CONSOLE=y
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_CLGEN is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-CONFIG_FB_ATY=y
-CONFIG_FB_ATY_GX=y
-# CONFIG_FB_BWTWO is not set
-# CONFIG_FB_CGTHREE is not set
-CONFIG_FB_CGSIX=y
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-CONFIG_FB_ATY_CT=y
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_PM3 is not set
-CONFIG_FB_SBUS=y
-CONFIG_FB_CREATOR=y
-# CONFIG_FB_LEO is not set
-CONFIG_FB_PCI=y
-# CONFIG_FB_VIRTUAL is not set
-# CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_ACCEL=y
-CONFIG_FBCON_FONTWIDTH8_ONLY=y
-CONFIG_FONT_SUN8x16=y
-# CONFIG_FBCON_FONTS is not set
 
 #
 # Serial drivers
@@ -260,7 +240,11 @@
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
 CONFIG_AIC7XXX_RESET_DELAY_MS=5000
+# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
 # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
 CONFIG_SCSI_AIC7XXX_OLD=m
 CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT=y
 CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8
@@ -306,6 +290,11 @@
 # CONFIG_IEEE1394 is not set
 
 #
+# Networking support
+#
+CONFIG_NET=y
+
+#
 # Networking options
 #
 CONFIG_PACKET=y
@@ -387,10 +376,6 @@
 # Network testing
 #
 CONFIG_NET_PKTGEN=m
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
 
 #
@@ -414,8 +399,6 @@
 CONFIG_SUNGEM=y
 CONFIG_NET_VENDOR_3COM=y
 CONFIG_VORTEX=m
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
 
 #
 # Tulip family network device support
@@ -431,6 +414,7 @@
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
+# CONFIG_AMD8111_ETH is not set
 CONFIG_ADAPTEC_STARFIRE=m
 CONFIG_B44=m
 CONFIG_DGRS=m
@@ -452,7 +436,6 @@
 # CONFIG_TLAN is not set
 CONFIG_VIA_RHINE=m
 # CONFIG_VIA_RHINE_MMIO is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -819,7 +802,10 @@
 # USB Device Class drivers
 #
 # CONFIG_USB_AUDIO is not set
-CONFIG_USB_BLUETOOTH_TTY=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
 # CONFIG_USB_MIDI is not set
 CONFIG_USB_ACM=m
 CONFIG_USB_PRINTER=m
@@ -910,6 +896,7 @@
 # CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
 CONFIG_USB_SERIAL_KLSI=m
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 CONFIG_USB_SERIAL_MCT_U232=m
 CONFIG_USB_SERIAL_PL2303=m
 # CONFIG_USB_SERIAL_SAFE is not set
@@ -992,6 +979,7 @@
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
--- a/arch/sparc64/kernel/sys_sparc32.c	Fri Jan 10 12:12:38 2003
+++ b/arch/sparc64/kernel/sys_sparc32.c	Fri Jan 10 12:12:38 2003
@@ -1729,8 +1729,7 @@
 	set_fs (KERNEL_DS);
 	ret = sys_sched_rr_get_interval(pid, &t);
 	set_fs (old_fs);
-	if (put_user (t.tv_sec, &interval->tv_sec) ||
-	    __put_user (t.tv_nsec, &interval->tv_nsec))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }
@@ -1861,8 +1860,7 @@
 	signotset(&these);
 
 	if (uts) {
-		if (get_user (ts.tv_sec, &uts->tv_sec) ||
-		    get_user (ts.tv_nsec, &uts->tv_nsec))
+		if (get_compat_timespec(&ts, uts))
 			return -EINVAL;
 		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
 		    || ts.tv_sec < 0)
diff -Nru a/crypto/Kconfig b/crypto/Kconfig
--- a/crypto/Kconfig	Fri Jan 10 12:12:38 2003
+++ b/crypto/Kconfig	Fri Jan 10 12:12:38 2003
@@ -6,12 +6,14 @@
 
 config CRYPTO
 	bool "Cryptographic API"
+	default y if INET_AH=y || INET_AH=m || INET_ESP=y || INET_ESP=m
 	help
 	  This option provides the core Cryptographic API.
 
 config CRYPTO_HMAC
 	bool "HMAC support"
 	depends on CRYPTO
+	default y if INET_AH=y || INET_AH=m || INET_ESP=y || INET_ESP=m
 	help
 	  HMAC: Keyed-Hashing for Message Authentication (RFC2104).
 	  This is required for IPSec.
@@ -31,12 +33,14 @@
 config CRYPTO_MD5
 	tristate "MD5 digest algorithm"
 	depends on CRYPTO
+	default y if INET_AH=y || INET_AH=m || INET_ESP=y || INET_ESP=m
 	help
 	  MD5 message digest algorithm (RFC1321).
 
 config CRYPTO_SHA1
 	tristate "SHA1 digest algorithm"
 	depends on CRYPTO
+	default y if INET_AH=y || INET_AH=m || INET_ESP=y || INET_ESP=m
 	help
 	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
 
@@ -52,6 +56,7 @@
 config CRYPTO_DES
 	tristate "DES and Triple DES EDE cipher algorithms"
 	depends on CRYPTO
+	default y if INET_AH=y || INET_AH=m || INET_ESP=y || INET_ESP=m
 	help
 	  DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
 
@@ -93,6 +98,26 @@
 
 	  See also:
 	  http://www.cl.cam.ac.uk/~rja14/serpent.html
+
+config CRYPTO_AES
+	tristate "AES cipher algorithms"
+	depends on CRYPTO
+	help
+	  AES cipher algorithms (FIPS-197). AES uses the Rijndael 
+	  algorithm.
+
+	  Rijndael appears to be consistently a very good performer in
+	  both hardware and software across a wide range of computing 
+	  environments regardless of its use in feedback or non-feedback 
+	  modes. Its key setup time is excellent, and its key agility is 
+	  good. Rijndael's very low memory requirements make it very well 
+	  suited for restricted-space environments, in which it also 
+	  demonstrates excellent performance. Rijndael's operations are 
+	  among the easiest to defend against power and timing attacks.	
+
+	  The AES specifies three key sizes: 128, 192 and 256 bits	  
+
+	  See http://csrc.nist.gov/encryption/aes/ for more information.
 
 config CRYPTO_TEST
 	tristate "Testing module"
diff -Nru a/crypto/Makefile b/crypto/Makefile
--- a/crypto/Makefile	Fri Jan 10 12:12:38 2003
+++ b/crypto/Makefile	Fri Jan 10 12:12:38 2003
@@ -20,5 +20,6 @@
 obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
 obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
 obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
+obj-$(CONFIG_CRYPTO_AES) += aes.o
 
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
diff -Nru a/crypto/aes.c b/crypto/aes.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/aes.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,468 @@
+/* 
+ * Cryptographic API.
+ *
+ * AES Cipher Algorithm.
+ *
+ * Based on Brian Gladman's code.
+ *
+ * Linux developers:
+ *  Alexander Kjeldaas <astor@fast.no>
+ *  Herbert Valerio Riedel <hvr@hvrlab.org>
+ *  Kyle McMartin <kyle@debian.org>
+ *  Adam J. Richter <adam@yggdrasil.com> (conversion to 2.5 API).
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * ---------------------------------------------------------------------------
+ * Copyright (c) 2002, Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
+ * All rights reserved.
+ *
+ * LICENSE TERMS
+ *
+ * The free distribution and use of this software in both source and binary
+ * form is allowed (with or without changes) provided that:
+ *
+ *   1. distributions of this source code include the above copyright
+ *      notice, this list of conditions and the following disclaimer;
+ *
+ *   2. distributions in binary form include the above copyright
+ *      notice, this list of conditions and the following disclaimer
+ *      in the documentation and/or other associated materials;
+ *
+ *   3. the copyright holder's name is not used to endorse products
+ *      built using this software without specific written permission.
+ *
+ * ALTERNATIVELY, provided that this notice is retained in full, this product
+ * may be distributed under the terms of the GNU General Public License (GPL),
+ * in which case the provisions of the GPL apply INSTEAD OF those given above.
+ *
+ * DISCLAIMER
+ *
+ * This software is provided 'as is' with no explicit or implied warranties
+ * in respect of its properties, including, but not limited to, correctness
+ * and/or fitness for purpose.
+ * ---------------------------------------------------------------------------
+ */
+
+/* Some changes from the Gladman version:
+    s/RIJNDAEL(e_key)/E_KEY/g
+    s/RIJNDAEL(d_key)/D_KEY/g
+*/
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/crypto.h>
+#include <asm/byteorder.h>
+
+#define AES_MIN_KEY_SIZE	16
+#define AES_MAX_KEY_SIZE	32
+
+#define AES_BLOCK_SIZE		16
+
+static inline 
+u32 generic_rotr32 (const u32 x, const unsigned bits)
+{
+	const unsigned n = bits % 32;
+	return (x >> n) | (x << (32 - n));
+}
+
+static inline 
+u32 generic_rotl32 (const u32 x, const unsigned bits)
+{
+	const unsigned n = bits % 32;
+	return (x << n) | (x >> (32 - n));
+}
+
+#define rotl generic_rotl32
+#define rotr generic_rotr32
+
+/*
+ * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
+ */
+inline static u8
+byte(const u32 x, const unsigned n)
+{
+	return x >> (n << 3);
+}
+
+#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
+#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
+
+struct aes_ctx {
+	int key_length;
+	u32 E[60];
+	u32 D[60];
+};
+
+#define E_KEY ctx->E
+#define D_KEY ctx->D
+
+static u8 pow_tab[256];
+static u8 log_tab[256];
+static u8 sbx_tab[256];
+static u8 isb_tab[256];
+static u32 rco_tab[10];
+static u32 ft_tab[4][256];
+static u32 it_tab[4][256];
+
+static u32 fl_tab[4][256];
+static u32 il_tab[4][256];
+
+static inline u8
+f_mult (u8 a, u8 b)
+{
+	u8 aa = log_tab[a], cc = aa + log_tab[b];
+
+	return pow_tab[cc + (cc < aa ? 1 : 0)];
+}
+
+#define ff_mult(a,b)    (a && b ? f_mult(a, b) : 0)
+
+#define f_rn(bo, bi, n, k)					\
+    bo[n] =  ft_tab[0][byte(bi[n],0)] ^				\
+             ft_tab[1][byte(bi[(n + 1) & 3],1)] ^		\
+             ft_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n)
+
+#define i_rn(bo, bi, n, k)					\
+    bo[n] =  it_tab[0][byte(bi[n],0)] ^				\
+             it_tab[1][byte(bi[(n + 3) & 3],1)] ^		\
+             it_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n)
+
+#define ls_box(x)				\
+    ( fl_tab[0][byte(x, 0)] ^			\
+      fl_tab[1][byte(x, 1)] ^			\
+      fl_tab[2][byte(x, 2)] ^			\
+      fl_tab[3][byte(x, 3)] )
+
+#define f_rl(bo, bi, n, k)					\
+    bo[n] =  fl_tab[0][byte(bi[n],0)] ^				\
+             fl_tab[1][byte(bi[(n + 1) & 3],1)] ^		\
+             fl_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n)
+
+#define i_rl(bo, bi, n, k)					\
+    bo[n] =  il_tab[0][byte(bi[n],0)] ^				\
+             il_tab[1][byte(bi[(n + 3) & 3],1)] ^		\
+             il_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n)
+
+static void
+gen_tabs (void)
+{
+	u32 i, t;
+	u8 p, q;
+
+	/* log and power tables for GF(2**8) finite field with
+	   0x011b as modular polynomial - the simplest prmitive
+	   root is 0x03, used here to generate the tables */
+
+	for (i = 0, p = 1; i < 256; ++i) {
+		pow_tab[i] = (u8) p;
+		log_tab[p] = (u8) i;
+
+		p ^= (p << 1) ^ (p & 0x80 ? 0x01b : 0);
+	}
+
+	log_tab[1] = 0;
+
+	for (i = 0, p = 1; i < 10; ++i) {
+		rco_tab[i] = p;
+
+		p = (p << 1) ^ (p & 0x80 ? 0x01b : 0);
+	}
+
+	for (i = 0; i < 256; ++i) {
+		p = (i ? pow_tab[255 - log_tab[i]] : 0);
+		q = ((p >> 7) | (p << 1)) ^ ((p >> 6) | (p << 2));
+		p ^= 0x63 ^ q ^ ((q >> 6) | (q << 2));
+		sbx_tab[i] = p;
+		isb_tab[p] = (u8) i;
+	}
+
+	for (i = 0; i < 256; ++i) {
+		p = sbx_tab[i];
+
+		t = p;
+		fl_tab[0][i] = t;
+		fl_tab[1][i] = rotl (t, 8);
+		fl_tab[2][i] = rotl (t, 16);
+		fl_tab[3][i] = rotl (t, 24);
+
+		t = ((u32) ff_mult (2, p)) |
+		    ((u32) p << 8) |
+		    ((u32) p << 16) | ((u32) ff_mult (3, p) << 24);
+
+		ft_tab[0][i] = t;
+		ft_tab[1][i] = rotl (t, 8);
+		ft_tab[2][i] = rotl (t, 16);
+		ft_tab[3][i] = rotl (t, 24);
+
+		p = isb_tab[i];
+
+		t = p;
+		il_tab[0][i] = t;
+		il_tab[1][i] = rotl (t, 8);
+		il_tab[2][i] = rotl (t, 16);
+		il_tab[3][i] = rotl (t, 24);
+
+		t = ((u32) ff_mult (14, p)) |
+		    ((u32) ff_mult (9, p) << 8) |
+		    ((u32) ff_mult (13, p) << 16) |
+		    ((u32) ff_mult (11, p) << 24);
+
+		it_tab[0][i] = t;
+		it_tab[1][i] = rotl (t, 8);
+		it_tab[2][i] = rotl (t, 16);
+		it_tab[3][i] = rotl (t, 24);
+	}
+}
+
+#define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b)
+
+#define imix_col(y,x)       \
+    u   = star_x(x);        \
+    v   = star_x(u);        \
+    w   = star_x(v);        \
+    t   = w ^ (x);          \
+   (y)  = u ^ v ^ w;        \
+   (y) ^= rotr(u ^ t,  8) ^ \
+          rotr(v ^ t, 16) ^ \
+          rotr(t,24)
+
+/* initialise the key schedule from the user supplied key */
+
+#define loop4(i)                                    \
+{   t = rotr(t,  8); t = ls_box(t) ^ rco_tab[i];    \
+    t ^= E_KEY[4 * i];     E_KEY[4 * i + 4] = t;    \
+    t ^= E_KEY[4 * i + 1]; E_KEY[4 * i + 5] = t;    \
+    t ^= E_KEY[4 * i + 2]; E_KEY[4 * i + 6] = t;    \
+    t ^= E_KEY[4 * i + 3]; E_KEY[4 * i + 7] = t;    \
+}
+
+#define loop6(i)                                    \
+{   t = rotr(t,  8); t = ls_box(t) ^ rco_tab[i];    \
+    t ^= E_KEY[6 * i];     E_KEY[6 * i + 6] = t;    \
+    t ^= E_KEY[6 * i + 1]; E_KEY[6 * i + 7] = t;    \
+    t ^= E_KEY[6 * i + 2]; E_KEY[6 * i + 8] = t;    \
+    t ^= E_KEY[6 * i + 3]; E_KEY[6 * i + 9] = t;    \
+    t ^= E_KEY[6 * i + 4]; E_KEY[6 * i + 10] = t;   \
+    t ^= E_KEY[6 * i + 5]; E_KEY[6 * i + 11] = t;   \
+}
+
+#define loop8(i)                                    \
+{   t = rotr(t,  8); ; t = ls_box(t) ^ rco_tab[i];  \
+    t ^= E_KEY[8 * i];     E_KEY[8 * i + 8] = t;    \
+    t ^= E_KEY[8 * i + 1]; E_KEY[8 * i + 9] = t;    \
+    t ^= E_KEY[8 * i + 2]; E_KEY[8 * i + 10] = t;   \
+    t ^= E_KEY[8 * i + 3]; E_KEY[8 * i + 11] = t;   \
+    t  = E_KEY[8 * i + 4] ^ ls_box(t);    \
+    E_KEY[8 * i + 12] = t;                \
+    t ^= E_KEY[8 * i + 5]; E_KEY[8 * i + 13] = t;   \
+    t ^= E_KEY[8 * i + 6]; E_KEY[8 * i + 14] = t;   \
+    t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t;   \
+}
+
+static int
+aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
+{
+	struct aes_ctx *ctx = ctx_arg;
+	u32 i, t, u, v, w;
+
+	if (key_len != 16 && key_len != 24 && key_len != 32) {
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+		return -EINVAL;
+	}
+
+	ctx->key_length = key_len;
+
+	E_KEY[0] = u32_in (in_key);
+	E_KEY[1] = u32_in (in_key + 4);
+	E_KEY[2] = u32_in (in_key + 8);
+	E_KEY[3] = u32_in (in_key + 12);
+
+	switch (key_len) {
+	case 16:
+		t = E_KEY[3];
+		for (i = 0; i < 10; ++i)
+			loop4 (i);
+		break;
+
+	case 24:
+		E_KEY[4] = u32_in (in_key + 16);
+		t = E_KEY[5] = u32_in (in_key + 20);
+		for (i = 0; i < 8; ++i)
+			loop6 (i);
+		break;
+
+	case 32:
+		E_KEY[4] = u32_in (in_key + 16);
+		E_KEY[5] = u32_in (in_key + 20);
+		E_KEY[6] = u32_in (in_key + 24);
+		t = E_KEY[7] = u32_in (in_key + 28);
+		for (i = 0; i < 7; ++i)
+			loop8 (i);
+		break;
+	}
+
+	D_KEY[0] = E_KEY[0];
+	D_KEY[1] = E_KEY[1];
+	D_KEY[2] = E_KEY[2];
+	D_KEY[3] = E_KEY[3];
+
+	for (i = 4; i < key_len + 24; ++i) {
+		imix_col (D_KEY[i], E_KEY[i]);
+	}
+
+	return 0;
+}
+
+/* encrypt a block of text */
+
+#define f_nround(bo, bi, k) \
+    f_rn(bo, bi, 0, k);     \
+    f_rn(bo, bi, 1, k);     \
+    f_rn(bo, bi, 2, k);     \
+    f_rn(bo, bi, 3, k);     \
+    k += 4
+
+#define f_lround(bo, bi, k) \
+    f_rl(bo, bi, 0, k);     \
+    f_rl(bo, bi, 1, k);     \
+    f_rl(bo, bi, 2, k);     \
+    f_rl(bo, bi, 3, k)
+
+static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
+{
+	const struct aes_ctx *ctx = ctx_arg;
+	u32 b0[4], b1[4];
+	const u32 *kp = E_KEY + 4;
+
+	b0[0] = u32_in (in) ^ E_KEY[0];
+	b0[1] = u32_in (in + 4) ^ E_KEY[1];
+	b0[2] = u32_in (in + 8) ^ E_KEY[2];
+	b0[3] = u32_in (in + 12) ^ E_KEY[3];
+
+	if (ctx->key_length > 24) {
+		f_nround (b1, b0, kp);
+		f_nround (b0, b1, kp);
+	}
+
+	if (ctx->key_length > 16) {
+		f_nround (b1, b0, kp);
+		f_nround (b0, b1, kp);
+	}
+
+	f_nround (b1, b0, kp);
+	f_nround (b0, b1, kp);
+	f_nround (b1, b0, kp);
+	f_nround (b0, b1, kp);
+	f_nround (b1, b0, kp);
+	f_nround (b0, b1, kp);
+	f_nround (b1, b0, kp);
+	f_nround (b0, b1, kp);
+	f_nround (b1, b0, kp);
+	f_lround (b0, b1, kp);
+
+	u32_out (out, b0[0]);
+	u32_out (out + 4, b0[1]);
+	u32_out (out + 8, b0[2]);
+	u32_out (out + 12, b0[3]);
+}
+
+/* decrypt a block of text */
+
+#define i_nround(bo, bi, k) \
+    i_rn(bo, bi, 0, k);     \
+    i_rn(bo, bi, 1, k);     \
+    i_rn(bo, bi, 2, k);     \
+    i_rn(bo, bi, 3, k);     \
+    k -= 4
+
+#define i_lround(bo, bi, k) \
+    i_rl(bo, bi, 0, k);     \
+    i_rl(bo, bi, 1, k);     \
+    i_rl(bo, bi, 2, k);     \
+    i_rl(bo, bi, 3, k)
+
+static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in)
+{
+	const struct aes_ctx *ctx = ctx_arg;
+	u32 b0[4], b1[4];
+	const int key_len = ctx->key_length;
+	const u32 *kp = D_KEY + key_len + 20;
+
+	b0[0] = u32_in (in) ^ E_KEY[key_len + 24];
+	b0[1] = u32_in (in + 4) ^ E_KEY[key_len + 25];
+	b0[2] = u32_in (in + 8) ^ E_KEY[key_len + 26];
+	b0[3] = u32_in (in + 12) ^ E_KEY[key_len + 27];
+
+	if (key_len > 24) {
+		i_nround (b1, b0, kp);
+		i_nround (b0, b1, kp);
+	}
+
+	if (key_len > 16) {
+		i_nround (b1, b0, kp);
+		i_nround (b0, b1, kp);
+	}
+
+	i_nround (b1, b0, kp);
+	i_nround (b0, b1, kp);
+	i_nround (b1, b0, kp);
+	i_nround (b0, b1, kp);
+	i_nround (b1, b0, kp);
+	i_nround (b0, b1, kp);
+	i_nround (b1, b0, kp);
+	i_nround (b0, b1, kp);
+	i_nround (b1, b0, kp);
+	i_lround (b0, b1, kp);
+
+	u32_out (out, b0[0]);
+	u32_out (out + 4, b0[1]);
+	u32_out (out + 8, b0[2]);
+	u32_out (out + 12, b0[3]);
+}
+
+
+static struct crypto_alg aes_alg = {
+	.cra_name		=	"aes",
+	.cra_flags		=	CRYPTO_ALG_TYPE_CIPHER,
+	.cra_blocksize		=	AES_BLOCK_SIZE,
+	.cra_ctxsize		=	sizeof(struct aes_ctx),
+	.cra_module		=	THIS_MODULE,
+	.cra_list		=	LIST_HEAD_INIT(aes_alg.cra_list),
+	.cra_u			=	{
+		.cipher = {
+			.cia_min_keysize	=	AES_MIN_KEY_SIZE,
+			.cia_max_keysize	=	AES_MAX_KEY_SIZE,
+			.cia_ivsize		=	AES_BLOCK_SIZE,
+			.cia_setkey	   	= 	aes_set_key,
+			.cia_encrypt	 	=	aes_encrypt,
+			.cia_decrypt	  	=	aes_decrypt
+		}
+	}
+};
+
+static int __init aes_init(void)
+{
+	gen_tabs();
+	return crypto_register_alg(&aes_alg);
+}
+
+static void __exit aes_fini(void)
+{
+	crypto_unregister_alg(&aes_alg);
+}
+
+module_init(aes_init);
+module_exit(aes_fini);
+
+MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
+MODULE_LICENSE("Dual BSD/GPL");
+
diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c
--- a/crypto/tcrypt.c	Fri Jan 10 12:12:38 2003
+++ b/crypto/tcrypt.c	Fri Jan 10 12:12:38 2003
@@ -1983,6 +1983,111 @@
 	crypto_free_tfm(tfm);
 }
 
+void
+test_aes(void)
+{
+	unsigned int ret, i;
+	unsigned int tsize;
+	char *p, *q;
+	struct crypto_tfm *tfm;
+	char *key;
+	struct aes_tv *aes_tv;
+	struct scatterlist sg[1];
+
+	printk("\ntesting aes encryption\n");
+
+	tsize = sizeof (aes_enc_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, aes_enc_tv_template, tsize);
+	aes_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("aes", 0);
+	if (tfm == NULL) {
+		printk("failed to load transform for aes (default ecb)\n");
+		return;
+	}
+
+	for (i = 0; i < AES_ENC_TEST_VECTORS; i++) {
+		printk("test %u (%d bit key):\n",
+			i + 1, aes_tv[i].keylen * 8);
+		key = aes_tv[i].key;
+
+		ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+
+			if (!aes_tv[i].fail)
+				goto out;
+		}
+
+		p = aes_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = aes_tv[i].plen;
+		ret = crypto_cipher_encrypt(tfm, sg, 1);
+		if (ret) {
+			printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, aes_tv[i].rlen);
+
+		printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
+			"fail" : "pass");
+	}
+	
+	printk("\ntesting aes decryption\n");
+
+	tsize = sizeof (aes_dec_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, aes_dec_tv_template, tsize);
+	aes_tv = (void *) tvmem;
+
+	for (i = 0; i < AES_DEC_TEST_VECTORS; i++) {
+		printk("test %u (%d bit key):\n",
+			i + 1, aes_tv[i].keylen * 8);
+		key = aes_tv[i].key;
+
+		ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+
+			if (!aes_tv[i].fail)
+				goto out;
+		}
+
+		p = aes_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = aes_tv[i].plen;
+		ret = crypto_cipher_decrypt(tfm, sg, 1);
+		if (ret) {
+			printk("decrypt() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, aes_tv[i].rlen);
+
+		printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
+			"fail" : "pass");
+	}
+
+out:
+	crypto_free_tfm(tfm);
+}
+
 static void
 test_available(void)
 {
@@ -2011,6 +2116,7 @@
 		test_blowfish();
 		test_twofish();
 		test_serpent();
+		test_aes();
 #ifdef CONFIG_CRYPTO_HMAC
 		test_hmac_md5();
 		test_hmac_sha1();
@@ -2054,6 +2160,10 @@
 		test_serpent();
 		break;
 
+	case 10:
+		test_aes();
+		break;
+		
 #ifdef CONFIG_CRYPTO_HMAC
 	case 100:
 		test_hmac_md5();
diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h
--- a/crypto/tcrypt.h	Fri Jan 10 12:12:38 2003
+++ b/crypto/tcrypt.h	Fri Jan 10 12:12:38 2003
@@ -1480,4 +1480,97 @@
 	}
 };
 
+/*
+ * AES test vectors.
+ */
+#define AES_ENC_TEST_VECTORS 3
+#define AES_DEC_TEST_VECTORS 3
+
+struct aes_tv {
+	unsigned int keylen;
+	unsigned int plen;
+	unsigned int rlen;
+	int fail;
+	char key[32];
+	char iv[8];
+	char plaintext[16];
+	char result[16];
+};
+
+struct aes_tv aes_enc_tv_template[] = { 
+	/* From FIPS-197 */
+	{
+		16, 16, 16, 0,
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+		{ 0 },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+		{ 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
+		  0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
+	},
+	{
+		24, 16, 16, 0,
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+		  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
+		{ 0 },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+		{ 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
+		  0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
+	},
+	{
+		32, 16, 16, 0,
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+		  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+		  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+		{ 0 },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+		{ 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
+		  0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
+	},
+};
+
+struct aes_tv aes_dec_tv_template[] = { 
+	/* From FIPS-197 */
+	{
+		16, 16, 16, 0,
+		
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+		{ 0 },
+		{ 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
+		  0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+	},
+	
+	{
+		24, 16, 16, 0,
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+		  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
+		{ 0 },
+		{ 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
+		  0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },  
+	},
+	{
+		32, 16, 16, 0,
+		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+		  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+		  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+		  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+		{ 0 },
+		{ 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
+		  0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
+		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+		  0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+	},
+};
+
 #endif	/* _CRYPTO_TCRYPT_H */
diff -Nru a/drivers/acpi/acpi_bus.h b/drivers/acpi/acpi_bus.h
--- a/drivers/acpi/acpi_bus.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/acpi_bus.h	Fri Jan 10 12:12:38 2003
@@ -44,9 +44,24 @@
 
 
 /* acpi_utils.h */
-acpi_status acpi_extract_package (acpi_object *, acpi_buffer *, acpi_buffer *);
-acpi_status acpi_evaluate_integer (acpi_handle, acpi_string, acpi_object_list *, unsigned long *);
-acpi_status acpi_evaluate_reference (acpi_handle, acpi_string, acpi_object_list *, struct acpi_handle_list *);
+acpi_status
+acpi_extract_package (
+	union acpi_object       *package,
+	struct acpi_buffer      *format,
+	struct acpi_buffer      *buffer);
+acpi_status
+acpi_evaluate_integer (
+	acpi_handle             handle,
+	acpi_string             pathname,
+	struct acpi_object_list *arguments,
+	unsigned long           *data);
+acpi_status
+acpi_evaluate_reference (
+	acpi_handle             handle,
+	acpi_string             pathname,
+	struct acpi_object_list *arguments,
+	struct acpi_handle_list *list);
+
 
 #ifdef CONFIG_ACPI_BUS
 
diff -Nru a/drivers/acpi/acpi_drivers.h b/drivers/acpi/acpi_drivers.h
--- a/drivers/acpi/acpi_drivers.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/acpi_drivers.h	Fri Jan 10 12:12:38 2003
@@ -55,7 +55,7 @@
 
 /* ACPI PCI Root Bridge (pci_root.c) */
 
-void acpi_pci_get_translations (acpi_pci_id* id, u64* mem_tra, u64* io_tra);
+void acpi_pci_get_translations (struct acpi_pci_id* id, u64* mem_tra, u64* io_tra);
 
 /* ACPI PCI Interrupt Link (pci_link.c) */
 
@@ -71,7 +71,7 @@
 struct pci_bus;
 
 int acpi_pci_bind (struct acpi_device *device);
-int acpi_pci_bind_root (struct acpi_device *device, acpi_pci_id *id, struct pci_bus *bus);
+int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
 
 #endif /*CONFIG_ACPI_PCI*/
 
diff -Nru a/drivers/acpi/battery.c b/drivers/acpi/battery.c
--- a/drivers/acpi/battery.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/battery.c	Fri Jan 10 12:12:38 2003
@@ -127,11 +127,11 @@
 {
 	int			result = 0;
 	acpi_status 		status = 0;
-	acpi_buffer 		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_buffer		format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
 						ACPI_BATTERY_FORMAT_BIF};
-	acpi_buffer		data = {0, NULL};
-	acpi_object 		*package = NULL;
+	struct acpi_buffer	data = {0, NULL};
+	union acpi_object	*package = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_battery_get_info");
 
@@ -146,7 +146,7 @@
 		return_VALUE(-ENODEV);
 	}
 
-	package = (acpi_object *) buffer.pointer;
+	package = (union acpi_object *) buffer.pointer;
 
 	/* Extract Package Data */
 
@@ -188,11 +188,11 @@
 {
 	int			result = 0;
 	acpi_status 		status = 0;
-	acpi_buffer 		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_buffer		format = {sizeof(ACPI_BATTERY_FORMAT_BST),
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	format = {sizeof(ACPI_BATTERY_FORMAT_BST),
 						ACPI_BATTERY_FORMAT_BST};
-	acpi_buffer		data = {0, NULL};
-	acpi_object 		*package = NULL;
+	struct acpi_buffer	data = {0, NULL};
+	union acpi_object	*package = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_battery_get_status");
 
@@ -207,7 +207,7 @@
 		return_VALUE(-ENODEV);
 	}
 
-	package = (acpi_object *) buffer.pointer;
+	package = (union acpi_object *) buffer.pointer;
 
 	/* Extract Package Data */
 
@@ -249,8 +249,8 @@
 	unsigned long		alarm)
 {
 	acpi_status		status = 0;
-	acpi_object		arg0 = {ACPI_TYPE_INTEGER};
-	acpi_object_list	arg_list = {1, &arg0};
+	union acpi_object	arg0 = {ACPI_TYPE_INTEGER};
+	struct acpi_object_list	arg_list = {1, &arg0};
 
 	ACPI_FUNCTION_TRACE("acpi_battery_set_alarm");
 
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/bus.c	Fri Jan 10 12:12:38 2003
@@ -540,8 +540,8 @@
 acpi_bus_init_irq (void)
 {
 	acpi_status		status = AE_OK;
-	acpi_object		arg = {ACPI_TYPE_INTEGER};
-	acpi_object_list        arg_list = {1, &arg};
+	union acpi_object	arg = {ACPI_TYPE_INTEGER};
+	struct acpi_object_list	arg_list = {1, &arg};
 	char			*message = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_bus_init_irq");
@@ -585,7 +585,7 @@
 {
 	int			result = 0;
 	acpi_status		status = AE_OK;
-	acpi_buffer		buffer = {sizeof(acpi_fadt), &acpi_fadt};
+	struct acpi_buffer	buffer = {sizeof(acpi_fadt), &acpi_fadt};
 
 	ACPI_FUNCTION_TRACE("acpi_bus_init");
 
diff -Nru a/drivers/acpi/button.c b/drivers/acpi/button.c
--- a/drivers/acpi/button.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/button.c	Fri Jan 10 12:12:37 2003
@@ -38,6 +38,7 @@
 #define ACPI_BUTTON_DRIVER_NAME		"ACPI Button Driver"
 #define ACPI_BUTTON_CLASS		"button"
 #define ACPI_BUTTON_FILE_INFO		"info"
+#define ACPI_BUTTON_FILE_STATE		"state"
 #define ACPI_BUTTON_TYPE_UNKNOWN	0x00
 #define ACPI_BUTTON_NOTIFY_STATUS	0x80
 
@@ -68,9 +69,10 @@
 MODULE_LICENSE("GPL");
 
 
-int acpi_button_add (struct acpi_device *device);
-int acpi_button_remove (struct acpi_device *device, int type);
-static int acpi_button_open_fs(struct inode *inode, struct file *file);
+static int acpi_button_add (struct acpi_device *device);
+static int acpi_button_remove (struct acpi_device *device, int type);
+static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
+static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
 
 static struct acpi_driver acpi_button_driver = {
 	.name =		ACPI_BUTTON_DRIVER_NAME,
@@ -89,24 +91,30 @@
 	unsigned long		pushed;
 };
 
-static struct file_operations acpi_button_fops = {
-	.open		= acpi_button_open_fs,
+static struct file_operations acpi_button_info_fops = {
+	.open		= acpi_button_info_open_fs,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
 	.release	= single_release,
 };
 
+static struct file_operations acpi_button_state_fops = {
+	.open		= acpi_button_state_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
 /* --------------------------------------------------------------------------
                               FS Interface (/proc)
    -------------------------------------------------------------------------- */
 
 static struct proc_dir_entry	*acpi_button_dir = NULL;
 
-static int acpi_button_seq_show(struct seq_file *seq, void *offset)
+static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
 {
 	struct acpi_button	*button = (struct acpi_button *) seq->private;
 
-	ACPI_FUNCTION_TRACE("acpi_button_seq_show");
+	ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
 
 	if (!button || !button->device)
 		return 0;
@@ -117,11 +125,38 @@
 	return 0;
 }
 
-static int acpi_button_open_fs(struct inode *inode, struct file *file)
+static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
 {
-	return single_open(file, acpi_button_seq_show, PDE(inode)->data);
+	return single_open(file, acpi_button_info_seq_show, PDE(inode)->data);
 }
 	
+static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_button	*button = (struct acpi_button *) seq->private;
+	acpi_status		status;
+	unsigned long		state;
+
+	ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
+
+	if (!button || !button->device)
+		return 0;
+
+	status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
+	if (ACPI_FAILURE(status)) {
+		seq_printf(seq, "state:      unsupported\n");
+	}
+	else{
+		seq_printf(seq, "state:      %s\n", (state ? "open" : "closed")); 
+	}
+
+	return 0;
+}
+
+static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_button_state_seq_show, PDE(inode)->data);
+}
+
 static int
 acpi_button_add_fs (
 	struct acpi_device	*device)
@@ -165,10 +200,24 @@
 			"Unable to create '%s' fs entry\n",
 			ACPI_BUTTON_FILE_INFO));
 	else {
-		entry->proc_fops = &acpi_button_fops;
+		entry->proc_fops = &acpi_button_info_fops;
 		entry->data = acpi_driver_data(device);
 	}
 
+	/* show lid state [R] */
+	if (button->type == ACPI_BUTTON_TYPE_LID) {
+		entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
+			S_IRUGO, acpi_device_dir(device));
+		if (!entry)
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+				"Unable to create '%s' fs entry\n",
+				ACPI_BUTTON_FILE_INFO));
+		else {
+			entry->proc_fops = &acpi_button_state_fops;
+			entry->data = acpi_driver_data(device);
+		}
+	}
+
 	return_VALUE(0);
 }
 
@@ -236,7 +285,7 @@
 }
 
 
-int
+static int
 acpi_button_add (
 	struct acpi_device	*device)
 {
@@ -386,7 +435,7 @@
 }
 
 
-int
+static int
 acpi_button_remove (struct acpi_device *device, int type)
 {
 	acpi_status		status = 0;
diff -Nru a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
--- a/drivers/acpi/dispatcher/dsfield.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/dispatcher/dsfield.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -57,15 +57,15 @@
 
 acpi_status
 acpi_ds_create_buffer_field (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_parse_object       *arg;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *second_desc = NULL;
-	u32                     flags;
+	union acpi_parse_object         *arg;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *second_desc = NULL;
+	u32                             flags;
 
 
 	ACPI_FUNCTION_TRACE ("ds_create_buffer_field");
@@ -182,12 +182,12 @@
 
 acpi_status
 acpi_ds_get_field_names (
-	acpi_create_field_info  *info,
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *arg)
+	struct acpi_create_field_info   *info,
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *arg)
 {
-	acpi_status             status;
-	acpi_integer            position;
+	acpi_status                     status;
+	acpi_integer                    position;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_field_names", info);
@@ -309,13 +309,13 @@
 
 acpi_status
 acpi_ds_create_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_parse_object       *arg;
-	acpi_create_field_info  info;
+	acpi_status                     status;
+	union acpi_parse_object         *arg;
+	struct acpi_create_field_info   info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_field", op);
@@ -368,13 +368,13 @@
 
 acpi_status
 acpi_ds_init_field_objects (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_parse_object       *arg = NULL;
-	acpi_namespace_node     *node;
-	u8                      type = 0;
+	acpi_status                     status;
+	union acpi_parse_object         *arg = NULL;
+	struct acpi_namespace_node      *node;
+	u8                              type = 0;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_init_field_objects", op);
@@ -451,13 +451,13 @@
 
 acpi_status
 acpi_ds_create_bank_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_parse_object       *arg;
-	acpi_create_field_info  info;
+	acpi_status                     status;
+	union acpi_parse_object         *arg;
+	struct acpi_create_field_info   info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_bank_field", op);
@@ -524,13 +524,13 @@
 
 acpi_status
 acpi_ds_create_index_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_parse_object       *arg;
-	acpi_create_field_info  info;
+	acpi_status                     status;
+	union acpi_parse_object         *arg;
+	struct acpi_create_field_info   info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_index_field", op);
diff -Nru a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c
--- a/drivers/acpi/dispatcher/dsinit.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dsinit.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -56,14 +56,14 @@
 
 acpi_status
 acpi_ds_init_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_object_type        type;
-	acpi_status             status;
-	acpi_init_walk_info     *info = (acpi_init_walk_info *) context;
+	acpi_object_type                type;
+	acpi_status                     status;
+	struct acpi_init_walk_info      *info = (struct acpi_init_walk_info *) context;
 
 
 	ACPI_FUNCTION_NAME ("ds_init_one_object");
@@ -73,7 +73,7 @@
 	 * We are only interested in objects owned by the table that
 	 * was just loaded
 	 */
-	if (((acpi_namespace_node *) obj_handle)->owner_id !=
+	if (((struct acpi_namespace_node *) obj_handle)->owner_id !=
 			info->table_desc->table_id) {
 		return (AE_OK);
 	}
@@ -90,7 +90,7 @@
 		status = acpi_ds_initialize_region (obj_handle);
 		if (ACPI_FAILURE (status)) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
-				obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+				obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
 				acpi_format_exception (status)));
 		}
 
@@ -115,7 +115,7 @@
 		 * on a per-table basis. Currently, we just use a global for the width.
 		 */
 		if (info->table_desc->pointer->revision == 1) {
-			((acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
+			((struct acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
 		}
 
 		/*
@@ -125,7 +125,7 @@
 		status = acpi_ds_parse_method (obj_handle);
 		if (ACPI_FAILURE (status)) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
-				obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+				obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
 				acpi_format_exception (status)));
 
 			/* This parse failed, but we will continue parsing more methods */
@@ -138,7 +138,7 @@
 		 * for every execution since there isn't much overhead
 		 */
 		acpi_ns_delete_namespace_subtree (obj_handle);
-		acpi_ns_delete_namespace_by_owner (((acpi_namespace_node *) obj_handle)->object->method.owning_id);
+		acpi_ns_delete_namespace_by_owner (((struct acpi_namespace_node *) obj_handle)->object->method.owning_id);
 		break;
 
 
@@ -176,11 +176,11 @@
 
 acpi_status
 acpi_ds_initialize_objects (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *start_node)
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *start_node)
 {
-	acpi_status             status;
-	acpi_init_walk_info     info;
+	acpi_status                     status;
+	struct acpi_init_walk_info      info;
 
 
 	ACPI_FUNCTION_TRACE ("ds_initialize_objects");
diff -Nru a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
--- a/drivers/acpi/dispatcher/dsmethod.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dsmethod.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
 
 acpi_status
 acpi_ds_parse_method (
-	acpi_handle             obj_handle)
+	acpi_handle                     obj_handle)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	acpi_parse_object       *op;
-	acpi_namespace_node     *node;
-	acpi_owner_id           owner_id;
-	acpi_walk_state         *walk_state;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	union acpi_parse_object         *op;
+	struct acpi_namespace_node      *node;
+	acpi_owner_id                   owner_id;
+	struct acpi_walk_state          *walk_state;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_parse_method", obj_handle);
@@ -75,11 +75,11 @@
 	}
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n",
-		((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
+		((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
 
 	/* Extract the method object from the method Node */
 
-	node = (acpi_namespace_node *) obj_handle;
+	node = (struct acpi_namespace_node *) obj_handle;
 	obj_desc = acpi_ns_get_attached_object (node);
 	if (!obj_desc) {
 		return_ACPI_STATUS (AE_NULL_OBJECT);
@@ -150,7 +150,7 @@
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
 		"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n",
-		((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
+		((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
 
 	acpi_ps_delete_parse_tree (op);
 	return_ACPI_STATUS (status);
@@ -177,11 +177,11 @@
 
 acpi_status
 acpi_ds_begin_method_execution (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     *obj_desc,
-	acpi_namespace_node     *calling_method_node)
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       *obj_desc,
+	struct acpi_namespace_node      *calling_method_node)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_begin_method_execution", method_node);
@@ -242,15 +242,15 @@
 
 acpi_status
 acpi_ds_call_control_method (
-	acpi_thread_state       *thread,
-	acpi_walk_state         *this_walk_state,
-	acpi_parse_object       *op)
+	struct acpi_thread_state        *thread,
+	struct acpi_walk_state          *this_walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status;
-	acpi_namespace_node     *method_node;
-	acpi_operand_object     *obj_desc;
-	acpi_walk_state         *next_walk_state;
-	u32                     i;
+	acpi_status                     status;
+	struct acpi_namespace_node      *method_node;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_walk_state          *next_walk_state;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_call_control_method", this_walk_state);
@@ -376,10 +376,10 @@
 
 acpi_status
 acpi_ds_restart_control_method (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *return_desc)
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *return_desc)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state);
@@ -431,11 +431,11 @@
 
 acpi_status
 acpi_ds_terminate_control_method (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *method_node;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *method_node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_terminate_control_method", walk_state);
diff -Nru a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
--- a/drivers/acpi/dispatcher/dsmthdat.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dsmthdat.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -57,9 +57,9 @@
 
 void
 acpi_ds_method_data_init (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_init");
@@ -107,9 +107,9 @@
 
 void
 acpi_ds_method_data_delete_all (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     index;
+	u32                             index;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_delete_all");
@@ -163,12 +163,12 @@
 
 acpi_status
 acpi_ds_method_data_init_args (
-	acpi_operand_object     **params,
-	u32                     max_param_count,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **params,
+	u32                             max_param_count,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	u32                     index = 0;
+	acpi_status                     status;
+	u32                             index = 0;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_method_data_init_args", params);
@@ -215,10 +215,10 @@
 
 acpi_status
 acpi_ds_method_data_get_node (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     **node)
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      **node)
 {
 	ACPI_FUNCTION_TRACE ("ds_method_data_get_node");
 
@@ -280,14 +280,14 @@
 
 acpi_status
 acpi_ds_method_data_set_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_operand_object     *object,
-	acpi_walk_state         *walk_state)
+	u16                             opcode,
+	u32                             index,
+	union acpi_operand_object       *object,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *new_desc = object;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *new_desc = object;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_set_value");
@@ -347,13 +347,13 @@
 
 acpi_object_type
 acpi_ds_method_data_get_type (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state)
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *object;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *object;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_get_type");
@@ -401,14 +401,14 @@
 
 acpi_status
 acpi_ds_method_data_get_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     **dest_desc)
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       **dest_desc)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *object;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *object;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_get_value");
@@ -490,13 +490,13 @@
 
 void
 acpi_ds_method_data_delete_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state)
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *object;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *object;
 
 
 	ACPI_FUNCTION_TRACE ("ds_method_data_delete_value");
@@ -553,14 +553,14 @@
 
 acpi_status
 acpi_ds_store_object_to_local (
-	u16                     opcode,
-	u32                     index,
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state)
+	u16                             opcode,
+	u32                             index,
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *current_obj_desc;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *current_obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ds_store_object_to_local");
diff -Nru a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
--- a/drivers/acpi/dispatcher/dsobject.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/dispatcher/dsobject.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,12 +52,12 @@
 
 acpi_status
 acpi_ds_build_internal_object (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_operand_object     **obj_desc_ptr)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	union acpi_operand_object       **obj_desc_ptr)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ds_build_internal_object");
@@ -74,7 +74,7 @@
 			status = acpi_ns_lookup (walk_state->scope_info, op->common.value.string,
 					  ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
 					  ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
-					  (acpi_namespace_node **) &(op->common.node));
+					  (struct acpi_namespace_node **) &(op->common.node));
 
 			if (ACPI_FAILURE (status)) {
 				ACPI_REPORT_NSERROR (op->common.value.string, status);
@@ -119,15 +119,15 @@
 
 acpi_status
 acpi_ds_build_internal_buffer_obj (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u32                     buffer_length,
-	acpi_operand_object     **obj_desc_ptr)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u32                             buffer_length,
+	union acpi_operand_object       **obj_desc_ptr)
 {
-	acpi_parse_object       *arg;
-	acpi_operand_object     *obj_desc;
-	acpi_parse_object       *byte_list;
-	u32                     byte_list_length = 0;
+	union acpi_parse_object         *arg;
+	union acpi_operand_object       *obj_desc;
+	union acpi_parse_object         *byte_list;
+	u32                             byte_list_length = 0;
 
 
 	ACPI_FUNCTION_TRACE ("ds_build_internal_buffer_obj");
@@ -204,7 +204,7 @@
 	}
 
 	obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;
-	op->common.node = (acpi_namespace_node *) obj_desc;
+	op->common.node = (struct acpi_namespace_node *) obj_desc;
 	return_ACPI_STATUS (AE_OK);
 }
 
@@ -227,17 +227,17 @@
 
 acpi_status
 acpi_ds_build_internal_package_obj (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u32                     package_length,
-	acpi_operand_object     **obj_desc_ptr)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u32                             package_length,
+	union acpi_operand_object       **obj_desc_ptr)
 {
-	acpi_parse_object       *arg;
-	acpi_parse_object       *parent;
-	acpi_operand_object     *obj_desc = NULL;
-	u32                     package_list_length;
-	acpi_status             status = AE_OK;
-	u32                     i;
+	union acpi_parse_object         *arg;
+	union acpi_parse_object         *parent;
+	union acpi_operand_object       *obj_desc = NULL;
+	u32                             package_list_length;
+	acpi_status                     status = AE_OK;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ds_build_internal_package_obj");
@@ -311,7 +311,7 @@
 		if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
 			/* Object (package or buffer) is already built */
 
-			obj_desc->package.elements[i] = ACPI_CAST_PTR (acpi_operand_object, arg->common.node);
+			obj_desc->package.elements[i] = ACPI_CAST_PTR (union acpi_operand_object, arg->common.node);
 		}
 		else {
 			status = acpi_ds_build_internal_object (walk_state, arg,
@@ -323,7 +323,7 @@
 	}
 
 	obj_desc->package.flags |= AOPOBJ_DATA_VALID;
-	op->common.node = (acpi_namespace_node *) obj_desc;
+	op->common.node = (struct acpi_namespace_node *) obj_desc;
 	return_ACPI_STATUS (status);
 }
 
@@ -344,12 +344,12 @@
 
 acpi_status
 acpi_ds_create_node (
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *node,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *node,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_node", op);
@@ -413,14 +413,14 @@
 
 acpi_status
 acpi_ds_init_object_from_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u16                     opcode,
-	acpi_operand_object     **ret_obj_desc)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u16                             opcode,
+	union acpi_operand_object       **ret_obj_desc)
 {
-	const acpi_opcode_info  *op_info;
-	acpi_operand_object     *obj_desc;
-	acpi_status             status = AE_OK;
+	const struct acpi_opcode_info   *op_info;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ds_init_object_from_op");
@@ -442,7 +442,7 @@
 		/*
 		 * Defer evaluation of Buffer term_arg operand
 		 */
-		obj_desc->buffer.node     = (acpi_namespace_node *) walk_state->operands[0];
+		obj_desc->buffer.node     = (struct acpi_namespace_node *) walk_state->operands[0];
 		obj_desc->buffer.aml_start = op->named.data;
 		obj_desc->buffer.aml_length = op->named.length;
 		break;
@@ -453,7 +453,7 @@
 		/*
 		 * Defer evaluation of Package term_arg operand
 		 */
-		obj_desc->package.node     = (acpi_namespace_node *) walk_state->operands[0];
+		obj_desc->package.node     = (struct acpi_namespace_node *) walk_state->operands[0];
 		obj_desc->package.aml_start = op->named.data;
 		obj_desc->package.aml_length = op->named.length;
 		break;
@@ -551,7 +551,7 @@
 
 #ifndef ACPI_NO_METHOD_EXECUTION
 			status = acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
-					 walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
+					 walk_state, (struct acpi_namespace_node **) &obj_desc->reference.object);
 #endif
 			break;
 
diff -Nru a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
--- a/drivers/acpi/dispatcher/dsopcode.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dsopcode.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,15 +52,15 @@
 
 acpi_status
 acpi_ds_execute_arguments (
-	acpi_namespace_node     *node,
-	acpi_namespace_node     *scope_node,
-	u32                     aml_length,
-	u8                      *aml_start)
-{
-	acpi_status             status;
-	acpi_parse_object       *op;
-	acpi_walk_state         *walk_state;
-	acpi_parse_object       *arg;
+	struct acpi_namespace_node      *node,
+	struct acpi_namespace_node      *scope_node,
+	u32                             aml_length,
+	u8                              *aml_start)
+{
+	acpi_status                     status;
+	union acpi_parse_object         *op;
+	struct acpi_walk_state          *walk_state;
+	union acpi_parse_object         *arg;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_ds_execute_arguments");
@@ -153,11 +153,11 @@
 
 acpi_status
 acpi_ds_get_buffer_field_arguments (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_operand_object     *extra_desc;
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	union acpi_operand_object       *extra_desc;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_field_arguments", obj_desc);
@@ -199,10 +199,10 @@
 
 acpi_status
 acpi_ds_get_buffer_arguments (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_arguments", obj_desc);
@@ -246,10 +246,10 @@
 
 acpi_status
 acpi_ds_get_package_arguments (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_package_arguments", obj_desc);
@@ -293,11 +293,11 @@
 
 acpi_status
 acpi_ds_get_region_arguments (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_operand_object     *extra_desc;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	union acpi_operand_object       *extra_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_region_arguments", obj_desc);
@@ -342,10 +342,10 @@
 
 acpi_status
 acpi_ds_initialize_region (
-	acpi_handle             obj_handle)
+	acpi_handle                     obj_handle)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	obj_desc = acpi_ns_get_attached_object (obj_handle);
@@ -376,18 +376,18 @@
 
 acpi_status
 acpi_ds_init_buffer_field (
-	u16                     aml_opcode,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *buffer_desc,
-	acpi_operand_object     *offset_desc,
-	acpi_operand_object     *length_desc,
-	acpi_operand_object     *result_desc)
-{
-	u32                     offset;
-	u32                     bit_offset;
-	u32                     bit_count;
-	u8                      field_flags;
-	acpi_status             status;
+	u16                             aml_opcode,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *buffer_desc,
+	union acpi_operand_object       *offset_desc,
+	union acpi_operand_object       *length_desc,
+	union acpi_operand_object       *result_desc)
+{
+	u32                             offset;
+	u32                             bit_offset;
+	u32                             bit_count;
+	u8                              field_flags;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_init_buffer_field", obj_desc);
@@ -558,13 +558,13 @@
 
 acpi_status
 acpi_ds_eval_buffer_field_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *node;
-	acpi_parse_object       *next_op;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *node;
+	union acpi_parse_object         *next_op;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_eval_buffer_field_operands", op);
@@ -645,14 +645,14 @@
 
 acpi_status
 acpi_ds_eval_region_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *operand_desc;
-	acpi_namespace_node     *node;
-	acpi_parse_object       *next_op;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *operand_desc;
+	struct acpi_namespace_node      *node;
+	union acpi_parse_object         *next_op;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_eval_region_operands", op);
@@ -743,13 +743,13 @@
 
 acpi_status
 acpi_ds_eval_data_object_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_operand_object     *obj_desc)
-{
-	acpi_status             status;
-	acpi_operand_object     *arg_desc;
-	u32                     length;
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	union acpi_operand_object       *obj_desc)
+{
+	acpi_status                     status;
+	union acpi_operand_object       *arg_desc;
+	u32                             length;
 
 
 	ACPI_FUNCTION_TRACE ("ds_eval_data_object_operands");
@@ -836,11 +836,11 @@
 
 acpi_status
 acpi_ds_exec_begin_control_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status = AE_OK;
-	acpi_generic_state      *control_state;
+	acpi_status                     status = AE_OK;
+	union acpi_generic_state        *control_state;
 
 
 	ACPI_FUNCTION_NAME ("ds_exec_begin_control_op");
@@ -916,11 +916,11 @@
 
 acpi_status
 acpi_ds_exec_end_control_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_status             status = AE_OK;
-	acpi_generic_state      *control_state;
+	acpi_status                     status = AE_OK;
+	union acpi_generic_state        *control_state;
 
 
 	ACPI_FUNCTION_NAME ("ds_exec_end_control_op");
diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
--- a/drivers/acpi/dispatcher/dsutils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dsutils.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,10 +52,10 @@
 
 u8
 acpi_ds_is_result_used (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state)
 {
-	const acpi_opcode_info  *parent_info;
+	const struct acpi_opcode_info   *parent_info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_is_result_used", op);
@@ -200,12 +200,12 @@
 
 void
 acpi_ds_delete_result_if_not_used (
-	acpi_parse_object       *op,
-	acpi_operand_object     *result_obj,
-	acpi_walk_state         *walk_state)
+	union acpi_parse_object         *op,
+	union acpi_operand_object       *result_obj,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_delete_result_if_not_used", result_obj);
@@ -251,10 +251,10 @@
 
 acpi_status
 acpi_ds_resolve_operands (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
-	acpi_status             status = AE_OK;
+	u32                             i;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_resolve_operands", walk_state);
@@ -289,9 +289,9 @@
 
 void
 acpi_ds_clear_operands (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("acpi_ds_clear_operands", walk_state);
@@ -333,18 +333,18 @@
 
 acpi_status
 acpi_ds_create_operand (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *arg,
-	u32                     arg_index)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *arg,
+	u32                             arg_index)
 {
-	acpi_status             status = AE_OK;
-	char                    *name_string;
-	u32                     name_length;
-	acpi_operand_object     *obj_desc;
-	acpi_parse_object       *parent_op;
-	u16                     opcode;
-	acpi_interpreter_mode   interpreter_mode;
-	const acpi_opcode_info  *op_info;
+	acpi_status                     status = AE_OK;
+	char                            *name_string;
+	u32                             name_length;
+	union acpi_operand_object       *obj_desc;
+	union acpi_parse_object         *parent_op;
+	u16                             opcode;
+	acpi_interpreter_mode           interpreter_mode;
+	const struct acpi_opcode_info   *op_info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_operand", arg);
@@ -397,7 +397,7 @@
 				 ACPI_TYPE_ANY, interpreter_mode,
 				 ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
 				 walk_state,
-				 ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &obj_desc));
+				 ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc));
 		/*
 		 * The only case where we pass through (ignore) a NOT_FOUND
 		 * error is for the cond_ref_of opcode.
@@ -410,7 +410,7 @@
 				 * indicate this to the interpreter, set the
 				 * object to the root
 				 */
-				obj_desc = ACPI_CAST_PTR (acpi_operand_object, acpi_gbl_root_node);
+				obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node);
 				status = AE_OK;
 			}
 
@@ -543,12 +543,12 @@
 
 acpi_status
 acpi_ds_create_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *first_arg)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *first_arg)
 {
-	acpi_status             status = AE_OK;
-	acpi_parse_object       *arg;
-	u32                     arg_count = 0;
+	acpi_status                     status = AE_OK;
+	union acpi_parse_object         *arg;
+	u32                             arg_count = 0;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_create_operands", first_arg);
diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
--- a/drivers/acpi/dispatcher/dswexec.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dswexec.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -66,10 +66,10 @@
 
 acpi_status
 acpi_ds_get_predicate_value (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *result_obj) {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *obj_desc;
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *result_obj) {
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_get_predicate_value", walk_state);
@@ -179,12 +179,12 @@
 
 acpi_status
 acpi_ds_exec_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op)
 {
-	acpi_parse_object       *op;
-	acpi_status             status = AE_OK;
-	u32                     opcode_class;
+	union acpi_parse_object         *op;
+	acpi_status                     status = AE_OK;
+	u32                             opcode_class;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_exec_begin_op", walk_state);
@@ -320,14 +320,14 @@
 
 acpi_status
 acpi_ds_exec_end_op (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_parse_object       *op;
-	acpi_status             status = AE_OK;
-	u32                     op_type;
-	u32                     op_class;
-	acpi_parse_object       *next_op;
-	acpi_parse_object       *first_arg;
+	union acpi_parse_object         *op;
+	acpi_status                     status = AE_OK;
+	u32                             op_type;
+	u32                             op_class;
+	union acpi_parse_object         *next_op;
+	union acpi_parse_object         *first_arg;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_exec_end_op", walk_state);
diff -Nru a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
--- a/drivers/acpi/dispatcher/dswload.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/dispatcher/dswload.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,8 +51,8 @@
 
 acpi_status
 acpi_ds_init_callbacks (
-	acpi_walk_state         *walk_state,
-	u32                     pass_number)
+	struct acpi_walk_state          *walk_state,
+	u32                             pass_number)
 {
 
 	switch (pass_number) {
@@ -100,15 +100,15 @@
 
 acpi_status
 acpi_ds_load1_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op)
 {
-	acpi_parse_object       *op;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_object_type        object_type;
-	char                    *path;
-	u32                     flags;
+	union acpi_parse_object         *op;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	acpi_object_type                object_type;
+	char                            *path;
+	u32                             flags;
 
 
 	ACPI_FUNCTION_NAME ("ds_load1_begin_op");
@@ -303,11 +303,11 @@
 
 acpi_status
 acpi_ds_load1_end_op (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_parse_object       *op;
-	acpi_object_type        object_type;
-	acpi_status             status = AE_OK;
+	union acpi_parse_object         *op;
+	acpi_object_type                object_type;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_NAME ("ds_load1_end_op");
@@ -415,14 +415,14 @@
 
 acpi_status
 acpi_ds_load2_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op)
 {
-	acpi_parse_object       *op;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_object_type        object_type;
-	char                    *buffer_ptr;
+	union acpi_parse_object         *op;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	acpi_object_type                object_type;
+	char                            *buffer_ptr;
 
 
 	ACPI_FUNCTION_TRACE ("ds_load2_begin_op");
@@ -627,16 +627,16 @@
 
 acpi_status
 acpi_ds_load2_end_op (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_parse_object       *op;
-	acpi_status             status = AE_OK;
-	acpi_object_type        object_type;
-	acpi_namespace_node     *node;
-	acpi_parse_object       *arg;
-	acpi_namespace_node     *new_node;
+	union acpi_parse_object         *op;
+	acpi_status                     status = AE_OK;
+	acpi_object_type                object_type;
+	struct acpi_namespace_node      *node;
+	union acpi_parse_object         *arg;
+	struct acpi_namespace_node      *new_node;
 #ifndef ACPI_NO_METHOD_EXECUTION
-	u32                     i;
+	u32                             i;
 #endif
 
 
diff -Nru a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c
--- a/drivers/acpi/dispatcher/dswscope.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dswscope.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,9 +47,9 @@
 
 void
 acpi_ds_scope_stack_clear (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *scope_info;
+	union acpi_generic_state        *scope_info;
 
 	ACPI_FUNCTION_NAME ("ds_scope_stack_clear");
 
@@ -81,12 +81,12 @@
 
 acpi_status
 acpi_ds_scope_stack_push (
-	acpi_namespace_node     *node,
-	acpi_object_type        type,
-	acpi_walk_state         *walk_state)
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *scope_info;
-	acpi_generic_state      *old_scope_info;
+	union acpi_generic_state        *scope_info;
+	union acpi_generic_state        *old_scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("ds_scope_stack_push");
@@ -168,10 +168,10 @@
 
 acpi_status
 acpi_ds_scope_stack_pop (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *scope_info;
-	acpi_generic_state      *new_scope_info;
+	union acpi_generic_state        *scope_info;
+	union acpi_generic_state        *new_scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("ds_scope_stack_pop");
diff -Nru a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
--- a/drivers/acpi/dispatcher/dswstate.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/dispatcher/dswstate.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
 
 acpi_status
 acpi_ds_result_insert (
-	void                    *object,
-	u32                     index,
-	acpi_walk_state         *walk_state)
+	void                            *object,
+	u32                             index,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_NAME ("ds_result_insert");
@@ -83,7 +83,7 @@
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
 		"Obj=%p [%s] State=%p Num=%X Cur=%X\n",
-		object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+		object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
 		walk_state, state->results.num_results, walk_state->current_result));
 
 	return (AE_OK);
@@ -106,11 +106,11 @@
 
 acpi_status
 acpi_ds_result_remove (
-	acpi_operand_object     **object,
-	u32                     index,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **object,
+	u32                             index,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_NAME ("ds_result_remove");
@@ -170,11 +170,11 @@
 
 acpi_status
 acpi_ds_result_pop (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_native_uint        index;
-	acpi_generic_state      *state;
+	acpi_native_uint                index;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_NAME ("ds_result_pop");
@@ -230,11 +230,11 @@
 
 acpi_status
 acpi_ds_result_pop_from_bottom (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_native_uint        index;
-	acpi_generic_state      *state;
+	acpi_native_uint                index;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_NAME ("ds_result_pop_from_bottom");
@@ -296,10 +296,10 @@
 
 acpi_status
 acpi_ds_result_push (
-	acpi_operand_object     *object,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *object,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_NAME ("ds_result_push");
@@ -328,7 +328,7 @@
 	state->results.num_results++;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
-		object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+		object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
 		walk_state, state->results.num_results, walk_state->current_result));
 
 	return (AE_OK);
@@ -350,9 +350,9 @@
 
 acpi_status
 acpi_ds_result_stack_push (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 	ACPI_FUNCTION_NAME ("ds_result_stack_push");
 
@@ -386,9 +386,9 @@
 
 acpi_status
 acpi_ds_result_stack_pop (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 	ACPI_FUNCTION_NAME ("ds_result_stack_pop");
 
@@ -429,9 +429,9 @@
 
 acpi_status
 acpi_ds_obj_stack_delete_all (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_delete_all", walk_state);
@@ -465,8 +465,8 @@
 
 acpi_status
 acpi_ds_obj_stack_push (
-	void                    *object,
-	acpi_walk_state         *walk_state)
+	void                            *object,
+	struct acpi_walk_state          *walk_state)
 {
 	ACPI_FUNCTION_NAME ("ds_obj_stack_push");
 
@@ -486,7 +486,7 @@
 	walk_state->num_operands++;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
-			  object, acpi_ut_get_object_type_name ((acpi_operand_object *) object),
+			  object, acpi_ut_get_object_type_name ((union acpi_operand_object *) object),
 			  walk_state, walk_state->num_operands));
 
 	return (AE_OK);
@@ -510,8 +510,8 @@
 
 acpi_status
 acpi_ds_obj_stack_pop_object (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state)
 {
 	ACPI_FUNCTION_NAME ("ds_obj_stack_pop_object");
 
@@ -569,10 +569,10 @@
 
 acpi_status
 acpi_ds_obj_stack_pop (
-	u32                     pop_count,
-	acpi_walk_state         *walk_state)
+	u32                             pop_count,
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
+	u32                             i;
 
 	ACPI_FUNCTION_NAME ("ds_obj_stack_pop");
 
@@ -616,11 +616,11 @@
 
 acpi_status
 acpi_ds_obj_stack_pop_and_delete (
-	u32                     pop_count,
-	acpi_walk_state         *walk_state)
+	u32                             pop_count,
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
-	acpi_operand_object     *obj_desc;
+	u32                             i;
+	union acpi_operand_object       *obj_desc;
 
 	ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete");
 
@@ -669,8 +669,8 @@
 
 void *
 acpi_ds_obj_stack_get_value (
-	u32                     index,
-	acpi_walk_state         *walk_state)
+	u32                             index,
+	struct acpi_walk_state          *walk_state)
 {
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_get_value", walk_state);
@@ -706,9 +706,9 @@
  *
  ******************************************************************************/
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_get_current_walk_state (
-	acpi_thread_state       *thread)
+	struct acpi_thread_state        *thread)
 
 {
 	ACPI_FUNCTION_NAME ("ds_get_current_walk_state");
@@ -740,8 +740,8 @@
 
 void
 acpi_ds_push_walk_state (
-	acpi_walk_state         *walk_state,
-	acpi_thread_state       *thread)
+	struct acpi_walk_state          *walk_state,
+	struct acpi_thread_state        *thread)
 {
 	ACPI_FUNCTION_TRACE ("ds_push_walk_state");
 
@@ -767,11 +767,11 @@
  *
  ******************************************************************************/
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_pop_walk_state (
-	acpi_thread_state       *thread)
+	struct acpi_thread_state        *thread)
 {
-	acpi_walk_state         *walk_state;
+	struct acpi_walk_state          *walk_state;
 
 
 	ACPI_FUNCTION_TRACE ("ds_pop_walk_state");
@@ -809,15 +809,15 @@
  *
  ******************************************************************************/
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_create_walk_state (
-	acpi_owner_id           owner_id,
-	acpi_parse_object       *origin,
-	acpi_operand_object     *mth_desc,
-	acpi_thread_state       *thread)
+	acpi_owner_id                   owner_id,
+	union acpi_parse_object         *origin,
+	union acpi_operand_object       *mth_desc,
+	struct acpi_thread_state        *thread)
 {
-	acpi_walk_state         *walk_state;
-	acpi_status             status;
+	struct acpi_walk_state          *walk_state;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ds_create_walk_state");
@@ -873,18 +873,18 @@
 
 acpi_status
 acpi_ds_init_aml_walk (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_namespace_node     *method_node,
-	u8                      *aml_start,
-	u32                     aml_length,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc,
-	u32                     pass_number)
-{
-	acpi_status             status;
-	acpi_parse_state        *parser_state = &walk_state->parser_state;
-	acpi_parse_object       *extra_op;
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *method_node,
+	u8                              *aml_start,
+	u32                             aml_length,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc,
+	u32                             pass_number)
+{
+	acpi_status                     status;
+	struct acpi_parse_state         *parser_state = &walk_state->parser_state;
+	union acpi_parse_object         *extra_op;
 
 
 	ACPI_FUNCTION_TRACE ("ds_init_aml_walk");
@@ -974,9 +974,9 @@
 
 void
 acpi_ds_delete_walk_state (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ds_delete_walk_state", walk_state);
diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c
--- a/drivers/acpi/ec.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/ec.c	Fri Jan 10 12:12:38 2003
@@ -79,14 +79,14 @@
 };
 
 struct acpi_ec {
-	acpi_handle		handle;
-	unsigned long		uid;
-	unsigned long		gpe_bit;
-	acpi_generic_address	status_addr;
-	acpi_generic_address	command_addr;
-	acpi_generic_address	data_addr;
-	unsigned long		global_lock;
-	spinlock_t		lock;
+	acpi_handle			handle;
+	unsigned long			uid;
+	unsigned long			gpe_bit;
+	struct acpi_generic_address	status_addr;
+	struct acpi_generic_address	command_addr;
+	struct acpi_generic_address	data_addr;
+	unsigned long			global_lock;
+	spinlock_t			lock;
 };
 
 /* If we find an EC via the ECDT, we need to keep a ptr to its context */
@@ -652,8 +652,8 @@
 	int			result = 0;
 	acpi_status		status = AE_OK;
 	struct acpi_ec		*ec = NULL;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_resource		*resource = NULL;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_resource	*resource = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_ec_start");
 
@@ -674,7 +674,7 @@
 		return_VALUE(-ENODEV);
 	}
 
-	resource = (acpi_resource *) buffer.pointer;
+	resource = (struct acpi_resource *) buffer.pointer;
 	if (!resource || (resource->id != ACPI_RSTYPE_IO)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid or missing resource\n"));
 		result = -ENODEV;
@@ -761,7 +761,7 @@
 	struct acpi_table_ecdt 	*ecdt_ptr;
 
 	status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING, 
-		(acpi_table_header **) &ecdt_ptr);
+		(struct acpi_table_header **) &ecdt_ptr);
 	if (ACPI_FAILURE(status))
 		return 0;
 
diff -Nru a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
--- a/drivers/acpi/events/evevent.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evevent.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
 acpi_ev_initialize (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_initialize");
@@ -99,7 +99,7 @@
 acpi_ev_handler_initialize (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_handler_initialize");
@@ -156,8 +156,8 @@
 acpi_ev_fixed_event_initialize (
 	void)
 {
-	acpi_native_uint        i;
-	acpi_status             status;
+	acpi_native_uint                i;
+	acpi_status                     status;
 
 
 	/*
@@ -199,10 +199,10 @@
 acpi_ev_fixed_event_detect (
 	void)
 {
-	u32                     int_status = ACPI_INTERRUPT_NOT_HANDLED;
-	u32                     fixed_status;
-	u32                     fixed_enable;
-	acpi_native_uint        i;
+	u32                             int_status = ACPI_INTERRUPT_NOT_HANDLED;
+	u32                             fixed_status;
+	u32                             fixed_enable;
+	acpi_native_uint                i;
 
 
 	ACPI_FUNCTION_NAME ("ev_fixed_event_detect");
@@ -252,7 +252,7 @@
 
 u32
 acpi_ev_fixed_event_dispatch (
-	u32                     event)
+	u32                             event)
 {
 
 
diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
--- a/drivers/acpi/events/evgpe.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evgpe.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,14 +45,14 @@
 acpi_status
 acpi_ev_gpe_initialize (void)
 {
-	acpi_native_uint        i;
-	acpi_native_uint        j;
-	u32                     gpe_block;
-	u32                     gpe_register;
-	u32                     gpe_number_index;
-	u32                     gpe_number;
-	acpi_gpe_register_info  *gpe_register_info;
-	acpi_status             status;
+	acpi_native_uint                i;
+	acpi_native_uint                j;
+	u32                             gpe_block;
+	u32                             gpe_register;
+	u32                             gpe_number_index;
+	u32                             gpe_number;
+	struct acpi_gpe_register_info   *gpe_register_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_gpe_initialize");
@@ -148,7 +148,7 @@
 	/* Allocate the GPE number-to-index translation table */
 
 	acpi_gbl_gpe_number_to_index = ACPI_MEM_CALLOCATE (
-			   sizeof (acpi_gpe_index_info) *
+			   sizeof (struct acpi_gpe_index_info) *
 			   ((acpi_size) acpi_gbl_gpe_number_max + 1));
 	if (!acpi_gbl_gpe_number_to_index) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -159,13 +159,13 @@
 	/* Set the Gpe index table to GPE_INVALID */
 
 	ACPI_MEMSET (acpi_gbl_gpe_number_to_index, (int) ACPI_GPE_INVALID,
-			sizeof (acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
+			sizeof (struct acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
 
 	/* Allocate the GPE register information block */
 
 	acpi_gbl_gpe_register_info = ACPI_MEM_CALLOCATE (
 			  (acpi_size) acpi_gbl_gpe_register_count *
-			  sizeof (acpi_gpe_register_info));
+			  sizeof (struct acpi_gpe_register_info));
 	if (!acpi_gbl_gpe_register_info) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Could not allocate the gpe_register_info table\n"));
@@ -178,7 +178,7 @@
 	 */
 	acpi_gbl_gpe_number_info = ACPI_MEM_CALLOCATE (
 			  ((acpi_size) acpi_gbl_gpe_register_count * ACPI_GPE_REGISTER_WIDTH) *
-			  sizeof (acpi_gpe_number_info));
+			  sizeof (struct acpi_gpe_number_info));
 	if (!acpi_gbl_gpe_number_info) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the gpe_number_info table\n"));
 		goto error_exit2;
@@ -301,16 +301,16 @@
 
 static acpi_status
 acpi_ev_save_method_info (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *obj_desc,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *obj_desc,
+	void                            **return_value)
 {
-	u32                     gpe_number;
-	u32                     gpe_number_index;
-	char                    name[ACPI_NAME_SIZE + 1];
-	u8                      type;
-	acpi_status             status;
+	u32                             gpe_number;
+	u32                             gpe_number_index;
+	char                            name[ACPI_NAME_SIZE + 1];
+	u8                              type;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("ev_save_method_info");
@@ -319,7 +319,7 @@
 	/* Extract the name from the object and convert to a string */
 
 	ACPI_MOVE_UNALIGNED32_TO_32 (name,
-			 &((acpi_namespace_node *) obj_handle)->name.integer);
+			 &((struct acpi_namespace_node *) obj_handle)->name.integer);
 	name[ACPI_NAME_SIZE] = 0;
 
 	/*
@@ -369,7 +369,7 @@
 	 * for use during dispatch of this GPE.
 	 */
 	acpi_gbl_gpe_number_info [gpe_number_index].type  = type;
-	acpi_gbl_gpe_number_info [gpe_number_index].method_node = (acpi_namespace_node *) obj_handle;
+	acpi_gbl_gpe_number_info [gpe_number_index].method_node = (struct acpi_namespace_node *) obj_handle;
 
 	/*
 	 * Enable the GPE (SCIs should be disabled at this point)
@@ -401,7 +401,7 @@
 acpi_status
 acpi_ev_init_gpe_control_methods (void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_init_gpe_control_methods");
@@ -440,14 +440,14 @@
 u32
 acpi_ev_gpe_detect (void)
 {
-	u32                     int_status = ACPI_INTERRUPT_NOT_HANDLED;
-	u32                     i;
-	u32                     j;
-	u8                      enabled_status_byte;
-	u8                      bit_mask;
-	acpi_gpe_register_info  *gpe_register_info;
-	u32                     in_value;
-	acpi_status             status;
+	u32                             int_status = ACPI_INTERRUPT_NOT_HANDLED;
+	u32                             i;
+	u32                             j;
+	u8                              enabled_status_byte;
+	u8                              bit_mask;
+	struct acpi_gpe_register_info   *gpe_register_info;
+	u32                             in_value;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("ev_gpe_detect");
@@ -528,12 +528,12 @@
 
 static void ACPI_SYSTEM_XFACE
 acpi_ev_asynch_execute_gpe_method (
-	void                    *context)
+	void                            *context)
 {
-	u32                     gpe_number = (u32) ACPI_TO_INTEGER (context);
-	u32                     gpe_number_index;
-	acpi_gpe_number_info    gpe_info;
-	acpi_status             status;
+	u32                             gpe_number = (u32) ACPI_TO_INTEGER (context);
+	u32                             gpe_number_index;
+	struct acpi_gpe_number_info     gpe_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_asynch_execute_gpe_method");
@@ -607,11 +607,11 @@
 
 u32
 acpi_ev_gpe_dispatch (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     gpe_number_index;
-	acpi_gpe_number_info    *gpe_info;
-	acpi_status             status;
+	u32                             gpe_number_index;
+	struct acpi_gpe_number_info     *gpe_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_gpe_dispatch");
diff -Nru a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
--- a/drivers/acpi/events/evmisc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evmisc.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@
 
 u8
 acpi_ev_is_notify_object (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
 	switch (node->type) {
 	case ACPI_TYPE_DEVICE:
@@ -80,7 +80,7 @@
 
 u32
 acpi_ev_get_gpe_register_index (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
 
 	if (gpe_number > acpi_gbl_gpe_number_max) {
@@ -106,7 +106,7 @@
 
 u32
 acpi_ev_get_gpe_number_index (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
 
 	if (gpe_number > acpi_gbl_gpe_number_max) {
@@ -132,13 +132,13 @@
 
 acpi_status
 acpi_ev_queue_notify_request (
-	acpi_namespace_node     *node,
-	u32                     notify_value)
+	struct acpi_namespace_node      *node,
+	u32                             notify_value)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *handler_obj = NULL;
-	acpi_generic_state      *notify_info;
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *handler_obj = NULL;
+	union acpi_generic_state        *notify_info;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_NAME ("ev_queue_notify_request");
@@ -250,12 +250,12 @@
 
 void ACPI_SYSTEM_XFACE
 acpi_ev_notify_dispatch (
-	void                    *context)
+	void                            *context)
 {
-	acpi_generic_state      *notify_info = (acpi_generic_state *) context;
-	acpi_notify_handler     global_handler = NULL;
-	void                    *global_context = NULL;
-	acpi_operand_object     *handler_obj;
+	union acpi_generic_state        *notify_info = (union acpi_generic_state *) context;
+	acpi_notify_handler             global_handler = NULL;
+	void                            *global_context = NULL;
+	union acpi_operand_object       *handler_obj;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -316,9 +316,9 @@
 
 static void ACPI_SYSTEM_XFACE
 acpi_ev_global_lock_thread (
-	void                    *context)
+	void                            *context)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	/* Signal threads that are waiting for the lock */
@@ -349,10 +349,10 @@
 
 static u32
 acpi_ev_global_lock_handler (
-	void                    *context)
+	void                            *context)
 {
-	u8                      acquired = FALSE;
-	acpi_status             status;
+	u8                              acquired = FALSE;
+	acpi_status                     status;
 
 
 	/*
@@ -395,7 +395,7 @@
 acpi_status
 acpi_ev_init_global_lock_handler (void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_init_global_lock_handler");
@@ -433,10 +433,10 @@
 
 acpi_status
 acpi_ev_acquire_global_lock (
-	u16                     timeout)
+	u16                             timeout)
 {
-	acpi_status             status = AE_OK;
-	u8                      acquired = FALSE;
+	acpi_status                     status = AE_OK;
+	u8                              acquired = FALSE;
 
 
 	ACPI_FUNCTION_TRACE ("ev_acquire_global_lock");
@@ -499,8 +499,8 @@
 acpi_status
 acpi_ev_release_global_lock (void)
 {
-	u8                      pending = FALSE;
-	acpi_status             status = AE_OK;
+	u8                              pending = FALSE;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ev_release_global_lock");
@@ -554,8 +554,8 @@
 void
 acpi_ev_terminate (void)
 {
-	acpi_native_uint        i;
-	acpi_status             status;
+	acpi_native_uint                i;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_terminate");
diff -Nru a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
--- a/drivers/acpi/events/evregion.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/events/evregion.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@
 acpi_ev_init_address_spaces (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_init_address_spaces");
@@ -121,12 +121,12 @@
 
 static acpi_status
 acpi_ev_execute_reg_method (
-	acpi_operand_object    *region_obj,
-	u32                     function)
+	union acpi_operand_object      *region_obj,
+	u32                             function)
 {
-	acpi_operand_object    *params[3];
-	acpi_operand_object    *region_obj2;
-	acpi_status             status;
+	union acpi_operand_object      *params[3];
+	union acpi_operand_object      *region_obj2;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_execute_reg_method");
@@ -203,19 +203,19 @@
 
 acpi_status
 acpi_ev_address_space_dispatch (
-	acpi_operand_object     *region_obj,
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	void                    *value)
+	union acpi_operand_object       *region_obj,
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	void                            *value)
 {
-	acpi_status             status;
-	acpi_status             status2;
-	acpi_adr_space_handler  handler;
-	acpi_adr_space_setup    region_setup;
-	acpi_operand_object     *handler_desc;
-	acpi_operand_object     *region_obj2;
-	void                    *region_context = NULL;
+	acpi_status                     status;
+	acpi_status                     status2;
+	acpi_adr_space_handler          handler;
+	acpi_adr_space_setup            region_setup;
+	union acpi_operand_object       *handler_desc;
+	union acpi_operand_object       *region_obj2;
+	void                            *region_context = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("ev_address_space_dispatch");
@@ -352,16 +352,16 @@
 
 void
 acpi_ev_detach_region(
-	acpi_operand_object     *region_obj,
-	u8                      acpi_ns_is_locked)
+	union acpi_operand_object       *region_obj,
+	u8                              acpi_ns_is_locked)
 {
-	acpi_operand_object     *handler_obj;
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     **last_obj_ptr;
-	acpi_adr_space_setup    region_setup;
-	void                    *region_context;
-	acpi_operand_object     *region_obj2;
-	acpi_status             status;
+	union acpi_operand_object       *handler_obj;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       **last_obj_ptr;
+	acpi_adr_space_setup            region_setup;
+	void                            *region_context;
+	union acpi_operand_object       *region_obj2;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_detach_region");
@@ -498,12 +498,12 @@
 
 acpi_status
 acpi_ev_attach_region (
-	acpi_operand_object     *handler_obj,
-	acpi_operand_object     *region_obj,
-	u8                      acpi_ns_is_locked)
+	union acpi_operand_object       *handler_obj,
+	union acpi_operand_object       *region_obj,
+	u8                              acpi_ns_is_locked)
 {
-	acpi_status             status;
-	acpi_status             status2;
+	acpi_status                     status;
+	acpi_status                     status2;
 
 
 	ACPI_FUNCTION_TRACE ("ev_attach_region");
@@ -570,22 +570,22 @@
 
 acpi_status
 acpi_ev_addr_handler_helper (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_operand_object     *handler_obj;
-	acpi_operand_object     *tmp_obj;
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	union acpi_operand_object       *handler_obj;
+	union acpi_operand_object       *tmp_obj;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("ev_addr_handler_helper");
 
 
-	handler_obj = (acpi_operand_object *) context;
+	handler_obj = (union acpi_operand_object   *) context;
 
 	/* Parameter validation */
 
diff -Nru a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
--- a/drivers/acpi/events/evrgnini.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/events/evrgnini.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,13 +48,13 @@
 
 acpi_status
 acpi_ev_system_memory_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
-	acpi_operand_object     *region_desc = (acpi_operand_object *) handle;
-	acpi_mem_space_context  *local_region_context;
+	union acpi_operand_object       *region_desc = (union acpi_operand_object *) handle;
+	struct acpi_mem_space_context   *local_region_context;
 
 
 	ACPI_FUNCTION_TRACE ("ev_system_memory_region_setup");
@@ -70,7 +70,7 @@
 
 	/* Create a new context */
 
-	local_region_context = ACPI_MEM_CALLOCATE (sizeof (acpi_mem_space_context));
+	local_region_context = ACPI_MEM_CALLOCATE (sizeof (struct acpi_mem_space_context));
 	if (!(local_region_context)) {
 		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
@@ -102,10 +102,10 @@
 
 acpi_status
 acpi_ev_io_space_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
 	ACPI_FUNCTION_TRACE ("ev_io_space_region_setup");
 
@@ -140,18 +140,18 @@
 
 acpi_status
 acpi_ev_pci_config_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
-	acpi_status             status = AE_OK;
-	acpi_integer            temp;
-	acpi_pci_id             *pci_id = *region_context;
-	acpi_operand_object     *handler_obj;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *region_obj = (acpi_operand_object *) handle;
-	acpi_device_id          object_hID;
+	acpi_status                     status = AE_OK;
+	acpi_integer                    temp;
+	struct acpi_pci_id              *pci_id = *region_context;
+	union acpi_operand_object       *handler_obj;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *region_obj = (union acpi_operand_object   *) handle;
+	struct acpi_device_id           object_hID;
 
 
 	ACPI_FUNCTION_TRACE ("ev_pci_config_region_setup");
@@ -179,7 +179,7 @@
 
 	/* Create a new context */
 
-	pci_id = ACPI_MEM_CALLOCATE (sizeof (acpi_pci_id));
+	pci_id = ACPI_MEM_CALLOCATE (sizeof (struct acpi_pci_id));
 	if (!pci_id) {
 		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
@@ -297,10 +297,10 @@
 
 acpi_status
 acpi_ev_pci_bar_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
 	ACPI_FUNCTION_TRACE ("ev_pci_bar_region_setup");
 
@@ -328,10 +328,10 @@
 
 acpi_status
 acpi_ev_cmos_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
 	ACPI_FUNCTION_TRACE ("ev_cmos_region_setup");
 
@@ -357,10 +357,10 @@
 
 acpi_status
 acpi_ev_default_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context)
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context)
 {
 	ACPI_FUNCTION_TRACE ("ev_default_region_setup");
 
@@ -400,17 +400,17 @@
 
 acpi_status
 acpi_ev_initialize_region (
-	acpi_operand_object     *region_obj,
-	u8                      acpi_ns_locked)
+	union acpi_operand_object       *region_obj,
+	u8                              acpi_ns_locked)
 {
-	acpi_operand_object     *handler_obj;
-	acpi_operand_object     *obj_desc;
-	acpi_adr_space_type     space_id;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_namespace_node     *method_node;
-	acpi_name               *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
-	acpi_operand_object     *region_obj2;
+	union acpi_operand_object       *handler_obj;
+	union acpi_operand_object       *obj_desc;
+	acpi_adr_space_type             space_id;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *method_node;
+	acpi_name                       *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
+	union acpi_operand_object       *region_obj2;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ev_initialize_region", acpi_ns_locked);
diff -Nru a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c
--- a/drivers/acpi/events/evsci.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evsci.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
 
 static u32 ACPI_SYSTEM_XFACE
 acpi_ev_sci_handler (
-	void                    *context)
+	void                            *context)
 {
-	u32                     interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
-	u32                     value;
-	acpi_status             status;
+	u32                             interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
+	u32                             value;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE("ev_sci_handler");
@@ -105,7 +105,7 @@
 u32
 acpi_ev_install_sci_handler (void)
 {
-	u32                     status = AE_OK;
+	u32                             status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ev_install_sci_handler");
@@ -139,7 +139,7 @@
 acpi_status
 acpi_ev_remove_sci_handler (void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_remove_sci_handler");
diff -Nru a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
--- a/drivers/acpi/events/evxface.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evxface.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,11 +50,11 @@
 
 acpi_status
 acpi_install_fixed_event_handler (
-	u32                     event,
-	acpi_event_handler      handler,
-	void                    *context)
+	u32                             event,
+	acpi_event_handler              handler,
+	void                            *context)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_install_fixed_event_handler");
@@ -119,10 +119,10 @@
 
 acpi_status
 acpi_remove_fixed_event_handler (
-	u32                     event,
-	acpi_event_handler      handler)
+	u32                             event,
+	acpi_event_handler              handler)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_remove_fixed_event_handler");
@@ -180,15 +180,15 @@
 
 acpi_status
 acpi_install_notify_handler (
-	acpi_handle             device,
-	u32                     handler_type,
-	acpi_notify_handler     handler,
-	void                    *context)
+	acpi_handle                     device,
+	u32                             handler_type,
+	acpi_notify_handler             handler,
+	void                            *context)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *notify_obj;
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *notify_obj;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_install_notify_handler");
@@ -335,14 +335,14 @@
 
 acpi_status
 acpi_remove_notify_handler (
-	acpi_handle             device,
-	u32                     handler_type,
-	acpi_notify_handler     handler)
+	acpi_handle                     device,
+	u32                             handler_type,
+	acpi_notify_handler             handler)
 {
-	acpi_operand_object     *notify_obj;
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	union acpi_operand_object       *notify_obj;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_remove_notify_handler");
@@ -467,13 +467,13 @@
 
 acpi_status
 acpi_install_gpe_handler (
-	u32                     gpe_number,
-	u32                     type,
-	acpi_gpe_handler        handler,
-	void                    *context)
+	u32                             gpe_number,
+	u32                             type,
+	acpi_gpe_handler                handler,
+	void                            *context)
 {
-	acpi_status             status;
-	u32                     gpe_number_index;
+	acpi_status                     status;
+	u32                             gpe_number_index;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
@@ -541,11 +541,11 @@
 
 acpi_status
 acpi_remove_gpe_handler (
-	u32                     gpe_number,
-	acpi_gpe_handler        handler)
+	u32                             gpe_number,
+	acpi_gpe_handler                handler)
 {
-	acpi_status             status;
-	u32                     gpe_number_index;
+	acpi_status                     status;
+	u32                             gpe_number_index;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
@@ -611,10 +611,10 @@
 
 acpi_status
 acpi_acquire_global_lock (
-	u16                     timeout,
-	u32                     *handle)
+	u16                             timeout,
+	u32                             *handle)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	if (!handle) {
@@ -652,9 +652,9 @@
 
 acpi_status
 acpi_release_global_lock (
-	u32                     handle)
+	u32                             handle)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	if (handle != acpi_gbl_global_lock_handle) {
diff -Nru a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
--- a/drivers/acpi/events/evxfevnt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evxfevnt.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
 acpi_status
 acpi_enable (void)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_enable");
@@ -92,7 +92,7 @@
 acpi_status
 acpi_disable (void)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_disable");
@@ -138,12 +138,12 @@
 
 acpi_status
 acpi_enable_event (
-	u32                     event,
-	u32                     type,
-	u32                     flags)
+	u32                             event,
+	u32                             type,
+	u32                             flags)
 {
-	acpi_status             status = AE_OK;
-	u32                     value;
+	acpi_status                     status = AE_OK;
+	u32                             value;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_enable_event");
@@ -232,12 +232,12 @@
 
 acpi_status
 acpi_disable_event (
-	u32                     event,
-	u32                     type,
-	u32                     flags)
+	u32                             event,
+	u32                             type,
+	u32                             flags)
 {
-	acpi_status             status = AE_OK;
-	u32                     value;
+	acpi_status                     status = AE_OK;
+	u32                             value;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_disable_event");
@@ -323,10 +323,10 @@
 
 acpi_status
 acpi_clear_event (
-	u32                     event,
-	u32                     type)
+	u32                             event,
+	u32                             type)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_clear_event");
@@ -391,11 +391,11 @@
 
 acpi_status
 acpi_get_event_status (
-	u32                     event,
-	u32                     type,
-	acpi_event_status       *event_status)
+	u32                             event,
+	u32                             type,
+	acpi_event_status               *event_status)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_event_status");
diff -Nru a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c
--- a/drivers/acpi/events/evxfregn.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/events/evxfregn.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,18 +51,18 @@
 
 acpi_status
 acpi_install_address_space_handler (
-	acpi_handle             device,
-	acpi_adr_space_type     space_id,
-	acpi_adr_space_handler  handler,
-	acpi_adr_space_setup    setup,
-	void                    *context)
+	acpi_handle                     device,
+	acpi_adr_space_type             space_id,
+	acpi_adr_space_handler          handler,
+	acpi_adr_space_setup            setup,
+	void                            *context)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *handler_obj;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_object_type        type;
-	u16                     flags = 0;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *handler_obj;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	acpi_object_type                type;
+	u16                             flags = 0;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_install_address_space_handler");
@@ -281,16 +281,16 @@
 
 acpi_status
 acpi_remove_address_space_handler (
-	acpi_handle             device,
-	acpi_adr_space_type     space_id,
-	acpi_adr_space_handler  handler)
+	acpi_handle                     device,
+	acpi_adr_space_type             space_id,
+	acpi_adr_space_handler          handler)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *handler_obj;
-	acpi_operand_object     *region_obj;
-	acpi_operand_object     **last_obj_ptr;
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *handler_obj;
+	union acpi_operand_object       *region_obj;
+	union acpi_operand_object       **last_obj_ptr;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_remove_address_space_handler");
diff -Nru a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
--- a/drivers/acpi/executer/exconfig.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exconfig.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@
 
 acpi_status
 acpi_ex_add_table (
-	acpi_table_header       *table,
-	acpi_namespace_node     *parent_node,
-	acpi_operand_object     **ddb_handle)
+	struct acpi_table_header        *table,
+	struct acpi_namespace_node      *parent_node,
+	union acpi_operand_object       **ddb_handle)
 {
-	acpi_status             status;
-	acpi_table_desc         table_info;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status;
+	struct acpi_table_desc          table_info;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ex_add_table");
@@ -121,16 +121,16 @@
 
 acpi_status
 acpi_ex_load_table_op (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     **return_desc)
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       **return_desc)
 {
-	acpi_status             status;
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_table_header       *table;
-	acpi_namespace_node     *parent_node;
-	acpi_namespace_node     *start_node;
-	acpi_namespace_node     *parameter_node = NULL;
-	acpi_operand_object     *ddb_handle;
+	acpi_status                     status;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	struct acpi_table_header        *table;
+	struct acpi_namespace_node      *parent_node;
+	struct acpi_namespace_node      *start_node;
+	struct acpi_namespace_node      *parameter_node = NULL;
+	union acpi_operand_object       *ddb_handle;
 
 
 	ACPI_FUNCTION_TRACE ("ex_load_table_op");
@@ -225,7 +225,7 @@
 	if (parameter_node) {
 		/* Store the parameter data into the optional parameter object */
 
-		status = acpi_ex_store (operand[5], ACPI_CAST_PTR (acpi_operand_object, parameter_node),
+		status = acpi_ex_store (operand[5], ACPI_CAST_PTR (union acpi_operand_object, parameter_node),
 				 walk_state);
 		if (ACPI_FAILURE (status)) {
 			(void) acpi_ex_unload_table (ddb_handle);
@@ -253,17 +253,17 @@
 
 acpi_status
 acpi_ex_load_op (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *target,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *target,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_operand_object     *ddb_handle;
-	acpi_operand_object     *buffer_desc = NULL;
-	acpi_table_header       *table_ptr = NULL;
-	u8                      *table_data_ptr;
-	acpi_table_header       table_header;
-	u32                     i;
+	acpi_status                     status;
+	union acpi_operand_object       *ddb_handle;
+	union acpi_operand_object       *buffer_desc = NULL;
+	struct acpi_table_header        *table_ptr = NULL;
+	u8                              *table_data_ptr;
+	struct acpi_table_header        table_header;
+	u32                             i;
 
 	ACPI_FUNCTION_TRACE ("ex_load_op");
 
@@ -279,7 +279,7 @@
 		/* Get the table header */
 
 		table_header.length = 0;
-		for (i = 0; i < sizeof (acpi_table_header); i++) {
+		for (i = 0; i < sizeof (struct acpi_table_header); i++) {
 			status = acpi_ev_address_space_dispatch (obj_desc, ACPI_READ,
 					   (acpi_physical_address) i, 8,
 					   ((u8 *) &table_header) + i);
@@ -297,8 +297,8 @@
 
 		/* Copy the header to the buffer */
 
-		ACPI_MEMCPY (table_ptr, &table_header, sizeof (acpi_table_header));
-		table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (acpi_table_header));
+		ACPI_MEMCPY (table_ptr, &table_header, sizeof (struct acpi_table_header));
+		table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (struct acpi_table_header));
 
 		/* Get the table from the op region */
 
@@ -331,7 +331,7 @@
 			goto cleanup;
 		}
 
-		table_ptr = ACPI_CAST_PTR (acpi_table_header, buffer_desc->buffer.pointer);
+		table_ptr = ACPI_CAST_PTR (struct acpi_table_header, buffer_desc->buffer.pointer);
 		break;
 
 
@@ -397,11 +397,11 @@
 
 acpi_status
 acpi_ex_unload_table (
-	acpi_operand_object     *ddb_handle)
+	union acpi_operand_object       *ddb_handle)
 {
-	acpi_status             status = AE_NOT_IMPLEMENTED;
-	acpi_operand_object     *table_desc = ddb_handle;
-	acpi_table_desc         *table_info;
+	acpi_status                     status = AE_NOT_IMPLEMENTED;
+	union acpi_operand_object       *table_desc = ddb_handle;
+	struct acpi_table_desc          *table_info;
 
 
 	ACPI_FUNCTION_TRACE ("ex_unload_table");
@@ -421,7 +421,7 @@
 
 	/* Get the actual table descriptor from the ddb_handle */
 
-	table_info = (acpi_table_desc *) table_desc->reference.object;
+	table_info = (struct acpi_table_desc *) table_desc->reference.object;
 
 	/*
 	 * Delete the entire namespace under this table Node
diff -Nru a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
--- a/drivers/acpi/executer/exconvrt.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/executer/exconvrt.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,16 +48,16 @@
 
 acpi_status
 acpi_ex_convert_to_integer (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	u32                     i;
-	acpi_operand_object     *ret_desc;
-	u32                     count;
-	u8                      *pointer;
-	acpi_integer            result;
-	acpi_status             status;
+	u32                             i;
+	union acpi_operand_object       *ret_desc;
+	u32                             count;
+	u8                              *pointer;
+	acpi_integer                    result;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_integer", obj_desc);
@@ -182,13 +182,13 @@
 
 acpi_status
 acpi_ex_convert_to_buffer (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *ret_desc;
-	u32                     i;
-	u8                      *new_buf;
+	union acpi_operand_object       *ret_desc;
+	u32                             i;
+	u8                              *new_buf;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_buffer", obj_desc);
@@ -283,19 +283,19 @@
 
 u32
 acpi_ex_convert_to_ascii (
-	acpi_integer            integer,
-	u32                     base,
-	u8                      *string,
-	u8                      data_width)
+	acpi_integer                    integer,
+	u32                             base,
+	u8                              *string,
+	u8                              data_width)
 {
-	u32                     i;
-	u32                     j;
-	u32                     k = 0;
-	char                    hex_digit;
-	acpi_integer            digit;
-	u32                     remainder;
-	u32                     length;
-	u8                      leading_zero;
+	u32                             i;
+	u32                             j;
+	u32                             k = 0;
+	char                            hex_digit;
+	acpi_integer                    digit;
+	u32                             remainder;
+	u32                             length;
+	u8                              leading_zero;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -389,17 +389,17 @@
 
 acpi_status
 acpi_ex_convert_to_string (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	u32                     base,
-	u32                     max_length,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	u32                             base,
+	u32                             max_length,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *ret_desc;
-	u32                     i;
-	u32                     string_length;
-	u8                      *new_buf;
-	u8                      *pointer;
+	union acpi_operand_object       *ret_desc;
+	u32                             i;
+	u32                             string_length;
+	u8                              *new_buf;
+	u8                              *pointer;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_string", obj_desc);
@@ -553,12 +553,12 @@
 
 acpi_status
 acpi_ex_convert_to_target_type (
-	acpi_object_type        destination_type,
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state)
+	acpi_object_type                destination_type,
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_convert_to_target_type");
diff -Nru a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
--- a/drivers/acpi/executer/excreate.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/excreate.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,11 +50,11 @@
 
 acpi_status
 acpi_ex_create_alias (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_namespace_node     *target_node;
-	acpi_namespace_node     *alias_node;
-	acpi_status             status = AE_OK;
+	struct acpi_namespace_node      *target_node;
+	struct acpi_namespace_node      *alias_node;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_create_alias");
@@ -62,8 +62,8 @@
 
 	/* Get the source/alias operands (both namespace nodes) */
 
-	alias_node = (acpi_namespace_node *) walk_state->operands[0];
-	target_node = (acpi_namespace_node *) walk_state->operands[1];
+	alias_node = (struct acpi_namespace_node *) walk_state->operands[0];
+	target_node = (struct acpi_namespace_node *) walk_state->operands[1];
 
 	if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) {
 		/*
@@ -72,7 +72,7 @@
 		 * always exactly one level of indirection away from the
 		 * actual aliased name.
 		 */
-		target_node = (acpi_namespace_node *) target_node->object;
+		target_node = (struct acpi_namespace_node *) target_node->object;
 	}
 
 	/*
@@ -95,7 +95,7 @@
 		 * types, the object can change dynamically via a Store.
 		 */
 		alias_node->type = ACPI_TYPE_LOCAL_ALIAS;
-		alias_node->object = ACPI_CAST_PTR (acpi_operand_object, target_node);
+		alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node);
 		break;
 
 	default:
@@ -134,10 +134,10 @@
 
 acpi_status
 acpi_ex_create_event (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ex_create_event");
@@ -161,7 +161,7 @@
 
 	/* Attach object to the Node */
 
-	status = acpi_ns_attach_object ((acpi_namespace_node *) walk_state->operands[0],
+	status = acpi_ns_attach_object ((struct acpi_namespace_node *) walk_state->operands[0],
 			   obj_desc, ACPI_TYPE_EVENT);
 
 cleanup:
@@ -190,10 +190,10 @@
 
 acpi_status
 acpi_ex_create_mutex (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_create_mutex", ACPI_WALK_OPERANDS);
@@ -220,7 +220,7 @@
 	/* Init object and attach to NS node */
 
 	obj_desc->mutex.sync_level = (u8) walk_state->operands[1]->integer.value;
-	obj_desc->mutex.node = (acpi_namespace_node *) walk_state->operands[0];
+	obj_desc->mutex.node = (struct acpi_namespace_node *) walk_state->operands[0];
 
 	status = acpi_ns_attach_object (obj_desc->mutex.node,
 			 obj_desc, ACPI_TYPE_MUTEX);
@@ -253,15 +253,15 @@
 
 acpi_status
 acpi_ex_create_region (
-	u8                      *aml_start,
-	u32                     aml_length,
-	u8                      region_space,
-	acpi_walk_state         *walk_state)
+	u8                              *aml_start,
+	u32                             aml_length,
+	u8                              region_space,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *node;
-	acpi_operand_object     *region_obj2;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *node;
+	union acpi_operand_object       *region_obj2;
 
 
 	ACPI_FUNCTION_TRACE ("ex_create_region");
@@ -344,14 +344,14 @@
 
 acpi_status
 acpi_ex_create_table_region (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *node;
-	acpi_table_header       *table;
-	acpi_operand_object     *region_obj2;
+	acpi_status                     status;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *node;
+	struct acpi_table_header        *table;
+	union acpi_operand_object       *region_obj2;
 
 
 	ACPI_FUNCTION_TRACE ("ex_create_table_region");
@@ -441,11 +441,11 @@
 
 acpi_status
 acpi_ex_create_processor (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_create_processor", walk_state);
@@ -467,7 +467,7 @@
 
 	/* Install the processor object in the parent Node */
 
-	status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+	status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
 			  obj_desc, ACPI_TYPE_PROCESSOR);
 
 
@@ -494,11 +494,11 @@
 
 acpi_status
 acpi_ex_create_power_resource (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_create_power_resource", walk_state);
@@ -518,7 +518,7 @@
 
 	/* Install the  power resource object in the parent Node */
 
-	status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+	status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
 			  obj_desc, ACPI_TYPE_POWER);
 
 
@@ -546,14 +546,14 @@
 
 acpi_status
 acpi_ex_create_method (
-	u8                      *aml_start,
-	u32                     aml_length,
-	acpi_walk_state         *walk_state)
+	u8                              *aml_start,
+	u32                             aml_length,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
-	u8                      method_flags;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
+	u8                              method_flags;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_create_method", walk_state);
@@ -597,7 +597,7 @@
 
 	/* Attach the new object to the method Node */
 
-	status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+	status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
 			  obj_desc, ACPI_TYPE_METHOD);
 
 	/* Remove local reference to the object */
diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
--- a/drivers/acpi/executer/exdump.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/executer/exdump.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,12 +53,12 @@
 
 void
 acpi_ex_dump_operand (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	u8                      *buf = NULL;
-	u32                     length;
-	acpi_operand_object     **element;
-	u16                     element_index;
+	u8                              *buf = NULL;
+	u32                             length;
+	union acpi_operand_object       **element;
+	u16                             element_index;
 
 
 	ACPI_FUNCTION_NAME ("ex_dump_operand")
@@ -86,7 +86,7 @@
 
 	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", obj_desc));
-		ACPI_DUMP_BUFFER (obj_desc, sizeof (acpi_operand_object));
+		ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
 		return;
 	}
 
@@ -383,16 +383,16 @@
 
 void
 acpi_ex_dump_operands (
-	acpi_operand_object     **operands,
-	acpi_interpreter_mode   interpreter_mode,
-	char                    *ident,
-	u32                     num_levels,
-	char                    *note,
-	char                    *module_name,
-	u32                     line_number)
+	union acpi_operand_object       **operands,
+	acpi_interpreter_mode           interpreter_mode,
+	char                            *ident,
+	u32                             num_levels,
+	char                            *note,
+	char                            *module_name,
+	u32                             line_number)
 {
-	acpi_native_uint        i;
-	acpi_operand_object     **obj_desc;
+	acpi_native_uint                i;
+	union acpi_operand_object       **obj_desc;
 
 
 	ACPI_FUNCTION_NAME ("ex_dump_operands");
@@ -443,32 +443,32 @@
 
 void
 acpi_ex_out_string (
-	char                    *title,
-	char                    *value)
+	char                            *title,
+	char                            *value)
 {
 	acpi_os_printf ("%20s : %s\n", title, value);
 }
 
 void
 acpi_ex_out_pointer (
-	char                    *title,
-	void                    *value)
+	char                            *title,
+	void                            *value)
 {
 	acpi_os_printf ("%20s : %p\n", title, value);
 }
 
 void
 acpi_ex_out_integer (
-	char                    *title,
-	u32                     value)
+	char                            *title,
+	u32                             value)
 {
 	acpi_os_printf ("%20s : %X\n", title, value);
 }
 
 void
 acpi_ex_out_address (
-	char                    *title,
-	acpi_physical_address   value)
+	char                            *title,
+	acpi_physical_address           value)
 {
 
 #if ACPI_MACHINE_WIDTH == 16
@@ -493,8 +493,8 @@
 
 void
 acpi_ex_dump_node (
-	acpi_namespace_node     *node,
-	u32                     flags)
+	struct acpi_namespace_node      *node,
+	u32                             flags)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -531,10 +531,10 @@
 
 void
 acpi_ex_dump_object_descriptor (
-	acpi_operand_object     *obj_desc,
-	u32                     flags)
+	union acpi_operand_object       *obj_desc,
+	u32                             flags)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor");
@@ -547,9 +547,9 @@
 	}
 
 	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
-		acpi_ex_dump_node ((acpi_namespace_node *) obj_desc, flags);
-		acpi_os_printf ("\nAttached Object (%p):\n", ((acpi_namespace_node *) obj_desc)->object);
-		acpi_ex_dump_object_descriptor (((acpi_namespace_node *) obj_desc)->object, flags);
+		acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags);
+		acpi_os_printf ("\nAttached Object (%p):\n", ((struct acpi_namespace_node *) obj_desc)->object);
+		acpi_ex_dump_object_descriptor (((struct acpi_namespace_node *) obj_desc)->object, flags);
 		return;
 	}
 
diff -Nru a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c
--- a/drivers/acpi/executer/exfield.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/executer/exfield.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,15 +49,15 @@
 
 acpi_status
 acpi_ex_read_data_from_field (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **ret_buffer_desc)
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **ret_buffer_desc)
 {
-	acpi_status             status;
-	acpi_operand_object     *buffer_desc;
-	acpi_size               length;
-	void                    *buffer;
-	u8                      locked;
+	acpi_status                     status;
+	union acpi_operand_object       *buffer_desc;
+	acpi_size                       length;
+	void                            *buffer;
+	u8                              locked;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_read_data_from_field", obj_desc);
@@ -186,17 +186,17 @@
 
 acpi_status
 acpi_ex_write_data_to_field (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc)
 {
-	acpi_status             status;
-	u32                     length;
-	u32                     required_length;
-	void                    *buffer;
-	void                    *new_buffer;
-	u8                      locked;
-	acpi_operand_object     *buffer_desc;
+	acpi_status                     status;
+	u32                             length;
+	u32                             required_length;
+	void                            *buffer;
+	void                            *new_buffer;
+	u8                              locked;
+	union acpi_operand_object       *buffer_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_write_data_to_field", obj_desc);
diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
--- a/drivers/acpi/executer/exfldio.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exfldio.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,11 +51,11 @@
 
 acpi_status
 acpi_ex_setup_region (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset)
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *rgn_desc;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *rgn_desc;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ex_setup_region", field_datum_byte_offset);
@@ -147,14 +147,14 @@
 
 acpi_status
 acpi_ex_access_region (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset,
-	acpi_integer            *value,
-	u32                     function)
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset,
+	acpi_integer                    *value,
+	u32                             function)
 {
-	acpi_status             status;
-	acpi_operand_object     *rgn_desc;
-	acpi_physical_address   address;
+	acpi_status                     status;
+	union acpi_operand_object       *rgn_desc;
+	acpi_physical_address           address;
 
 
 	ACPI_FUNCTION_TRACE ("ex_access_region");
@@ -240,8 +240,8 @@
 
 u8
 acpi_ex_register_overflow (
-	acpi_operand_object     *obj_desc,
-	acpi_integer            value)
+	union acpi_operand_object       *obj_desc,
+	acpi_integer                    value)
 {
 
 	if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) {
@@ -286,13 +286,13 @@
 
 acpi_status
 acpi_ex_field_datum_io (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset,
-	acpi_integer            *value,
-	u32                     read_write)
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset,
+	acpi_integer                    *value,
+	u32                             read_write)
 {
-	acpi_status             status;
-	acpi_integer            local_value;
+	acpi_status                     status;
+	acpi_integer                    local_value;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ex_field_datum_io", field_datum_byte_offset);
@@ -465,14 +465,14 @@
 
 acpi_status
 acpi_ex_write_with_update_rule (
-	acpi_operand_object     *obj_desc,
-	acpi_integer            mask,
-	acpi_integer            field_value,
-	u32                     field_datum_byte_offset)
+	union acpi_operand_object       *obj_desc,
+	acpi_integer                    mask,
+	acpi_integer                    field_value,
+	u32                             field_datum_byte_offset)
 {
-	acpi_status             status = AE_OK;
-	acpi_integer            merged_value;
-	acpi_integer            current_value;
+	acpi_status                     status = AE_OK;
+	acpi_integer                    merged_value;
+	acpi_integer                    current_value;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ex_write_with_update_rule", mask);
@@ -562,10 +562,10 @@
 
 void
 acpi_ex_get_buffer_datum(
-	acpi_integer            *datum,
-	void                    *buffer,
-	u32                     byte_granularity,
-	u32                     offset)
+	acpi_integer                    *datum,
+	void                            *buffer,
+	u32                             byte_granularity,
+	u32                             offset)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -618,10 +618,10 @@
 
 void
 acpi_ex_set_buffer_datum (
-	acpi_integer            merged_datum,
-	void                    *buffer,
-	u32                     byte_granularity,
-	u32                     offset)
+	acpi_integer                    merged_datum,
+	void                            *buffer,
+	u32                             byte_granularity,
+	u32                             offset)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -670,18 +670,18 @@
 
 acpi_status
 acpi_ex_extract_from_field (
-	acpi_operand_object     *obj_desc,
-	void                    *buffer,
-	u32                     buffer_length)
+	union acpi_operand_object       *obj_desc,
+	void                            *buffer,
+	u32                             buffer_length)
 {
-	acpi_status             status;
-	u32                     field_datum_byte_offset;
-	u32                     datum_offset;
-	acpi_integer            previous_raw_datum;
-	acpi_integer            this_raw_datum = 0;
-	acpi_integer            merged_datum = 0;
-	u32                     byte_field_length;
-	u32                     datum_count;
+	acpi_status                     status;
+	u32                             field_datum_byte_offset;
+	u32                             datum_offset;
+	acpi_integer                    previous_raw_datum;
+	acpi_integer                    this_raw_datum = 0;
+	acpi_integer                    merged_datum = 0;
+	u32                             byte_field_length;
+	u32                             datum_count;
 
 
 	ACPI_FUNCTION_TRACE ("ex_extract_from_field");
@@ -846,19 +846,19 @@
 
 acpi_status
 acpi_ex_insert_into_field (
-	acpi_operand_object     *obj_desc,
-	void                    *buffer,
-	u32                     buffer_length)
+	union acpi_operand_object       *obj_desc,
+	void                            *buffer,
+	u32                             buffer_length)
 {
-	acpi_status             status;
-	u32                     field_datum_byte_offset;
-	u32                     datum_offset;
-	acpi_integer            mask;
-	acpi_integer            merged_datum;
-	acpi_integer            previous_raw_datum;
-	acpi_integer            this_raw_datum;
-	u32                     byte_field_length;
-	u32                     datum_count;
+	acpi_status                     status;
+	u32                             field_datum_byte_offset;
+	u32                             datum_offset;
+	acpi_integer                    mask;
+	acpi_integer                    merged_datum;
+	acpi_integer                    previous_raw_datum;
+	acpi_integer                    this_raw_datum;
+	u32                             byte_field_length;
+	u32                             datum_count;
 
 
 	ACPI_FUNCTION_TRACE ("ex_insert_into_field");
diff -Nru a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
--- a/drivers/acpi/executer/exmisc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exmisc.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
 
 acpi_status
 acpi_ex_get_object_reference (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **return_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **return_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *reference_obj;
-	acpi_operand_object     *referenced_obj;
+	union acpi_operand_object       *reference_obj;
+	union acpi_operand_object       *referenced_obj;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_get_object_reference", obj_desc);
@@ -142,17 +142,17 @@
 
 acpi_status
 acpi_ex_concat_template (
-	acpi_operand_object     *obj_desc1,
-	acpi_operand_object     *obj_desc2,
-	acpi_operand_object     **actual_return_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc1,
+	union acpi_operand_object       *obj_desc2,
+	union acpi_operand_object       **actual_return_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *return_desc;
-	u8                      *new_buf;
-	u8                      *end_tag1;
-	u8                      *end_tag2;
-	acpi_size               length1;
-	acpi_size               length2;
+	union acpi_operand_object       *return_desc;
+	u8                              *new_buf;
+	u8                              *end_tag1;
+	u8                              *end_tag2;
+	acpi_size                       length1;
+	acpi_size                       length2;
 
 
 	ACPI_FUNCTION_TRACE ("ex_concat_template");
@@ -215,16 +215,16 @@
 
 acpi_status
 acpi_ex_do_concatenate (
-	acpi_operand_object     *obj_desc1,
-	acpi_operand_object     *obj_desc2,
-	acpi_operand_object     **actual_return_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc1,
+	union acpi_operand_object       *obj_desc2,
+	union acpi_operand_object       **actual_return_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	u32                     i;
-	acpi_integer            this_integer;
-	acpi_operand_object     *return_desc;
-	char                    *new_buf;
+	acpi_status                     status;
+	u32                             i;
+	acpi_integer                    this_integer;
+	union acpi_operand_object       *return_desc;
+	char                            *new_buf;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -363,9 +363,9 @@
 
 acpi_integer
 acpi_ex_do_math_op (
-	u16                     opcode,
-	acpi_integer            operand0,
-	acpi_integer            operand1)
+	u16                             opcode,
+	acpi_integer                    operand0,
+	acpi_integer                    operand1)
 {
 
 
@@ -449,9 +449,9 @@
 
 u8
 acpi_ex_do_logical_op (
-	u16                     opcode,
-	acpi_integer            operand0,
-	acpi_integer            operand1)
+	u16                             opcode,
+	acpi_integer                    operand0,
+	acpi_integer                    operand1)
 {
 
 
diff -Nru a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
--- a/drivers/acpi/executer/exmutex.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exmutex.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,9 +45,9 @@
 
 void
 acpi_ex_unlink_mutex (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_thread_state       *thread = obj_desc->mutex.owner_thread;
+	struct acpi_thread_state        *thread = obj_desc->mutex.owner_thread;
 
 
 	if (!thread) {
@@ -82,10 +82,10 @@
 
 void
 acpi_ex_link_mutex (
-	acpi_operand_object     *obj_desc,
-	acpi_thread_state       *thread)
+	union acpi_operand_object       *obj_desc,
+	struct acpi_thread_state        *thread)
 {
-	acpi_operand_object     *list_head;
+	union acpi_operand_object       *list_head;
 
 
 	list_head = thread->acquired_mutex_list;
@@ -122,11 +122,11 @@
 
 acpi_status
 acpi_ex_acquire_mutex (
-	acpi_operand_object     *time_desc,
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *time_desc,
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_acquire_mutex", obj_desc);
@@ -206,10 +206,10 @@
 
 acpi_status
 acpi_ex_release_mutex (
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ex_release_mutex");
@@ -297,11 +297,11 @@
 
 void
 acpi_ex_release_all_mutexes (
-	acpi_thread_state       *thread)
+	struct acpi_thread_state        *thread)
 {
-	acpi_operand_object     *next = thread->acquired_mutex_list;
-	acpi_operand_object     *this;
-	acpi_status             status;
+	union acpi_operand_object       *next = thread->acquired_mutex_list;
+	union acpi_operand_object       *this;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c
--- a/drivers/acpi/executer/exnames.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exnames.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -58,12 +58,12 @@
 
 char *
 acpi_ex_allocate_name_string (
-	u32                     prefix_count,
-	u32                     num_name_segs)
+	u32                             prefix_count,
+	u32                             num_name_segs)
 {
-	char                    *temp_ptr;
-	char                    *name_string;
-	u32                      size_needed;
+	char                            *temp_ptr;
+	char                            *name_string;
+	u32                              size_needed;
 
 	ACPI_FUNCTION_TRACE ("ex_allocate_name_string");
 
@@ -143,13 +143,13 @@
 
 acpi_status
 acpi_ex_name_segment (
-	u8                      **in_aml_address,
-	char                    *name_string)
+	u8                              **in_aml_address,
+	char                            *name_string)
 {
-	char                    *aml_address = (void *) *in_aml_address;
-	acpi_status             status = AE_OK;
-	u32                     index;
-	char                    char_buf[5];
+	char                            *aml_address = (void *) *in_aml_address;
+	acpi_status                     status = AE_OK;
+	u32                             index;
+	char                            char_buf[5];
 
 
 	ACPI_FUNCTION_TRACE ("ex_name_segment");
@@ -230,17 +230,17 @@
 
 acpi_status
 acpi_ex_get_name_string (
-	acpi_object_type        data_type,
-	u8                      *in_aml_address,
-	char                    **out_name_string,
-	u32                     *out_name_length)
+	acpi_object_type                data_type,
+	u8                              *in_aml_address,
+	char                            **out_name_string,
+	u32                             *out_name_length)
 {
-	acpi_status             status = AE_OK;
-	u8                      *aml_address = in_aml_address;
-	char                    *name_string = NULL;
-	u32                     num_segments;
-	u32                     prefix_count = 0;
-	u8                      has_prefix = FALSE;
+	acpi_status                     status = AE_OK;
+	u8                              *aml_address = in_aml_address;
+	char                            *name_string = NULL;
+	u32                             num_segments;
+	u32                             prefix_count = 0;
+	u8                              has_prefix = FALSE;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_get_name_string", aml_address);
diff -Nru a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
--- a/drivers/acpi/executer/exoparg1.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exoparg1.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -73,10 +73,10 @@
 
 acpi_status
 acpi_ex_opcode_1A_0T_0R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -148,10 +148,10 @@
 
 acpi_status
 acpi_ex_opcode_1A_1T_0R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     **operand = &walk_state->operands[0];
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -195,16 +195,16 @@
 
 acpi_status
 acpi_ex_opcode_1A_1T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc = NULL;
-	acpi_operand_object     *return_desc2 = NULL;
-	u32                     temp32;
-	u32                     i;
-	u32                     j;
-	acpi_integer            digit;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc = NULL;
+	union acpi_operand_object       *return_desc2 = NULL;
+	u32                             temp32;
+	u32                             i;
+	u32                             j;
+	acpi_integer                    digit;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -338,7 +338,7 @@
 			 * different than the return value stored in the result descriptor
 			 * (There are really two return values)
 			 */
-			if ((acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
+			if ((struct acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
 				/*
 				 * This means that the object does not exist in the namespace,
 				 * return FALSE
@@ -486,14 +486,14 @@
 
 acpi_status
 acpi_ex_opcode_1A_0T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *temp_desc;
-	acpi_operand_object     *return_desc = NULL;
-	acpi_status             status = AE_OK;
-	u32                     type;
-	acpi_integer            value;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *temp_desc;
+	union acpi_operand_object       *return_desc = NULL;
+	acpi_status                     status = AE_OK;
+	u32                             type;
+	acpi_integer                    value;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -695,13 +695,13 @@
 				 */
 				status = acpi_ns_get_node_by_path (operand[0]->string.pointer,
 						  walk_state->scope_info->scope.node, ACPI_NS_SEARCH_PARENT,
-						  ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc));
+						  ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc));
 				if (ACPI_FAILURE (status)) {
 					goto cleanup;
 				}
 
 				status = acpi_ex_resolve_node_to_value (
-						  ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc), walk_state);
+						  ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc), walk_state);
 				goto cleanup;
 
 
@@ -720,7 +720,7 @@
 			 * Get the actual object from the Node (This is the dereference).
 			 * -- This case may only happen when a local_x or arg_x is dereferenced above.
 			 */
-			return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) operand[0]);
+			return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) operand[0]);
 		}
 		else {
 			/*
@@ -802,7 +802,7 @@
 
 				if (ACPI_GET_DESCRIPTOR_TYPE (return_desc) == ACPI_DESC_TYPE_NAMED) {
 
-					return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) return_desc);
+					return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) return_desc);
 				}
 
 				/* Add another reference to the object! */
diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
--- a/drivers/acpi/executer/exoparg2.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exoparg2.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -74,11 +74,11 @@
 
 acpi_status
 acpi_ex_opcode_2A_0T_0R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_namespace_node     *node;
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	struct acpi_namespace_node      *node;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_0R",
@@ -92,7 +92,7 @@
 
 		/* The first operand is a namespace node */
 
-		node = (acpi_namespace_node *) operand[0];
+		node = (struct acpi_namespace_node *) operand[0];
 
 		/* Notifies allowed on this object? */
 
@@ -142,12 +142,12 @@
 
 acpi_status
 acpi_ex_opcode_2A_2T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc1 = NULL;
-	acpi_operand_object     *return_desc2 = NULL;
-	acpi_status             status;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc1 = NULL;
+	union acpi_operand_object       *return_desc2 = NULL;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_2T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -239,14 +239,14 @@
 
 acpi_status
 acpi_ex_opcode_2A_1T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc = NULL;
-	acpi_operand_object     *temp_desc = NULL;
-	u32                     index;
-	acpi_status             status = AE_OK;
-	acpi_size               length;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc = NULL;
+	union acpi_operand_object       *temp_desc = NULL;
+	u32                             index;
+	acpi_status                     status = AE_OK;
+	acpi_size                       length;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -499,12 +499,12 @@
 
 acpi_status
 acpi_ex_opcode_2A_0T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc = NULL;
-	acpi_status             status = AE_OK;
-	u8                      logical_result = FALSE;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc = NULL;
+	acpi_status                     status = AE_OK;
+	u8                              logical_result = FALSE;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff -Nru a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c
--- a/drivers/acpi/executer/exoparg3.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/executer/exoparg3.c	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -71,11 +71,11 @@
 
 acpi_status
 acpi_ex_opcode_3A_0T_0R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_signal_fatal_info  *fatal;
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	struct acpi_signal_fatal_info   *fatal;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -91,7 +91,7 @@
 			(u32) operand[2]->integer.value));
 
 
-		fatal = ACPI_MEM_ALLOCATE (sizeof (acpi_signal_fatal_info));
+		fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info));
 		if (fatal) {
 			fatal->type     = (u32) operand[0]->integer.value;
 			fatal->code     = (u32) operand[1]->integer.value;
@@ -138,14 +138,14 @@
 
 acpi_status
 acpi_ex_opcode_3A_1T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc = NULL;
-	char                    *buffer;
-	acpi_status             status = AE_OK;
-	acpi_native_uint        index;
-	acpi_size               length;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc = NULL;
+	char                            *buffer;
+	acpi_status                     status = AE_OK;
+	acpi_native_uint                index;
+	acpi_size                       length;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff -Nru a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c
--- a/drivers/acpi/executer/exoparg6.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exoparg6.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -73,9 +73,9 @@
 
 u8
 acpi_ex_do_match (
-	u32                     match_op,
-	acpi_integer            package_value,
-	acpi_integer            match_value)
+	u32                             match_op,
+	acpi_integer                    package_value,
+	acpi_integer                    match_value)
 {
 
 	switch (match_op) {
@@ -148,13 +148,13 @@
 
 acpi_status
 acpi_ex_opcode_6A_0T_1R (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     **operand = &walk_state->operands[0];
-	acpi_operand_object     *return_desc = NULL;
-	acpi_status             status = AE_OK;
-	u32                     index;
-	acpi_operand_object     *this_element;
+	union acpi_operand_object       **operand = &walk_state->operands[0];
+	union acpi_operand_object       *return_desc = NULL;
+	acpi_status                     status = AE_OK;
+	u32                             index;
+	union acpi_operand_object       *this_element;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ex_opcode_6A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff -Nru a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
--- a/drivers/acpi/executer/exprep.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exprep.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,14 +50,14 @@
 
 static u32
 acpi_ex_decode_field_access (
-	acpi_operand_object     *obj_desc,
-	u8                      field_flags,
-	u32                     *return_byte_alignment)
+	union acpi_operand_object       *obj_desc,
+	u8                              field_flags,
+	u32                             *return_byte_alignment)
 {
-	u32                     access;
-	u8                      byte_alignment;
-	u8                      bit_length;
-/*    u32                     Length; */
+	u32                             access;
+	u8                              byte_alignment;
+	u8                              bit_length;
+/*    u32                             Length; */
 
 
 	ACPI_FUNCTION_NAME ("ex_decode_field_access");
@@ -171,15 +171,15 @@
 
 acpi_status
 acpi_ex_prep_common_field_object (
-	acpi_operand_object     *obj_desc,
-	u8                      field_flags,
-	u8                      field_attribute,
-	u32                     field_bit_position,
-	u32                     field_bit_length)
+	union acpi_operand_object       *obj_desc,
+	u8                              field_flags,
+	u8                              field_attribute,
+	u32                             field_bit_position,
+	u32                             field_bit_length)
 {
-	u32                     access_bit_width;
-	u32                     byte_alignment;
-	u32                     nearest_byte_address;
+	u32                             access_bit_width;
+	u32                             byte_alignment;
+	u32                             nearest_byte_address;
 
 
 	ACPI_FUNCTION_TRACE ("ex_prep_common_field_object");
@@ -289,18 +289,18 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Construct an acpi_operand_object of type def_field and
+ * DESCRIPTION: Construct an union acpi_operand_object of type def_field and
  *              connect it to the parent Node.
  *
  ******************************************************************************/
 
 acpi_status
 acpi_ex_prep_field_value (
-	acpi_create_field_info  *info)
+	struct acpi_create_field_info   *info)
 {
-	acpi_operand_object     *obj_desc;
-	u32                     type;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	u32                             type;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ex_prep_field_value");
diff -Nru a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
--- a/drivers/acpi/executer/exregion.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exregion.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,20 +52,20 @@
 
 acpi_status
 acpi_ex_system_memory_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
-	void                    *logical_addr_ptr = NULL;
-	acpi_mem_space_context  *mem_info = region_context;
-	u32                     length;
-	acpi_size               window_size;
+	acpi_status                     status = AE_OK;
+	void                            *logical_addr_ptr = NULL;
+	struct acpi_mem_space_context   *mem_info = region_context;
+	u32                             length;
+	acpi_size                       window_size;
 #ifndef _HW_ALIGNMENT_SUPPORT
-	u32                     remainder;
+	u32                             remainder;
 #endif
 
 	ACPI_FUNCTION_TRACE ("ex_system_memory_space_handler");
@@ -256,14 +256,14 @@
 
 acpi_status
 acpi_ex_system_io_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_io_space_handler");
@@ -316,16 +316,16 @@
 
 acpi_status
 acpi_ex_pci_config_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
-	acpi_pci_id             *pci_id;
-	u16                     pci_register;
+	acpi_status                     status = AE_OK;
+	struct acpi_pci_id              *pci_id;
+	u16                             pci_register;
 
 
 	ACPI_FUNCTION_TRACE ("ex_pci_config_space_handler");
@@ -343,7 +343,7 @@
 	 *  Value - input value for write, output address for read
 	 *
 	 */
-	pci_id      = (acpi_pci_id *) region_context;
+	pci_id      = (struct acpi_pci_id *) region_context;
 	pci_register = (u16) (u32) address;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
@@ -393,14 +393,14 @@
 
 acpi_status
 acpi_ex_cmos_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_cmos_space_handler");
@@ -430,14 +430,14 @@
 
 acpi_status
 acpi_ex_pci_bar_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_pci_bar_space_handler");
@@ -467,17 +467,17 @@
 
 acpi_status
 acpi_ex_data_table_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context)
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context)
 {
-	acpi_status             status = AE_OK;
-	u32                     byte_width = ACPI_DIV_8 (bit_width);
-	u32                     i;
-	char                    *logical_addr_ptr;
+	acpi_status                     status = AE_OK;
+	u32                             byte_width = ACPI_DIV_8 (bit_width);
+	u32                             i;
+	char                            *logical_addr_ptr;
 
 
 	ACPI_FUNCTION_TRACE ("ex_data_table_space_handler");
diff -Nru a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c
--- a/drivers/acpi/executer/exresnte.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exresnte.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -62,22 +62,22 @@
 
 acpi_status
 acpi_ex_resolve_node_to_value (
-	acpi_namespace_node     **object_ptr,
-	acpi_walk_state         *walk_state)
+	struct acpi_namespace_node      **object_ptr,
+	struct acpi_walk_state          *walk_state)
 
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *source_desc;
-	acpi_operand_object     *obj_desc = NULL;
-	acpi_namespace_node     *node;
-	acpi_object_type        entry_type;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *source_desc;
+	union acpi_operand_object       *obj_desc = NULL;
+	struct acpi_namespace_node      *node;
+	acpi_object_type                entry_type;
 
 
 	ACPI_FUNCTION_TRACE ("ex_resolve_node_to_value");
 
 
 	/*
-	 * The stack pointer points to a acpi_namespace_node (Node).  Get the
+	 * The stack pointer points to a struct acpi_namespace_node (Node).  Get the
 	 * object that is attached to the Node.
 	 */
 	node       = *object_ptr;
@@ -90,7 +90,7 @@
 	if (entry_type == ACPI_TYPE_LOCAL_ALIAS) {
 		/* There is always exactly one level of indirection */
 
-		node       = (acpi_namespace_node *) node->object;
+		node       = (struct acpi_namespace_node *) node->object;
 		source_desc = acpi_ns_get_attached_object (node);
 		entry_type = acpi_ns_get_type ((acpi_handle) node);
 		*object_ptr = node;
diff -Nru a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
--- a/drivers/acpi/executer/exresolv.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exresolv.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@
  * FUNCTION:    acpi_ex_resolve_to_value
  *
  * PARAMETERS:  **stack_ptr         - Points to entry on obj_stack, which can
- *                                    be either an (acpi_operand_object *)
+ *                                    be either an (union acpi_operand_object *)
  *                                    or an acpi_handle.
  *              walk_state          - Current method state
  *
@@ -52,10 +52,10 @@
 
 acpi_status
 acpi_ex_resolve_to_value (
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_resolve_to_value", stack_ptr);
@@ -68,8 +68,8 @@
 
 	/*
 	 * The entity pointed to by the stack_ptr can be either
-	 * 1) A valid acpi_operand_object, or
-	 * 2) A acpi_namespace_node (named_obj)
+	 * 1) A valid union acpi_operand_object, or
+	 * 2) A struct acpi_namespace_node (named_obj)
 	 */
 	if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_OPERAND) {
 		status = acpi_ex_resolve_object_to_value (stack_ptr, walk_state);
@@ -84,7 +84,7 @@
 	 */
 	if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_NAMED) {
 		status = acpi_ex_resolve_node_to_value (
-				  ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, stack_ptr),
+				  ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, stack_ptr),
 				  walk_state);
 		if (ACPI_FAILURE (status)) {
 			return_ACPI_STATUS (status);
@@ -113,14 +113,14 @@
 
 acpi_status
 acpi_ex_resolve_object_to_value (
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *stack_desc;
-	void                    *temp_node;
-	acpi_operand_object     *obj_desc;
-	u16                     opcode;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *stack_desc;
+	void                            *temp_node;
+	union acpi_operand_object       *obj_desc;
+	u16                             opcode;
 
 
 	ACPI_FUNCTION_TRACE ("ex_resolve_object_to_value");
@@ -128,7 +128,7 @@
 
 	stack_desc = *stack_ptr;
 
-	/* This is an acpi_operand_object  */
+	/* This is an union acpi_operand_object    */
 
 	switch (ACPI_GET_OBJECT_TYPE (stack_desc)) {
 	case ACPI_TYPE_LOCAL_REFERENCE:
@@ -298,14 +298,14 @@
 
 acpi_status
 acpi_ex_resolve_multiple (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *operand,
-	acpi_object_type        *return_type,
-	acpi_operand_object     **return_desc)
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *operand,
+	acpi_object_type                *return_type,
+	union acpi_operand_object       **return_desc)
 {
-	acpi_operand_object     *obj_desc = (void *) operand;
-	acpi_namespace_node     *node;
-	acpi_object_type        type;
+	union acpi_operand_object       *obj_desc = (void *) operand;
+	struct acpi_namespace_node      *node;
+	acpi_object_type                type;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_ex_resolve_multiple");
diff -Nru a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c
--- a/drivers/acpi/executer/exresop.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exresop.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,9 +50,9 @@
 
 acpi_status
 acpi_ex_check_object_type (
-	acpi_object_type        type_needed,
-	acpi_object_type        this_type,
-	void                    *object)
+	acpi_object_type                type_needed,
+	acpi_object_type                this_type,
+	void                            *object)
 {
 	ACPI_FUNCTION_NAME ("ex_check_object_type");
 
@@ -70,7 +70,7 @@
 		 * specification, a store to a constant is a noop.)
 		 */
 		if ((this_type == ACPI_TYPE_INTEGER) &&
-			(((acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
+			(((union acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
 			return (AE_OK);
 		}
 	}
@@ -111,18 +111,18 @@
 
 acpi_status
 acpi_ex_resolve_operands (
-	u16                     opcode,
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state)
+	u16                             opcode,
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status = AE_OK;
-	u8                      object_type;
-	void                    *temp_node;
-	u32                     arg_types;
-	const acpi_opcode_info  *op_info;
-	u32                     this_arg_type;
-	acpi_object_type        type_needed;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status = AE_OK;
+	u8                              object_type;
+	void                            *temp_node;
+	u32                             arg_types;
+	const struct acpi_opcode_info   *op_info;
+	u32                             this_arg_type;
+	acpi_object_type                type_needed;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ex_resolve_operands", opcode);
@@ -170,7 +170,7 @@
 
 			/* Node */
 
-			object_type = ((acpi_namespace_node *) obj_desc)->type;
+			object_type = ((struct acpi_namespace_node *) obj_desc)->type;
 			break;
 
 
diff -Nru a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
--- a/drivers/acpi/executer/exstore.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exstore.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@
  *
  * PARAMETERS:  *source_desc        - Value to be stored
  *              *dest_desc          - Where to store it.  Must be an NS node
- *                                    or an acpi_operand_object of type
+ *                                    or an union acpi_operand_object of type
  *                                    Reference;
  *              walk_state          - Current walk state
  *
@@ -57,12 +57,12 @@
 
 acpi_status
 acpi_ex_store (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *dest_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *dest_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *ref_desc = dest_desc;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *ref_desc = dest_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_store", dest_desc);
@@ -83,7 +83,7 @@
 		 * Storing an object into a Named node.
 		 */
 		status = acpi_ex_store_object_to_node (source_desc,
-				 (acpi_namespace_node *) dest_desc, walk_state);
+				 (struct acpi_namespace_node *) dest_desc, walk_state);
 
 		return_ACPI_STATUS (status);
 	}
@@ -237,14 +237,14 @@
 
 acpi_status
 acpi_ex_store_object_to_index (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *index_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *index_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *new_desc;
-	u8                      value = 0;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *new_desc;
+	u8                              value = 0;
 
 
 	ACPI_FUNCTION_TRACE ("ex_store_object_to_index");
@@ -390,14 +390,14 @@
 
 acpi_status
 acpi_ex_store_object_to_node (
-	acpi_operand_object     *source_desc,
-	acpi_namespace_node     *node,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_desc,
+	struct acpi_namespace_node      *node,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *target_desc;
-	acpi_operand_object     *new_desc;
-	acpi_object_type        target_type;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *target_desc;
+	union acpi_operand_object       *new_desc;
+	acpi_object_type                target_type;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_node", source_desc);
diff -Nru a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
--- a/drivers/acpi/executer/exstoren.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/executer/exstoren.c	Fri Jan 10 12:12:37 2003
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
 
 acpi_status
 acpi_ex_resolve_object (
-	acpi_operand_object     **source_desc_ptr,
-	acpi_object_type        target_type,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       **source_desc_ptr,
+	acpi_object_type                target_type,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *source_desc = *source_desc_ptr;
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       *source_desc = *source_desc_ptr;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_resolve_object");
@@ -171,13 +171,13 @@
 
 acpi_status
 acpi_ex_store_object_to_object (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *dest_desc,
-	acpi_operand_object     **new_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *dest_desc,
+	union acpi_operand_object       **new_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_operand_object     *actual_src_desc;
-	acpi_status             status = AE_OK;
+	union acpi_operand_object       *actual_src_desc;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc);
diff -Nru a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
--- a/drivers/acpi/executer/exstorob.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exstorob.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
 
 acpi_status
 acpi_ex_store_buffer_to_buffer (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc)
 {
-	u32                     length;
-	u8                      *buffer;
+	u32                             length;
+	u8                              *buffer;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_store_buffer_to_buffer", source_desc);
@@ -121,11 +121,11 @@
 
 acpi_status
 acpi_ex_store_string_to_string (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc)
 {
-	u32                     length;
-	u8                      *buffer;
+	u32                             length;
+	u8                              *buffer;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_store_string_to_string", source_desc);
diff -Nru a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c
--- a/drivers/acpi/executer/exsystem.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exsystem.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,11 +49,11 @@
 
 acpi_status
 acpi_ex_system_wait_semaphore (
-	acpi_handle             semaphore,
-	u16                     timeout)
+	acpi_handle                     semaphore,
+	u16                             timeout)
 {
-	acpi_status             status;
-	acpi_status             status2;
+	acpi_status                     status;
+	acpi_status                     status2;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_wait_semaphore");
@@ -102,9 +102,9 @@
 
 acpi_status
 acpi_ex_system_do_stall (
-	u32                     how_long)
+	u32                             how_long)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -144,9 +144,9 @@
 
 acpi_status
 acpi_ex_system_do_suspend (
-	u32                     how_long)
+	u32                             how_long)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -183,10 +183,10 @@
 
 acpi_status
 acpi_ex_system_acquire_mutex (
-	acpi_operand_object     *time_desc,
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *time_desc,
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ex_system_acquire_mutex", obj_desc);
@@ -227,9 +227,9 @@
 
 acpi_status
 acpi_ex_system_release_mutex (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_release_mutex");
@@ -267,9 +267,9 @@
 
 acpi_status
 acpi_ex_system_signal_event (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_signal_event");
@@ -300,10 +300,10 @@
 
 acpi_status
 acpi_ex_system_wait_event (
-	acpi_operand_object     *time_desc,
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *time_desc,
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ex_system_wait_event");
@@ -332,10 +332,10 @@
 
 acpi_status
 acpi_ex_system_reset_event (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	acpi_status             status = AE_OK;
-	void                    *temp_semaphore;
+	acpi_status                     status = AE_OK;
+	void                            *temp_semaphore;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
--- a/drivers/acpi/executer/exutils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/executer/exutils.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@
 acpi_status
 acpi_ex_enter_interpreter (void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 	ACPI_FUNCTION_TRACE ("ex_enter_interpreter");
 
@@ -102,7 +102,7 @@
 void
 acpi_ex_exit_interpreter (void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ex_exit_interpreter");
@@ -132,7 +132,7 @@
 
 void
 acpi_ex_truncate_for32bit_table (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -174,10 +174,10 @@
 
 u8
 acpi_ex_acquire_global_lock (
-	u32                     field_flags)
+	u32                             field_flags)
 {
-	u8                      locked = FALSE;
-	acpi_status             status;
+	u8                              locked = FALSE;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ex_acquire_global_lock");
@@ -217,9 +217,9 @@
 
 void
 acpi_ex_release_global_lock (
-	u8                      locked_by_me)
+	u8                              locked_by_me)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ex_release_global_lock");
@@ -256,12 +256,12 @@
 
 u32
 acpi_ex_digits_needed (
-	acpi_integer            value,
-	u32                     base)
+	acpi_integer                    value,
+	u32                             base)
 {
-	u32                     num_digits;
-	acpi_integer            current_value;
-	acpi_integer            quotient;
+	u32                             num_digits;
+	acpi_integer                    current_value;
+	acpi_integer                    quotient;
 
 
 	ACPI_FUNCTION_TRACE ("ex_digits_needed");
@@ -296,10 +296,10 @@
 
 void
 acpi_ex_eisa_id_to_string (
-	u32                     numeric_id,
-	char                    *out_string)
+	u32                             numeric_id,
+	char                            *out_string)
 {
-	u32                     eisa_id;
+	u32                             eisa_id;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -333,13 +333,13 @@
 
 void
 acpi_ex_unsigned_integer_to_string (
-	acpi_integer            value,
-	char                    *out_string)
+	acpi_integer                    value,
+	char                            *out_string)
 {
-	u32                     count;
-	u32                     digits_needed;
-	u32                     remainder;
-	acpi_integer            quotient;
+	u32                             count;
+	u32                             digits_needed;
+	u32                             remainder;
+	acpi_integer                    quotient;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c
--- a/drivers/acpi/hardware/hwacpi.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/hardware/hwacpi.c	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@
 acpi_hw_initialize (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("hw_initialize");
@@ -86,11 +86,11 @@
 
 acpi_status
 acpi_hw_set_mode (
-	u32                     mode)
+	u32                             mode)
 {
 
-	acpi_status             status;
-	u32                     retry;
+	acpi_status                     status;
+	u32                             retry;
 
 
 	ACPI_FUNCTION_TRACE ("hw_set_mode");
@@ -183,8 +183,8 @@
 u32
 acpi_hw_get_mode (void)
 {
-	acpi_status             status;
-	u32                     value;
+	acpi_status                     status;
+	u32                             value;
 
 
 	ACPI_FUNCTION_TRACE ("hw_get_mode");
diff -Nru a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c
--- a/drivers/acpi/hardware/hwgpe.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/hardware/hwgpe.c	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
 
 u8
 acpi_hw_get_gpe_bit_mask (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
 	return (acpi_gbl_gpe_number_info [acpi_ev_get_gpe_number_index (gpe_number)].bit_mask);
 }
@@ -64,12 +64,12 @@
 
 acpi_status
 acpi_hw_enable_gpe (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     in_byte;
-	u32                     register_index;
-	u8                      bit_mask;
-	acpi_status             status;
+	u32                             in_byte;
+	u32                             register_index;
+	u8                              bit_mask;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -115,10 +115,10 @@
 
 void
 acpi_hw_enable_gpe_for_wakeup (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     register_index;
-	u8                      bit_mask;
+	u32                             register_index;
+	u8                              bit_mask;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -153,12 +153,12 @@
 
 acpi_status
 acpi_hw_disable_gpe (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     in_byte;
-	u32                     register_index;
-	u8                      bit_mask;
-	acpi_status             status;
+	u32                             in_byte;
+	u32                             register_index;
+	u8                              bit_mask;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -208,10 +208,10 @@
 
 void
 acpi_hw_disable_gpe_for_wakeup (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     register_index;
-	u8                      bit_mask;
+	u32                             register_index;
+	u8                              bit_mask;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -246,11 +246,11 @@
 
 acpi_status
 acpi_hw_clear_gpe (
-	u32                     gpe_number)
+	u32                             gpe_number)
 {
-	u32                     register_index;
-	u8                      bit_mask;
-	acpi_status             status;
+	u32                             register_index;
+	u8                              bit_mask;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -289,14 +289,14 @@
 
 acpi_status
 acpi_hw_get_gpe_status (
-	u32                     gpe_number,
-	acpi_event_status       *event_status)
+	u32                             gpe_number,
+	acpi_event_status               *event_status)
 {
-	u32                     in_byte = 0;
-	u32                     register_index = 0;
-	u8                      bit_mask = 0;
-	acpi_gpe_register_info  *gpe_register_info;
-	acpi_status             status;
+	u32                             in_byte = 0;
+	u32                             register_index = 0;
+	u8                              bit_mask = 0;
+	struct acpi_gpe_register_info   *gpe_register_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -368,10 +368,10 @@
 acpi_hw_disable_non_wakeup_gpes (
 	void)
 {
-	u32                     i;
-	acpi_gpe_register_info  *gpe_register_info;
-	u32                     in_value;
-	acpi_status             status;
+	u32                             i;
+	struct acpi_gpe_register_info   *gpe_register_info;
+	u32                             in_value;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -421,9 +421,9 @@
 acpi_hw_enable_non_wakeup_gpes (
 	void)
 {
-	u32                     i;
-	acpi_gpe_register_info  *gpe_register_info;
-	acpi_status             status;
+	u32                             i;
+	struct acpi_gpe_register_info   *gpe_register_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
--- a/drivers/acpi/hardware/hwregs.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/hardware/hwregs.c	Fri Jan 10 12:12:38 2003
@@ -7,7 +7,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,9 +47,9 @@
 acpi_status
 acpi_hw_clear_acpi_status (void)
 {
-	acpi_native_uint        i;
-	acpi_native_uint        gpe_block;
-	acpi_status             status;
+	acpi_native_uint                i;
+	acpi_native_uint                gpe_block;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("hw_clear_acpi_status");
@@ -116,12 +116,12 @@
 
 acpi_status
 acpi_get_sleep_type_data (
-	u8                      sleep_state,
-	u8                      *sleep_type_a,
-	u8                      *sleep_type_b)
+	u8                              sleep_state,
+	u8                              *sleep_type_a,
+	u8                              *sleep_type_b)
 {
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_sleep_type_data");
@@ -207,9 +207,9 @@
  *
  ******************************************************************************/
 
-acpi_bit_register_info *
+struct acpi_bit_register_info *
 acpi_hw_get_bit_register_info (
-	u32                     register_id)
+	u32                             register_id)
 {
 	ACPI_FUNCTION_NAME ("hw_get_bit_register_info");
 
@@ -239,13 +239,13 @@
 
 acpi_status
 acpi_get_register (
-	u32                     register_id,
-	u32                     *return_value,
-	u32                     flags)
+	u32                             register_id,
+	u32                             *return_value,
+	u32                             flags)
 {
-	u32                     register_value = 0;
-	acpi_bit_register_info  *bit_reg_info;
-	acpi_status             status;
+	u32                             register_value = 0;
+	struct acpi_bit_register_info   *bit_reg_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_register");
@@ -304,13 +304,13 @@
 
 acpi_status
 acpi_set_register (
-	u32                     register_id,
-	u32                     value,
-	u32                     flags)
+	u32                             register_id,
+	u32                             value,
+	u32                             flags)
 {
-	u32                     register_value = 0;
-	acpi_bit_register_info  *bit_reg_info;
-	acpi_status             status;
+	u32                             register_value = 0;
+	struct acpi_bit_register_info   *bit_reg_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("acpi_set_register", register_id);
@@ -454,14 +454,14 @@
 
 acpi_status
 acpi_hw_register_read (
-	u8                      use_lock,
-	u32                     register_id,
-	u32                     *return_value)
+	u8                              use_lock,
+	u32                             register_id,
+	u32                             *return_value)
 {
-	u32                     value1 = 0;
-	u32                     value2 = 0;
-	u32                     bank_offset;
-	acpi_status             status;
+	u32                             value1 = 0;
+	u32                             value2 = 0;
+	u32                             bank_offset;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("hw_register_read");
@@ -563,12 +563,12 @@
 
 acpi_status
 acpi_hw_register_write (
-	u8                      use_lock,
-	u32                     register_id,
-	u32                     value)
+	u8                              use_lock,
+	u32                             register_id,
+	u32                             value)
 {
-	u32                     bank_offset;
-	acpi_status             status;
+	u32                             bank_offset;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("hw_register_write");
@@ -678,16 +678,16 @@
 
 acpi_status
 acpi_hw_low_level_read (
-	u32                     width,
-	u32                     *value,
-	acpi_generic_address    *reg,
-	u32                     offset)
+	u32                             width,
+	u32                             *value,
+	struct acpi_generic_address     *reg,
+	u32                             offset)
 {
-	acpi_physical_address   mem_address;
-	acpi_io_address         io_address;
-	acpi_pci_id             pci_id;
-	u16                     pci_register;
-	acpi_status             status;
+	acpi_physical_address           mem_address;
+	acpi_io_address                 io_address;
+	struct acpi_pci_id              pci_id;
+	u16                             pci_register;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("hw_low_level_read");
@@ -768,16 +768,16 @@
 
 acpi_status
 acpi_hw_low_level_write (
-	u32                     width,
-	u32                     value,
-	acpi_generic_address    *reg,
-	u32                     offset)
+	u32                             width,
+	u32                             value,
+	struct acpi_generic_address     *reg,
+	u32                             offset)
 {
-	acpi_physical_address   mem_address;
-	acpi_io_address         io_address;
-	acpi_pci_id             pci_id;
-	u16                     pci_register;
-	acpi_status             status;
+	acpi_physical_address           mem_address;
+	acpi_io_address                 io_address;
+	struct acpi_pci_id              pci_id;
+	u16                             pci_register;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("hw_low_level_write");
diff -Nru a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
--- a/drivers/acpi/hardware/hwsleep.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/hardware/hwsleep.c	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -123,11 +123,11 @@
 
 acpi_status
 acpi_enter_sleep_state_prep (
-	u8                  sleep_state)
+	u8                          sleep_state)
 {
-	acpi_status         status;
-	acpi_object_list    arg_list;
-	acpi_object         arg;
+	acpi_status                 status;
+	struct acpi_object_list     arg_list;
+	union acpi_object           arg;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state_prep");
@@ -181,14 +181,14 @@
 
 acpi_status
 acpi_enter_sleep_state (
-	u8                      sleep_state)
+	u8                              sleep_state)
 {
-	u32                     PM1Acontrol;
-	u32                     PM1Bcontrol;
-	acpi_bit_register_info  *sleep_type_reg_info;
-	acpi_bit_register_info  *sleep_enable_reg_info;
-	u32                     in_value;
-	acpi_status             status;
+	u32                             PM1Acontrol;
+	u32                             PM1Bcontrol;
+	struct acpi_bit_register_info   *sleep_type_reg_info;
+	struct acpi_bit_register_info   *sleep_enable_reg_info;
+	u32                             in_value;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state");
@@ -330,11 +330,11 @@
 
 acpi_status
 acpi_leave_sleep_state (
-	u8                  sleep_state)
+	u8                          sleep_state)
 {
-	acpi_object_list    arg_list;
-	acpi_object         arg;
-	acpi_status         status;
+	struct acpi_object_list     arg_list;
+	union acpi_object           arg;
+	acpi_status                 status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_leave_sleep_state");
diff -Nru a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c
--- a/drivers/acpi/hardware/hwtimer.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/hardware/hwtimer.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@
 
 acpi_status
 acpi_get_timer_resolution (
-	u32                     *resolution)
+	u32                             *resolution)
 {
 	ACPI_FUNCTION_TRACE ("acpi_get_timer_resolution");
 
@@ -77,9 +77,9 @@
 
 acpi_status
 acpi_get_timer (
-	u32                     *ticks)
+	u32                             *ticks)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_timer");
@@ -123,14 +123,14 @@
 
 acpi_status
 acpi_get_timer_duration (
-	u32                     start_ticks,
-	u32                     end_ticks,
-	u32                     *time_elapsed)
+	u32                             start_ticks,
+	u32                             end_ticks,
+	u32                             *time_elapsed)
 {
-	u32                     delta_ticks = 0;
-	uint64_overlay          normalized_ticks;
-	acpi_status             status;
-	acpi_integer            out_quotient;
+	u32                             delta_ticks = 0;
+	union uint64_overlay            normalized_ticks;
+	acpi_status                     status;
+	acpi_integer                    out_quotient;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_timer_duration");
diff -Nru a/drivers/acpi/include/acconfig.h b/drivers/acpi/include/acconfig.h
--- a/drivers/acpi/include/acconfig.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acconfig.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20021217
+#define ACPI_CA_VERSION                 0x20030109
 
 /* Version of ACPI supported */
 
diff -Nru a/drivers/acpi/include/acdebug.h b/drivers/acpi/include/acdebug.h
--- a/drivers/acpi/include/acdebug.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acdebug.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,19 +28,17 @@
 
 #define ACPI_DEBUG_BUFFER_SIZE  4196
 
-typedef struct command_info
+struct command_info
 {
-	char                    *name;          /* Command Name */
-	u8                      min_args;       /* Minimum arguments required */
+	char                            *name;          /* Command Name */
+	u8                              min_args;       /* Minimum arguments required */
+};
 
-} COMMAND_INFO;
 
-
-typedef struct argument_info
+struct argument_info
 {
-	char                    *name;          /* Argument Name */
-
-} ARGUMENT_INFO;
+	char                            *name;          /* Argument Name */
+};
 
 
 #define PARAM_LIST(pl)                  pl
@@ -71,9 +69,9 @@
 
 acpi_status
 acpi_db_single_step (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u32                     op_type);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u32                             op_type);
 
 
 /*
@@ -82,65 +80,65 @@
 
 void
 acpi_db_display_table_info (
-	char                    *table_arg);
+	char                            *table_arg);
 
 void
 acpi_db_unload_acpi_table (
-	char                    *table_arg,
-	char                    *instance_arg);
+	char                            *table_arg,
+	char                            *instance_arg);
 
 void
 acpi_db_set_method_breakpoint (
-	char                    *location,
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	char                            *location,
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 void
 acpi_db_set_method_call_breakpoint (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 void
 acpi_db_disassemble_aml (
-	char                    *statements,
-	acpi_parse_object       *op);
+	char                            *statements,
+	union acpi_parse_object         *op);
 
 void
 acpi_db_dump_namespace (
-	char                    *start_arg,
-	char                    *depth_arg);
+	char                            *start_arg,
+	char                            *depth_arg);
 
 void
 acpi_db_dump_namespace_by_owner (
-	char                    *owner_arg,
-	char                    *depth_arg);
+	char                            *owner_arg,
+	char                            *depth_arg);
 
 void
 acpi_db_send_notify (
-	char                    *name,
-	u32                     value);
+	char                            *name,
+	u32                             value);
 
 void
 acpi_db_set_method_data (
-	char                    *type_arg,
-	char                    *index_arg,
-	char                    *value_arg);
+	char                            *type_arg,
+	char                            *index_arg,
+	char                            *value_arg);
 
 acpi_status
 acpi_db_display_objects (
-	char                    *obj_type_arg,
-	char                    *display_count_arg);
+	char                            *obj_type_arg,
+	char                            *display_count_arg);
 
 acpi_status
 acpi_db_find_name_in_namespace (
-	char                    *name_arg);
+	char                            *name_arg);
 
 void
 acpi_db_set_scope (
-	char                    *name);
+	char                            *name);
 
 void
 acpi_db_find_references (
-	char                    *object_arg);
+	char                            *object_arg);
 
 void
 acpi_db_display_locks (void);
@@ -148,7 +146,7 @@
 
 void
 acpi_db_display_resources (
-	char                    *object_arg);
+	char                            *object_arg);
 
 void
 acpi_db_check_integrity (
@@ -156,31 +154,31 @@
 
 acpi_status
 acpi_db_integrity_walk (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_db_walk_and_match_name (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_db_walk_for_references (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_db_walk_for_specific_objects (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 
 /*
@@ -189,30 +187,30 @@
 
 void
 acpi_db_display_method_info (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 void
 acpi_db_decode_and_display_object (
-	char                    *target,
-	char                    *output_type);
+	char                            *target,
+	char                            *output_type);
 
 void
 acpi_db_decode_node (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 void
 acpi_db_display_result_object (
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_db_display_all_methods (
-	char                    *display_count_arg);
+	char                            *display_count_arg);
 
 void
 acpi_db_display_internal_object (
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_db_display_arguments (
@@ -232,20 +230,20 @@
 
 void
 acpi_db_display_argument_object (
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_db_dump_parser_descriptor (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 void *
 acpi_db_get_pointer (
-	void                    *target);
+	void                            *target);
 
 void
 acpi_db_decode_internal_object (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 
 /*
@@ -254,24 +252,24 @@
 
 void
 acpi_db_execute (
-	char                    *name,
-	char                    **args,
-	u32                     flags);
+	char                            *name,
+	char                            **args,
+	u32                             flags);
 
 void
 acpi_db_create_execution_threads (
-	char                    *num_threads_arg,
-	char                    *num_loops_arg,
-	char                    *method_name_arg);
+	char                            *num_threads_arg,
+	char                            *num_loops_arg,
+	char                            *method_name_arg);
 
 acpi_status
 acpi_db_execute_method (
-	acpi_db_method_info     *info,
-	acpi_buffer             *return_obj);
+	struct acpi_db_method_info      *info,
+	struct acpi_buffer              *return_obj);
 
 void
 acpi_db_execute_setup (
-	acpi_db_method_info     *info);
+	struct acpi_db_method_info      *info);
 
 u32
 acpi_db_get_outstanding_allocations (
@@ -279,7 +277,7 @@
 
 void ACPI_SYSTEM_XFACE
 acpi_db_method_thread (
-	void                    *context);
+	void                            *context);
 
 
 /*
@@ -288,12 +286,12 @@
 
 acpi_object_type
 acpi_db_match_argument (
-	char                    *user_argument,
-	ARGUMENT_INFO           *arguments);
+	char                            *user_argument,
+	struct argument_info            *arguments);
 
 acpi_status
 ae_local_load_table (
-	acpi_table_header       *table_ptr);
+	struct acpi_table_header        *table_ptr);
 
 void
 acpi_db_close_debug_file (
@@ -301,15 +299,15 @@
 
 void
 acpi_db_open_debug_file (
-	char                    *name);
+	char                            *name);
 
 acpi_status
 acpi_db_load_acpi_table (
-	char                    *filename);
+	char                            *filename);
 
 acpi_status
 acpi_db_get_acpi_table (
-	char                    *filename);
+	char                            *filename);
 
 /*
  * dbhistry - debugger HISTORY command
@@ -317,14 +315,14 @@
 
 void
 acpi_db_add_to_history (
-	char                    *command_line);
+	char                            *command_line);
 
 void
 acpi_db_display_history (void);
 
 char *
 acpi_db_get_from_history (
-	char                    *command_num_arg);
+	char                            *command_num_arg);
 
 
 /*
@@ -333,35 +331,35 @@
 
 acpi_status
 acpi_db_command_dispatch (
-	char                    *input_buffer,
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	char                            *input_buffer,
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 void ACPI_SYSTEM_XFACE
 acpi_db_execute_thread (
-	void                    *context);
+	void                            *context);
 
 acpi_status
 acpi_db_user_commands (
-	char                    prompt,
-	acpi_parse_object       *op);
+	char                            prompt,
+	union acpi_parse_object         *op);
 
 void
 acpi_db_display_help (
-	char                    *help_type);
+	char                            *help_type);
 
 char *
 acpi_db_get_next_token (
-	char                    *string,
-	char                    **next);
+	char                            *string,
+	char                            **next);
 
 u32
 acpi_db_get_line (
-	char                    *input_buffer);
+	char                            *input_buffer);
 
 u32
 acpi_db_match_command (
-	char                    *user_command);
+	char                            *user_command);
 
 void
 acpi_db_single_thread (
@@ -374,20 +372,20 @@
 
 void
 acpi_db_generate_statistics (
-	acpi_parse_object       *root,
-	u8                      is_method);
+	union acpi_parse_object         *root,
+	u8                              is_method);
 
 
 acpi_status
 acpi_db_display_statistics (
-	char                    *type_arg);
+	char                            *type_arg);
 
 acpi_status
 acpi_db_classify_one_object (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 void
 acpi_db_count_namespace_objects (
@@ -395,7 +393,7 @@
 
 void
 acpi_db_enumerate_object (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 
 /*
@@ -404,29 +402,29 @@
 
 void
 acpi_db_set_output_destination (
-	u32                     where);
+	u32                             where);
 
 void
 acpi_db_dump_buffer (
-	u32                     address);
+	u32                             address);
 
 void
 acpi_db_dump_object (
-	acpi_object             *obj_desc,
-	u32                     level);
+	union acpi_object               *obj_desc,
+	u32                             level);
 
 void
 acpi_db_prep_namestring (
-	char                    *name);
+	char                            *name);
 
 
 acpi_status
 acpi_db_second_pass_parse (
-	acpi_parse_object       *root);
+	union acpi_parse_object         *root);
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_db_local_ns_lookup (
-	char                    *name);
+	char                            *name);
 
 
 #endif  /* __ACDEBUG_H__ */
diff -Nru a/drivers/acpi/include/acdispat.h b/drivers/acpi/include/acdispat.h
--- a/drivers/acpi/include/acdispat.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acdispat.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -35,78 +35,78 @@
 
 acpi_status
 acpi_ds_obj_stack_push (
-	void                    *object,
-	acpi_walk_state         *walk_state);
+	void                            *object,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_obj_stack_pop (
-	u32                     pop_count,
-	acpi_walk_state         *walk_state);
+	u32                             pop_count,
+	struct acpi_walk_state          *walk_state);
 
 void *
 acpi_ds_obj_stack_get_value (
-	u32                     index,
-	acpi_walk_state         *walk_state);
+	u32                             index,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_obj_stack_pop_object (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state);
 
 
 /* dsopcode - support for late evaluation */
 
 acpi_status
 acpi_ds_execute_arguments (
-	acpi_namespace_node     *node,
-	acpi_namespace_node     *scope_node,
-	u32                     aml_length,
-	u8                      *aml_start);
+	struct acpi_namespace_node      *node,
+	struct acpi_namespace_node      *scope_node,
+	u32                             aml_length,
+	u8                              *aml_start);
 
 acpi_status
 acpi_ds_get_buffer_field_arguments (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ds_get_region_arguments (
-	acpi_operand_object     *rgn_desc);
+	union acpi_operand_object       *rgn_desc);
 
 acpi_status
 acpi_ds_get_buffer_arguments (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ds_get_package_arguments (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ds_init_buffer_field (
-	u16                     aml_opcode,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *buffer_desc,
-	acpi_operand_object     *offset_desc,
-	acpi_operand_object     *length_desc,
-	acpi_operand_object     *result_desc);
+	u16                             aml_opcode,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *buffer_desc,
+	union acpi_operand_object       *offset_desc,
+	union acpi_operand_object       *length_desc,
+	union acpi_operand_object       *result_desc);
 
 acpi_status
 acpi_ds_eval_buffer_field_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 acpi_status
 acpi_ds_eval_region_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 acpi_status
 acpi_ds_eval_data_object_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_operand_object     *obj_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ds_initialize_region (
-	acpi_handle             obj_handle);
+	acpi_handle                     obj_handle);
 
 
 /* dsctrl - Parser/Interpreter interface, control stack routines */
@@ -114,13 +114,13 @@
 
 acpi_status
 acpi_ds_exec_begin_control_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 acpi_status
 acpi_ds_exec_end_control_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 
 /* dsexec - Parser/Interpreter interface, method execution callbacks */
@@ -128,80 +128,80 @@
 
 acpi_status
 acpi_ds_get_predicate_value (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *result_obj);
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *result_obj);
 
 acpi_status
 acpi_ds_exec_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op);
 
 acpi_status
 acpi_ds_exec_end_op (
-	acpi_walk_state         *state);
+	struct acpi_walk_state          *state);
 
 
 /* dsfield - Parser/Interpreter interface for AML fields */
 
 acpi_status
 acpi_ds_get_field_names (
-	acpi_create_field_info  *info,
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *arg);
+	struct acpi_create_field_info   *info,
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *arg);
 
 acpi_status
 acpi_ds_create_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_create_bank_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_create_index_field (
-	acpi_parse_object       *op,
-	acpi_namespace_node     *region_node,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *region_node,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_create_buffer_field (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_init_field_objects (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state);
 
 
 /* dsload - Parser/Interpreter interface, namespace load callbacks */
 
 acpi_status
 acpi_ds_load1_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op);
 
 acpi_status
 acpi_ds_load1_end_op (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_load2_begin_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op);
 
 acpi_status
 acpi_ds_load2_end_op (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_init_callbacks (
-	acpi_walk_state         *walk_state,
-	u32                     pass_number);
+	struct acpi_walk_state          *walk_state,
+	u32                             pass_number);
 
 
 /* dsmthdat - method data (locals/args) */
@@ -209,177 +209,177 @@
 
 acpi_status
 acpi_ds_store_object_to_local (
-	u16                     opcode,
-	u32                     index,
-	acpi_operand_object     *src_desc,
-	acpi_walk_state         *walk_state);
+	u16                             opcode,
+	u32                             index,
+	union acpi_operand_object       *src_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_method_data_get_entry (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     ***node);
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       ***node);
 
 void
 acpi_ds_method_data_delete_all (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 u8
 acpi_ds_is_method_value (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_object_type
 acpi_ds_method_data_get_type (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state);
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_method_data_get_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     **dest_desc);
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       **dest_desc);
 
 void
 acpi_ds_method_data_delete_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state);
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_method_data_init_args (
-	acpi_operand_object     **params,
-	u32                     max_param_count,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **params,
+	u32                             max_param_count,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_method_data_get_node (
-	u16                     opcode,
-	u32                     index,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     **node);
+	u16                             opcode,
+	u32                             index,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      **node);
 
 void
 acpi_ds_method_data_init (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_method_data_set_value (
-	u16                     opcode,
-	u32                     index,
-	acpi_operand_object     *object,
-	acpi_walk_state         *walk_state);
+	u16                             opcode,
+	u32                             index,
+	union acpi_operand_object       *object,
+	struct acpi_walk_state          *walk_state);
 
 
 /* dsmethod - Parser/Interpreter interface - control method parsing */
 
 acpi_status
 acpi_ds_parse_method (
-	acpi_handle             obj_handle);
+	acpi_handle                     obj_handle);
 
 acpi_status
 acpi_ds_call_control_method (
-	acpi_thread_state       *thread,
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_thread_state        *thread,
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 acpi_status
 acpi_ds_restart_control_method (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *return_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *return_desc);
 
 acpi_status
 acpi_ds_terminate_control_method (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_begin_method_execution (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     *obj_desc,
-	acpi_namespace_node     *calling_method_node);
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       *obj_desc,
+	struct acpi_namespace_node      *calling_method_node);
 
 
 /* dsobj - Parser/Interpreter interface - object initialization and conversion */
 
 acpi_status
 acpi_ds_init_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_ds_initialize_objects (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *start_node);
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *start_node);
 
 acpi_status
 acpi_ds_build_internal_buffer_obj (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u32                     buffer_length,
-	acpi_operand_object     **obj_desc_ptr);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u32                             buffer_length,
+	union acpi_operand_object       **obj_desc_ptr);
 
 acpi_status
 acpi_ds_build_internal_package_obj (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u32                     package_length,
-	acpi_operand_object     **obj_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u32                             package_length,
+	union acpi_operand_object       **obj_desc);
 
 acpi_status
 acpi_ds_build_internal_object (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_operand_object     **obj_desc_ptr);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	union acpi_operand_object       **obj_desc_ptr);
 
 acpi_status
 acpi_ds_init_object_from_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	u16                     opcode,
-	acpi_operand_object     **obj_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	u16                             opcode,
+	union acpi_operand_object       **obj_desc);
 
 acpi_status
 acpi_ds_create_node (
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *node,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *node,
+	union acpi_parse_object         *op);
 
 
 /* dsutils - Parser/Interpreter interface utility routines */
 
 u8
 acpi_ds_is_result_used (
-	acpi_parse_object       *op,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_ds_delete_result_if_not_used (
-	acpi_parse_object       *op,
-	acpi_operand_object     *result_obj,
-	acpi_walk_state         *walk_state);
+	union acpi_parse_object         *op,
+	union acpi_operand_object       *result_obj,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_create_operand (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *arg,
-	u32                     args_remaining);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *arg,
+	u32                             args_remaining);
 
 acpi_status
 acpi_ds_create_operands (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *first_arg);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *first_arg);
 
 acpi_status
 acpi_ds_resolve_operands (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_ds_clear_operands (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -388,77 +388,77 @@
 
 acpi_status
 acpi_ds_scope_stack_push (
-	acpi_namespace_node     *node,
-	acpi_object_type        type,
-	acpi_walk_state         *walk_state);
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type,
+	struct acpi_walk_state          *walk_state);
 
 
 acpi_status
 acpi_ds_scope_stack_pop (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_ds_scope_stack_clear (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 
 /* dswstate - parser WALK_STATE management routines */
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_create_walk_state (
-	acpi_owner_id           owner_id,
-	acpi_parse_object       *origin,
-	acpi_operand_object     *mth_desc,
-	acpi_thread_state       *thread);
+	acpi_owner_id                   owner_id,
+	union acpi_parse_object         *origin,
+	union acpi_operand_object       *mth_desc,
+	struct acpi_thread_state        *thread);
 
 acpi_status
 acpi_ds_init_aml_walk (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_namespace_node     *method_node,
-	u8                      *aml_start,
-	u32                     aml_length,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc,
-	u32                     pass_number);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	struct acpi_namespace_node      *method_node,
+	u8                              *aml_start,
+	u32                             aml_length,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc,
+	u32                             pass_number);
 
 acpi_status
 acpi_ds_obj_stack_delete_all (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_obj_stack_pop_and_delete (
-	u32                     pop_count,
-	acpi_walk_state         *walk_state);
+	u32                             pop_count,
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_ds_delete_walk_state (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_pop_walk_state (
-	acpi_thread_state       *thread);
+	struct acpi_thread_state        *thread);
 
 void
 acpi_ds_push_walk_state (
-	acpi_walk_state         *walk_state,
-	acpi_thread_state       *thread);
+	struct acpi_walk_state          *walk_state,
+	struct acpi_thread_state        *thread);
 
 acpi_status
 acpi_ds_result_stack_pop (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_stack_push (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_stack_clear (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
-acpi_walk_state *
+struct acpi_walk_state *
 acpi_ds_get_current_walk_state (
-	acpi_thread_state       *thread);
+	struct acpi_thread_state        *thread);
 
 void
 acpi_ds_delete_walk_state_cache (
@@ -466,29 +466,29 @@
 
 acpi_status
 acpi_ds_result_insert (
-	void                    *object,
-	u32                     index,
-	acpi_walk_state         *walk_state);
+	void                            *object,
+	u32                             index,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_remove (
-	acpi_operand_object     **object,
-	u32                     index,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **object,
+	u32                             index,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_pop (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_push (
-	acpi_operand_object     *object,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *object,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ds_result_pop_from_bottom (
-	acpi_operand_object     **object,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **object,
+	struct acpi_walk_state          *walk_state);
 
 #endif /* _ACDISPAT_H_ */
diff -Nru a/drivers/acpi/include/acevents.h b/drivers/acpi/include/acevents.h
--- a/drivers/acpi/include/acevents.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acevents.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@
 
 u32
 acpi_ev_fixed_event_dispatch (
-	u32                     event);
+	u32                             event);
 
 
 /*
@@ -58,11 +58,11 @@
 
 u8
 acpi_ev_is_notify_object (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 acpi_status
 acpi_ev_acquire_global_lock(
-	u16                     timeout);
+	u16                             timeout);
 
 acpi_status
 acpi_ev_release_global_lock(
@@ -74,20 +74,20 @@
 
 u32
 acpi_ev_get_gpe_register_index (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 u32
 acpi_ev_get_gpe_number_index (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 acpi_status
 acpi_ev_queue_notify_request (
-	acpi_namespace_node     *node,
-	u32                     notify_value);
+	struct acpi_namespace_node      *node,
+	u32                             notify_value);
 
 void ACPI_SYSTEM_XFACE
 acpi_ev_notify_dispatch (
-	void                    *context);
+	void                            *context);
 
 
 /*
@@ -104,7 +104,7 @@
 
 u32
 acpi_ev_gpe_dispatch (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 u32
 acpi_ev_gpe_detect (
@@ -120,29 +120,29 @@
 
 acpi_status
 acpi_ev_address_space_dispatch (
-	acpi_operand_object    *region_obj,
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	void                    *value);
+	union acpi_operand_object      *region_obj,
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	void                            *value);
 
 acpi_status
 acpi_ev_addr_handler_helper (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_ev_attach_region (
-	acpi_operand_object     *handler_obj,
-	acpi_operand_object     *region_obj,
-	u8                      acpi_ns_is_locked);
+	union acpi_operand_object       *handler_obj,
+	union acpi_operand_object       *region_obj,
+	u8                              acpi_ns_is_locked);
 
 void
 acpi_ev_detach_region (
-	acpi_operand_object    *region_obj,
-	u8                      acpi_ns_is_locked);
+	union acpi_operand_object      *region_obj,
+	u8                              acpi_ns_is_locked);
 
 
 /*
@@ -151,50 +151,50 @@
 
 acpi_status
 acpi_ev_system_memory_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_io_space_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_pci_config_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_cmos_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_pci_bar_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_default_region_setup (
-	acpi_handle             handle,
-	u32                     function,
-	void                    *handler_context,
-	void                    **region_context);
+	acpi_handle                     handle,
+	u32                             function,
+	void                            *handler_context,
+	void                            **region_context);
 
 acpi_status
 acpi_ev_initialize_region (
-	acpi_operand_object     *region_obj,
-	u8                      acpi_ns_locked);
+	union acpi_operand_object       *region_obj,
+	u8                              acpi_ns_locked);
 
 
 /*
@@ -211,7 +211,7 @@
 
 u32
 acpi_ev_initialize_sCI (
-	u32                     program_sCI);
+	u32                             program_sCI);
 
 void
 acpi_ev_terminate (
diff -Nru a/drivers/acpi/include/acexcep.h b/drivers/acpi/include/acexcep.h
--- a/drivers/acpi/include/acexcep.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acexcep.h	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h
--- a/drivers/acpi/include/acglobal.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acglobal.h	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,12 +47,12 @@
 
 /* Runtime configuration of debug print levels */
 
-extern      u32                         acpi_dbg_level;
-extern      u32                         acpi_dbg_layer;
+extern      u32                                 acpi_dbg_level;
+extern      u32                                 acpi_dbg_layer;
 
 /* Procedure nesting level for debug output */
 
-extern      u32                         acpi_gbl_nesting_level;
+extern      u32                                 acpi_gbl_nesting_level;
 
 
 /*****************************************************************************
@@ -70,22 +70,22 @@
  * of each in the system.  Each global points to the actual table.
  *
  */
-ACPI_EXTERN u32                         acpi_gbl_table_flags;
-ACPI_EXTERN u32                         acpi_gbl_rsdt_table_count;
-ACPI_EXTERN rsdp_descriptor            *acpi_gbl_RSDP;
-ACPI_EXTERN xsdt_descriptor            *acpi_gbl_XSDT;
+ACPI_EXTERN u32                                 acpi_gbl_table_flags;
+ACPI_EXTERN u32                                 acpi_gbl_rsdt_table_count;
+ACPI_EXTERN struct rsdp_descriptor             *acpi_gbl_RSDP;
+ACPI_EXTERN XSDT_DESCRIPTOR            *acpi_gbl_XSDT;
 ACPI_EXTERN FADT_DESCRIPTOR            *acpi_gbl_FADT;
-ACPI_EXTERN acpi_table_header          *acpi_gbl_DSDT;
+ACPI_EXTERN struct acpi_table_header           *acpi_gbl_DSDT;
 ACPI_EXTERN FACS_DESCRIPTOR            *acpi_gbl_FACS;
-ACPI_EXTERN acpi_common_facs            acpi_gbl_common_fACS;
+ACPI_EXTERN struct acpi_common_facs             acpi_gbl_common_fACS;
 
 /*
  * Handle both ACPI 1.0 and ACPI 2.0 Integer widths
  * If we are running a method that exists in a 32-bit ACPI table.
  * Use only 32 bits of the Integer for conversion.
  */
-ACPI_EXTERN u8                          acpi_gbl_integer_bit_width;
-ACPI_EXTERN u8                          acpi_gbl_integer_byte_width;
+ACPI_EXTERN u8                                  acpi_gbl_integer_bit_width;
+ACPI_EXTERN u8                                  acpi_gbl_integer_byte_width;
 
 /*
  * Since there may be multiple SSDTs and PSDTS, a single pointer is not
@@ -96,15 +96,15 @@
 /*
  * ACPI Table info arrays
  */
-extern      acpi_table_desc             acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
-extern      ACPI_TABLE_SUPPORT          acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
+extern      struct acpi_table_desc              acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+extern      struct acpi_table_support           acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
 
 /*
  * Predefined mutex objects.  This array contains the
  * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
  * (The table maps local handles to the real OS handles)
  */
-ACPI_EXTERN acpi_mutex_info             acpi_gbl_acpi_mutex_info [NUM_MTX];
+ACPI_EXTERN struct acpi_mutex_info              acpi_gbl_acpi_mutex_info [NUM_MTX];
 
 
 /*****************************************************************************
@@ -114,35 +114,35 @@
  ****************************************************************************/
 
 
-ACPI_EXTERN acpi_memory_list            acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
-ACPI_EXTERN acpi_object_notify_handler  acpi_gbl_drv_notify;
-ACPI_EXTERN acpi_object_notify_handler  acpi_gbl_sys_notify;
-ACPI_EXTERN acpi_init_handler           acpi_gbl_init_handler;
-ACPI_EXTERN acpi_walk_state            *acpi_gbl_breakpoint_walk;
-ACPI_EXTERN acpi_handle                 acpi_gbl_global_lock_semaphore;
-
-ACPI_EXTERN u32                         acpi_gbl_global_lock_thread_count;
-ACPI_EXTERN u32                         acpi_gbl_original_mode;
-ACPI_EXTERN u32                         acpi_gbl_rsdp_original_location;
-ACPI_EXTERN u32                         acpi_gbl_ns_lookup_count;
-ACPI_EXTERN u32                         acpi_gbl_ps_find_count;
-ACPI_EXTERN u16                         acpi_gbl_pm1_enable_register_save;
-ACPI_EXTERN u16                         acpi_gbl_next_table_owner_id;
-ACPI_EXTERN u16                         acpi_gbl_next_method_owner_id;
-ACPI_EXTERN u16                         acpi_gbl_global_lock_handle;
-ACPI_EXTERN u8                          acpi_gbl_debugger_configuration;
-ACPI_EXTERN u8                          acpi_gbl_global_lock_acquired;
-ACPI_EXTERN u8                          acpi_gbl_step_to_next_call;
-ACPI_EXTERN u8                          acpi_gbl_acpi_hardware_present;
-ACPI_EXTERN u8                          acpi_gbl_global_lock_present;
-ACPI_EXTERN u8                          acpi_gbl_events_initialized;
-
-extern u8                               acpi_gbl_shutdown;
-extern u32                              acpi_gbl_startup_flags;
-extern const u8                         acpi_gbl_decode_to8bit[8];
-extern const char                      *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
-extern const acpi_opcode_info           acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-extern const char                      *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
+ACPI_EXTERN struct acpi_memory_list             acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
+ACPI_EXTERN struct acpi_object_notify_handler   acpi_gbl_drv_notify;
+ACPI_EXTERN struct acpi_object_notify_handler   acpi_gbl_sys_notify;
+ACPI_EXTERN acpi_init_handler                   acpi_gbl_init_handler;
+ACPI_EXTERN struct acpi_walk_state             *acpi_gbl_breakpoint_walk;
+ACPI_EXTERN acpi_handle                         acpi_gbl_global_lock_semaphore;
+
+ACPI_EXTERN u32                                 acpi_gbl_global_lock_thread_count;
+ACPI_EXTERN u32                                 acpi_gbl_original_mode;
+ACPI_EXTERN u32                                 acpi_gbl_rsdp_original_location;
+ACPI_EXTERN u32                                 acpi_gbl_ns_lookup_count;
+ACPI_EXTERN u32                                 acpi_gbl_ps_find_count;
+ACPI_EXTERN u16                                 acpi_gbl_pm1_enable_register_save;
+ACPI_EXTERN u16                                 acpi_gbl_next_table_owner_id;
+ACPI_EXTERN u16                                 acpi_gbl_next_method_owner_id;
+ACPI_EXTERN u16                                 acpi_gbl_global_lock_handle;
+ACPI_EXTERN u8                                  acpi_gbl_debugger_configuration;
+ACPI_EXTERN u8                                  acpi_gbl_global_lock_acquired;
+ACPI_EXTERN u8                                  acpi_gbl_step_to_next_call;
+ACPI_EXTERN u8                                  acpi_gbl_acpi_hardware_present;
+ACPI_EXTERN u8                                  acpi_gbl_global_lock_present;
+ACPI_EXTERN u8                                  acpi_gbl_events_initialized;
+
+extern u8                                       acpi_gbl_shutdown;
+extern u32                                      acpi_gbl_startup_flags;
+extern const u8                                 acpi_gbl_decode_to8bit[8];
+extern const char                              *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
+extern const struct acpi_opcode_info            acpi_gbl_aml_op_info[AML_NUM_OPCODES];
+extern const char                              *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
 
 
 /*****************************************************************************
@@ -159,19 +159,19 @@
 #define NUM_PREDEFINED_NAMES            9
 #endif
 
-ACPI_EXTERN acpi_namespace_node         acpi_gbl_root_node_struct;
-ACPI_EXTERN acpi_namespace_node        *acpi_gbl_root_node;
+ACPI_EXTERN struct acpi_namespace_node          acpi_gbl_root_node_struct;
+ACPI_EXTERN struct acpi_namespace_node         *acpi_gbl_root_node;
 
-extern const u8                         acpi_gbl_ns_properties[NUM_NS_TYPES];
-extern const acpi_predefined_names      acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
+extern const u8                                 acpi_gbl_ns_properties[NUM_NS_TYPES];
+extern const struct acpi_predefined_names       acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
 
 #ifdef ACPI_DEBUG_OUTPUT
-ACPI_EXTERN u32                         acpi_gbl_current_node_count;
-ACPI_EXTERN u32                         acpi_gbl_current_node_size;
-ACPI_EXTERN u32                         acpi_gbl_max_concurrent_node_count;
-ACPI_EXTERN acpi_size                   acpi_gbl_entry_stack_pointer;
-ACPI_EXTERN acpi_size                   acpi_gbl_lowest_stack_pointer;
-ACPI_EXTERN u32                         acpi_gbl_deepest_nesting;
+ACPI_EXTERN u32                                 acpi_gbl_current_node_count;
+ACPI_EXTERN u32                                 acpi_gbl_current_node_size;
+ACPI_EXTERN u32                                 acpi_gbl_max_concurrent_node_count;
+ACPI_EXTERN acpi_size                           acpi_gbl_entry_stack_pointer;
+ACPI_EXTERN acpi_size                           acpi_gbl_lowest_stack_pointer;
+ACPI_EXTERN u32                                 acpi_gbl_deepest_nesting;
 #endif
 
 /*****************************************************************************
@@ -181,11 +181,11 @@
  ****************************************************************************/
 
 
-ACPI_EXTERN acpi_thread_state           *acpi_gbl_current_walk_list;
+ACPI_EXTERN struct acpi_thread_state            *acpi_gbl_current_walk_list;
 
 /* Control method single step flag */
 
-ACPI_EXTERN u8                          acpi_gbl_cm_single_step;
+ACPI_EXTERN u8                                  acpi_gbl_cm_single_step;
 
 
 /*****************************************************************************
@@ -194,7 +194,7 @@
  *
  ****************************************************************************/
 
-ACPI_EXTERN acpi_parse_object           *acpi_gbl_parsed_namespace_root;
+ACPI_EXTERN union acpi_parse_object             *acpi_gbl_parsed_namespace_root;
 
 /*****************************************************************************
  *
@@ -202,9 +202,9 @@
  *
  ****************************************************************************/
 
-extern      acpi_bit_register_info      acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
-ACPI_EXTERN u8                          acpi_gbl_sleep_type_a;
-ACPI_EXTERN u8                          acpi_gbl_sleep_type_b;
+extern      struct acpi_bit_register_info       acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
+ACPI_EXTERN u8                                  acpi_gbl_sleep_type_a;
+ACPI_EXTERN u8                                  acpi_gbl_sleep_type_b;
 
 
 /*****************************************************************************
@@ -213,15 +213,15 @@
  *
  ****************************************************************************/
 
-extern      acpi_fixed_event_info       acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
-ACPI_EXTERN acpi_fixed_event_handler    acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
+extern      struct acpi_fixed_event_info        acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
+ACPI_EXTERN struct acpi_fixed_event_handler     acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
 
-ACPI_EXTERN acpi_handle                 acpi_gbl_gpe_obj_handle;
-ACPI_EXTERN u32                         acpi_gbl_gpe_register_count;
-ACPI_EXTERN u32                         acpi_gbl_gpe_number_max;
-ACPI_EXTERN acpi_gpe_register_info     *acpi_gbl_gpe_register_info;
-ACPI_EXTERN acpi_gpe_number_info       *acpi_gbl_gpe_number_info;
-ACPI_EXTERN acpi_gpe_block_info         acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
+ACPI_EXTERN acpi_handle                         acpi_gbl_gpe_obj_handle;
+ACPI_EXTERN u32                                 acpi_gbl_gpe_register_count;
+ACPI_EXTERN u32                                 acpi_gbl_gpe_number_max;
+ACPI_EXTERN struct acpi_gpe_register_info      *acpi_gbl_gpe_register_info;
+ACPI_EXTERN struct acpi_gpe_number_info        *acpi_gbl_gpe_number_info;
+ACPI_EXTERN struct acpi_gpe_block_info          acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
 
 /*
  * GPE translation table
@@ -230,7 +230,7 @@
  * This table is needed because the GPE numbers supported by block 1 do not
  * have to be contiguous with the GPE numbers supported by block 0.
  */
-ACPI_EXTERN acpi_gpe_index_info        *acpi_gbl_gpe_number_to_index;
+ACPI_EXTERN struct acpi_gpe_index_info         *acpi_gbl_gpe_number_to_index;
 
 
 /*****************************************************************************
@@ -240,57 +240,57 @@
  ****************************************************************************/
 
 
-ACPI_EXTERN u8                          acpi_gbl_db_output_flags;
+ACPI_EXTERN u8                                  acpi_gbl_db_output_flags;
 
 #ifdef ACPI_DISASSEMBLER
 
-ACPI_EXTERN u8                          acpi_gbl_db_opt_disasm;
-ACPI_EXTERN u8                          acpi_gbl_db_opt_verbose;
+ACPI_EXTERN u8                                  acpi_gbl_db_opt_disasm;
+ACPI_EXTERN u8                                  acpi_gbl_db_opt_verbose;
 #endif
 
 
 #ifdef ACPI_DEBUGGER
 
-extern      u8                          acpi_gbl_method_executing;
-extern      u8                          acpi_gbl_abort_method;
-extern      u8                          acpi_gbl_db_terminate_threads;
-
-ACPI_EXTERN int                         optind;
-ACPI_EXTERN char                       *optarg;
-
-ACPI_EXTERN u8                          acpi_gbl_db_opt_tables;
-ACPI_EXTERN u8                          acpi_gbl_db_opt_stats;
-ACPI_EXTERN u8                          acpi_gbl_db_opt_ini_methods;
-
-
-ACPI_EXTERN char                       *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN char                        acpi_gbl_db_line_buf[80];
-ACPI_EXTERN char                        acpi_gbl_db_parsed_buf[80];
-ACPI_EXTERN char                        acpi_gbl_db_scope_buf[40];
-ACPI_EXTERN char                        acpi_gbl_db_debug_filename[40];
-ACPI_EXTERN u8                          acpi_gbl_db_output_to_file;
-ACPI_EXTERN char                       *acpi_gbl_db_buffer;
-ACPI_EXTERN char                       *acpi_gbl_db_filename;
-ACPI_EXTERN u32                         acpi_gbl_db_debug_level;
-ACPI_EXTERN u32                         acpi_gbl_db_console_debug_level;
-ACPI_EXTERN acpi_table_header          *acpi_gbl_db_table_ptr;
-ACPI_EXTERN acpi_namespace_node        *acpi_gbl_db_scope_node;
+extern      u8                                  acpi_gbl_method_executing;
+extern      u8                                  acpi_gbl_abort_method;
+extern      u8                                  acpi_gbl_db_terminate_threads;
+
+ACPI_EXTERN int                                 optind;
+ACPI_EXTERN char                               *optarg;
+
+ACPI_EXTERN u8                                  acpi_gbl_db_opt_tables;
+ACPI_EXTERN u8                                  acpi_gbl_db_opt_stats;
+ACPI_EXTERN u8                                  acpi_gbl_db_opt_ini_methods;
+
+
+ACPI_EXTERN char                               *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN char                                acpi_gbl_db_line_buf[80];
+ACPI_EXTERN char                                acpi_gbl_db_parsed_buf[80];
+ACPI_EXTERN char                                acpi_gbl_db_scope_buf[40];
+ACPI_EXTERN char                                acpi_gbl_db_debug_filename[40];
+ACPI_EXTERN u8                                  acpi_gbl_db_output_to_file;
+ACPI_EXTERN char                               *acpi_gbl_db_buffer;
+ACPI_EXTERN char                               *acpi_gbl_db_filename;
+ACPI_EXTERN u32                                 acpi_gbl_db_debug_level;
+ACPI_EXTERN u32                                 acpi_gbl_db_console_debug_level;
+ACPI_EXTERN struct acpi_table_header           *acpi_gbl_db_table_ptr;
+ACPI_EXTERN struct acpi_namespace_node         *acpi_gbl_db_scope_node;
 
 /*
  * Statistic globals
  */
-ACPI_EXTERN u16                         acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16                         acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16                         acpi_gbl_obj_type_count_misc;
-ACPI_EXTERN u16                         acpi_gbl_node_type_count_misc;
-ACPI_EXTERN u32                         acpi_gbl_num_nodes;
-ACPI_EXTERN u32                         acpi_gbl_num_objects;
+ACPI_EXTERN u16                                 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16                                 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16                                 acpi_gbl_obj_type_count_misc;
+ACPI_EXTERN u16                                 acpi_gbl_node_type_count_misc;
+ACPI_EXTERN u32                                 acpi_gbl_num_nodes;
+ACPI_EXTERN u32                                 acpi_gbl_num_objects;
 
 
-ACPI_EXTERN u32                         acpi_gbl_size_of_parse_tree;
-ACPI_EXTERN u32                         acpi_gbl_size_of_method_trees;
-ACPI_EXTERN u32                         acpi_gbl_size_of_node_entries;
-ACPI_EXTERN u32                         acpi_gbl_size_of_acpi_objects;
+ACPI_EXTERN u32                                 acpi_gbl_size_of_parse_tree;
+ACPI_EXTERN u32                                 acpi_gbl_size_of_method_trees;
+ACPI_EXTERN u32                                 acpi_gbl_size_of_node_entries;
+ACPI_EXTERN u32                                 acpi_gbl_size_of_acpi_objects;
 
 #endif /* ACPI_DEBUGGER */
 
diff -Nru a/drivers/acpi/include/achware.h b/drivers/acpi/include/achware.h
--- a/drivers/acpi/include/achware.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/achware.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@
 
 acpi_status
 acpi_hw_set_mode (
-	u32                     mode);
+	u32                             mode);
 
 u32
 acpi_hw_get_mode (
@@ -59,35 +59,35 @@
 
 /* Register I/O Prototypes */
 
-acpi_bit_register_info *
+struct acpi_bit_register_info *
 acpi_hw_get_bit_register_info (
-	u32                     register_id);
+	u32                             register_id);
 
 acpi_status
 acpi_hw_register_read (
-	u8                      use_lock,
-	u32                     register_id,
-	u32                     *return_value);
+	u8                              use_lock,
+	u32                             register_id,
+	u32                             *return_value);
 
 acpi_status
 acpi_hw_register_write (
-	u8                      use_lock,
-	u32                     register_id,
-	u32                     value);
+	u8                              use_lock,
+	u32                             register_id,
+	u32                             value);
 
 acpi_status
 acpi_hw_low_level_read (
-	u32                     width,
-	u32                     *value,
-	acpi_generic_address    *reg,
-	u32                     offset);
+	u32                             width,
+	u32                             *value,
+	struct acpi_generic_address     *reg,
+	u32                             offset);
 
 acpi_status
 acpi_hw_low_level_write (
-	u32                     width,
-	u32                     value,
-	acpi_generic_address    *reg,
-	u32                     offset);
+	u32                             width,
+	u32                             value,
+	struct acpi_generic_address     *reg,
+	u32                             offset);
 
 acpi_status
 acpi_hw_clear_acpi_status (
@@ -98,32 +98,32 @@
 
 u8
 acpi_hw_get_gpe_bit_mask (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 acpi_status
 acpi_hw_enable_gpe (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 void
 acpi_hw_enable_gpe_for_wakeup (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 acpi_status
 acpi_hw_disable_gpe (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 void
 acpi_hw_disable_gpe_for_wakeup (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 acpi_status
 acpi_hw_clear_gpe (
-	u32                     gpe_number);
+	u32                             gpe_number);
 
 acpi_status
 acpi_hw_get_gpe_status (
-	u32                     gpe_number,
-	acpi_event_status       *event_status);
+	u32                             gpe_number,
+	acpi_event_status               *event_status);
 
 acpi_status
 acpi_hw_disable_non_wakeup_gpes (
@@ -138,17 +138,17 @@
 
 acpi_status
 acpi_get_timer_resolution (
-	u32                     *resolution);
+	u32                             *resolution);
 
 acpi_status
 acpi_get_timer (
-	u32                     *ticks);
+	u32                             *ticks);
 
 acpi_status
 acpi_get_timer_duration (
-	u32                     start_ticks,
-	u32                     end_ticks,
-	u32                     *time_elapsed);
+	u32                             start_ticks,
+	u32                             end_ticks,
+	u32                             *time_elapsed);
 
 
 #endif /* __ACHWARE_H__ */
diff -Nru a/drivers/acpi/include/acinterp.h b/drivers/acpi/include/acinterp.h
--- a/drivers/acpi/include/acinterp.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acinterp.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -31,15 +31,15 @@
 
 acpi_status
 acpi_ex_resolve_operands (
-	u16                     opcode,
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state);
+	u16                             opcode,
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_check_object_type (
-	acpi_object_type        type_needed,
-	acpi_object_type        this_type,
-	void                    *object);
+	acpi_object_type                type_needed,
+	acpi_object_type                this_type,
+	void                            *object);
 
 /*
  * exxface - External interpreter interfaces
@@ -47,13 +47,13 @@
 
 acpi_status
 acpi_ex_load_table (
-	acpi_table_type         table_id);
+	acpi_table_type                 table_id);
 
 acpi_status
 acpi_ex_execute_method (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc);
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc);
 
 
 /*
@@ -62,37 +62,37 @@
 
 acpi_status
 acpi_ex_convert_to_integer (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_convert_to_buffer (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_convert_to_string (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc,
-	u32                     base,
-	u32                     max_length,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc,
+	u32                             base,
+	u32                             max_length,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_convert_to_target_type (
-	acpi_object_type        destination_type,
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     **result_desc,
-	acpi_walk_state         *walk_state);
+	acpi_object_type                destination_type,
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       **result_desc,
+	struct acpi_walk_state          *walk_state);
 
 u32
 acpi_ex_convert_to_ascii (
-	acpi_integer            integer,
-	u32                     base,
-	u8                      *string,
-	u8                      max_length);
+	acpi_integer                    integer,
+	u32                             base,
+	u8                              *string,
+	u8                              max_length);
 
 /*
  * exfield - ACPI AML (p-code) execution - field manipulation
@@ -100,72 +100,72 @@
 
 acpi_status
 acpi_ex_extract_from_field (
-	acpi_operand_object     *obj_desc,
-	void                    *buffer,
-	u32                     buffer_length);
+	union acpi_operand_object       *obj_desc,
+	void                            *buffer,
+	u32                             buffer_length);
 
 acpi_status
 acpi_ex_insert_into_field (
-	acpi_operand_object     *obj_desc,
-	void                    *buffer,
-	u32                     buffer_length);
+	union acpi_operand_object       *obj_desc,
+	void                            *buffer,
+	u32                             buffer_length);
 
 acpi_status
 acpi_ex_setup_region (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset);
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset);
 
 acpi_status
 acpi_ex_access_region (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset,
-	acpi_integer            *value,
-	u32                     read_write);
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset,
+	acpi_integer                    *value,
+	u32                             read_write);
 
 u8
 acpi_ex_register_overflow (
-	acpi_operand_object     *obj_desc,
-	acpi_integer            value);
+	union acpi_operand_object       *obj_desc,
+	acpi_integer                    value);
 
 acpi_status
 acpi_ex_field_datum_io (
-	acpi_operand_object     *obj_desc,
-	u32                     field_datum_byte_offset,
-	acpi_integer            *value,
-	u32                     read_write);
+	union acpi_operand_object       *obj_desc,
+	u32                             field_datum_byte_offset,
+	acpi_integer                    *value,
+	u32                             read_write);
 
 acpi_status
 acpi_ex_write_with_update_rule (
-	acpi_operand_object     *obj_desc,
-	acpi_integer            mask,
-	acpi_integer            field_value,
-	u32                     field_datum_byte_offset);
+	union acpi_operand_object       *obj_desc,
+	acpi_integer                    mask,
+	acpi_integer                    field_value,
+	u32                             field_datum_byte_offset);
 
 void
 acpi_ex_get_buffer_datum(
-	acpi_integer            *datum,
-	void                    *buffer,
-	u32                     byte_granularity,
-	u32                     offset);
+	acpi_integer                    *datum,
+	void                            *buffer,
+	u32                             byte_granularity,
+	u32                             offset);
 
 void
 acpi_ex_set_buffer_datum (
-	acpi_integer            merged_datum,
-	void                    *buffer,
-	u32                     byte_granularity,
-	u32                     offset);
+	acpi_integer                    merged_datum,
+	void                            *buffer,
+	u32                             byte_granularity,
+	u32                             offset);
 
 acpi_status
 acpi_ex_read_data_from_field (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **ret_buffer_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **ret_buffer_desc);
 
 acpi_status
 acpi_ex_write_data_to_field (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **result_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **result_desc);
 
 /*
  * exmisc - ACPI AML (p-code) execution - specific opcodes
@@ -173,97 +173,97 @@
 
 acpi_status
 acpi_ex_opcode_3A_0T_0R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_3A_1T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_6A_0T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 u8
 acpi_ex_do_match (
-	u32                     match_op,
-	acpi_integer            package_value,
-	acpi_integer            match_value);
+	u32                             match_op,
+	acpi_integer                    package_value,
+	acpi_integer                    match_value);
 
 acpi_status
 acpi_ex_get_object_reference (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     **return_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       **return_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_resolve_multiple (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     *operand,
-	acpi_object_type        *return_type,
-	acpi_operand_object     **return_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       *operand,
+	acpi_object_type                *return_type,
+	union acpi_operand_object       **return_desc);
 
 acpi_status
 acpi_ex_concat_template (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *obj_desc2,
-	acpi_operand_object     **actual_return_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *obj_desc2,
+	union acpi_operand_object       **actual_return_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_do_concatenate (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *obj_desc2,
-	acpi_operand_object     **actual_return_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *obj_desc2,
+	union acpi_operand_object       **actual_return_desc,
+	struct acpi_walk_state          *walk_state);
 
 u8
 acpi_ex_do_logical_op (
-	u16                     opcode,
-	acpi_integer            operand0,
-	acpi_integer            operand1);
+	u16                             opcode,
+	acpi_integer                    operand0,
+	acpi_integer                    operand1);
 
 acpi_integer
 acpi_ex_do_math_op (
-	u16                     opcode,
-	acpi_integer            operand0,
-	acpi_integer            operand1);
+	u16                             opcode,
+	acpi_integer                    operand0,
+	acpi_integer                    operand1);
 
 acpi_status
 acpi_ex_create_mutex (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_processor (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_power_resource (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_region (
-	u8                      *aml_start,
-	u32                     aml_length,
-	u8                      region_space,
-	acpi_walk_state         *walk_state);
+	u8                              *aml_start,
+	u32                             aml_length,
+	u8                              region_space,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_table_region (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_event (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_alias (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_create_method (
-	u8                      *aml_start,
-	u32                     aml_length,
-	acpi_walk_state         *walk_state);
+	u8                              *aml_start,
+	u32                             aml_length,
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -272,24 +272,24 @@
 
 acpi_status
 acpi_ex_add_table (
-	acpi_table_header       *table,
-	acpi_namespace_node     *parent_node,
-	acpi_operand_object     **ddb_handle);
+	struct acpi_table_header        *table,
+	struct acpi_namespace_node      *parent_node,
+	union acpi_operand_object       **ddb_handle);
 
 acpi_status
 acpi_ex_load_op (
-	acpi_operand_object     *obj_desc,
-	acpi_operand_object     *target,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	union acpi_operand_object       *target,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_load_table_op (
-	acpi_walk_state         *walk_state,
-	acpi_operand_object     **return_desc);
+	struct acpi_walk_state          *walk_state,
+	union acpi_operand_object       **return_desc);
 
 acpi_status
 acpi_ex_unload_table (
-	acpi_operand_object     *ddb_handle);
+	union acpi_operand_object       *ddb_handle);
 
 
 /*
@@ -298,27 +298,27 @@
 
 acpi_status
 acpi_ex_acquire_mutex (
-	acpi_operand_object     *time_desc,
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *time_desc,
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_release_mutex (
-	acpi_operand_object     *obj_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *obj_desc,
+	struct acpi_walk_state          *walk_state);
 
 void
 acpi_ex_release_all_mutexes (
-	acpi_thread_state       *thread);
+	struct acpi_thread_state        *thread);
 
 void
 acpi_ex_unlink_mutex (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 void
 acpi_ex_link_mutex (
-	acpi_operand_object     *obj_desc,
-	acpi_thread_state       *thread);
+	union acpi_operand_object       *obj_desc,
+	struct acpi_thread_state        *thread);
 
 /*
  * exprep - ACPI AML (p-code) execution - prep utilities
@@ -326,15 +326,15 @@
 
 acpi_status
 acpi_ex_prep_common_field_object (
-	acpi_operand_object     *obj_desc,
-	u8                      field_flags,
-	u8                      field_attribute,
-	u32                     field_bit_position,
-	u32                     field_bit_length);
+	union acpi_operand_object       *obj_desc,
+	u8                              field_flags,
+	u8                              field_attribute,
+	u32                             field_bit_position,
+	u32                             field_bit_length);
 
 acpi_status
 acpi_ex_prep_field_value (
-	acpi_create_field_info  *info);
+	struct acpi_create_field_info   *info);
 
 /*
  * exsystem - Interface to OS services
@@ -342,43 +342,43 @@
 
 acpi_status
 acpi_ex_system_do_notify_op (
-	acpi_operand_object     *value,
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *value,
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_do_suspend(
-	u32                     time);
+	u32                             time);
 
 acpi_status
 acpi_ex_system_do_stall (
-	u32                     time);
+	u32                             time);
 
 acpi_status
 acpi_ex_system_acquire_mutex(
-	acpi_operand_object     *time,
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *time,
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_release_mutex(
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_signal_event(
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_wait_event(
-	acpi_operand_object     *time,
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *time,
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_reset_event(
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ex_system_wait_semaphore (
-	acpi_handle             semaphore,
-	u16                     timeout);
+	acpi_handle                     semaphore,
+	u16                             timeout);
 
 
 /*
@@ -387,19 +387,19 @@
 
 acpi_status
 acpi_ex_opcode_1A_0T_0R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_1A_0T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_1A_1T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_1A_1T_0R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 /*
  * exdyadic - ACPI AML (p-code) execution, dyadic operators
@@ -407,19 +407,19 @@
 
 acpi_status
 acpi_ex_opcode_2A_0T_0R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_2A_0T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_2A_1T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_opcode_2A_2T_1R (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -428,18 +428,18 @@
 
 acpi_status
 acpi_ex_resolve_to_value (
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_resolve_node_to_value (
-	acpi_namespace_node     **stack_ptr,
-	acpi_walk_state         *walk_state);
+	struct acpi_namespace_node      **stack_ptr,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_resolve_object_to_value (
-	acpi_operand_object     **stack_ptr,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **stack_ptr,
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -448,47 +448,47 @@
 
 void
 acpi_ex_dump_operand (
-	acpi_operand_object     *entry_desc);
+	union acpi_operand_object       *entry_desc);
 
 void
 acpi_ex_dump_operands (
-	acpi_operand_object     **operands,
-	acpi_interpreter_mode   interpreter_mode,
-	char                    *ident,
-	u32                     num_levels,
-	char                    *note,
-	char                    *module_name,
-	u32                     line_number);
+	union acpi_operand_object       **operands,
+	acpi_interpreter_mode           interpreter_mode,
+	char                            *ident,
+	u32                             num_levels,
+	char                            *note,
+	char                            *module_name,
+	u32                             line_number);
 
 void
 acpi_ex_dump_object_descriptor (
-	acpi_operand_object     *object,
-	u32                     flags);
+	union acpi_operand_object       *object,
+	u32                             flags);
 
 void
 acpi_ex_dump_node (
-	acpi_namespace_node     *node,
-	u32                     flags);
+	struct acpi_namespace_node      *node,
+	u32                             flags);
 
 void
 acpi_ex_out_string (
-	char                    *title,
-	char                    *value);
+	char                            *title,
+	char                            *value);
 
 void
 acpi_ex_out_pointer (
-	char                    *title,
-	void                    *value);
+	char                            *title,
+	void                            *value);
 
 void
 acpi_ex_out_integer (
-	char                    *title,
-	u32                     value);
+	char                            *title,
+	u32                             value);
 
 void
 acpi_ex_out_address (
-	char                    *title,
-	acpi_physical_address   value);
+	char                            *title,
+	acpi_physical_address           value);
 
 
 /*
@@ -497,29 +497,29 @@
 
 char *
 acpi_ex_allocate_name_string (
-	u32                     prefix_count,
-	u32                     num_name_segs);
+	u32                             prefix_count,
+	u32                             num_name_segs);
 
 u32
 acpi_ex_good_char (
-	u32                     character);
+	u32                             character);
 
 acpi_status
 acpi_ex_name_segment (
-	u8                      **in_aml_address,
-	char                    *name_string);
+	u8                              **in_aml_address,
+	char                            *name_string);
 
 acpi_status
 acpi_ex_get_name_string (
-	acpi_object_type        data_type,
-	u8                      *in_aml_address,
-	char                    **out_name_string,
-	u32                     *out_name_length);
+	acpi_object_type                data_type,
+	u8                              *in_aml_address,
+	char                            **out_name_string,
+	u32                             *out_name_length);
 
 acpi_status
 acpi_ex_do_name (
-	acpi_object_type        data_type,
-	acpi_interpreter_mode   load_exec_mode);
+	acpi_object_type                data_type,
+	acpi_interpreter_mode           load_exec_mode);
 
 
 /*
@@ -528,21 +528,21 @@
 
 acpi_status
 acpi_ex_store (
-	acpi_operand_object     *val_desc,
-	acpi_operand_object     *dest_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *val_desc,
+	union acpi_operand_object       *dest_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_store_object_to_index (
-	acpi_operand_object     *val_desc,
-	acpi_operand_object     *dest_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *val_desc,
+	union acpi_operand_object       *dest_desc,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_store_object_to_node (
-	acpi_operand_object     *source_desc,
-	acpi_namespace_node     *node,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *source_desc,
+	struct acpi_namespace_node      *node,
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -551,16 +551,16 @@
 
 acpi_status
 acpi_ex_resolve_object (
-	acpi_operand_object     **source_desc_ptr,
-	acpi_object_type        target_type,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       **source_desc_ptr,
+	acpi_object_type                target_type,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ex_store_object_to_object (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *dest_desc,
-	acpi_operand_object     **new_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *dest_desc,
+	union acpi_operand_object       **new_desc,
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -569,33 +569,33 @@
 
 acpi_status
 acpi_ex_store_buffer_to_buffer (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc);
 
 acpi_status
 acpi_ex_store_string_to_string (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc);
 
 acpi_status
 acpi_ex_copy_integer_to_index_field (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc);
 
 acpi_status
 acpi_ex_copy_integer_to_bank_field (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc);
 
 acpi_status
 acpi_ex_copy_data_to_named_field (
-	acpi_operand_object     *source_desc,
-	acpi_namespace_node     *node);
+	union acpi_operand_object       *source_desc,
+	struct acpi_namespace_node      *node);
 
 acpi_status
 acpi_ex_copy_integer_to_buffer_field (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *target_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *target_desc);
 
 /*
  * exutils - interpreter/scanner utilities
@@ -611,30 +611,30 @@
 
 void
 acpi_ex_truncate_for32bit_table (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 u8
 acpi_ex_acquire_global_lock (
-	u32                     rule);
+	u32                             rule);
 
 void
 acpi_ex_release_global_lock (
-	u8                      locked);
+	u8                              locked);
 
 u32
 acpi_ex_digits_needed (
-	acpi_integer            value,
-	u32                     base);
+	acpi_integer                    value,
+	u32                             base);
 
 void
 acpi_ex_eisa_id_to_string (
-	u32                     numeric_id,
-	char                    *out_string);
+	u32                             numeric_id,
+	char                            *out_string);
 
 void
 acpi_ex_unsigned_integer_to_string (
-	acpi_integer            value,
-	char                    *out_string);
+	acpi_integer                    value,
+	char                            *out_string);
 
 
 /*
@@ -643,75 +643,75 @@
 
 acpi_status
 acpi_ex_system_memory_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_system_io_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_pci_config_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_cmos_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_pci_bar_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_embedded_controller_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 acpi_status
 acpi_ex_sm_bus_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 
 acpi_status
 acpi_ex_data_table_space_handler (
-	u32                     function,
-	acpi_physical_address   address,
-	u32                     bit_width,
-	acpi_integer            *value,
-	void                    *handler_context,
-	void                    *region_context);
+	u32                             function,
+	acpi_physical_address           address,
+	u32                             bit_width,
+	acpi_integer                    *value,
+	void                            *handler_context,
+	void                            *region_context);
 
 #endif /* __INTERP_H__ */
diff -Nru a/drivers/acpi/include/aclocal.h b/drivers/acpi/include/aclocal.h
--- a/drivers/acpi/include/aclocal.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/aclocal.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,8 +28,8 @@
 
 #define ACPI_WAIT_FOREVER               0xFFFF  /* u16, as per ACPI spec */
 
-typedef void*                           acpi_mutex;
-typedef u32                             acpi_mutex_handle;
+typedef void *                                  acpi_mutex;
+typedef u32                                     acpi_mutex_handle;
 
 
 /* Total number of aml opcodes defined */
@@ -77,7 +77,7 @@
 
 /* Names for the mutexes used in the subsystem */
 
-static char                 *acpi_gbl_mutex_names[] =
+static char                         *acpi_gbl_mutex_names[] =
 {
 	"ACPI_MTX_Execute",
 	"ACPI_MTX_Interpreter",
@@ -100,13 +100,12 @@
 
 /* Table for the global mutexes */
 
-typedef struct acpi_mutex_info
+struct acpi_mutex_info
 {
-	acpi_mutex                  mutex;
-	u32                         use_count;
-	u32                         owner_id;
-
-} acpi_mutex_info;
+	acpi_mutex                          mutex;
+	u32                                 use_count;
+	u32                                 owner_id;
+};
 
 /* This owner ID means that the mutex is not in use (unlocked) */
 
@@ -119,7 +118,7 @@
 #define ACPI_MTX_LOCK                   1
 
 
-typedef u16                             acpi_owner_id;
+typedef u16                                     acpi_owner_id;
 #define ACPI_OWNER_TYPE_TABLE           0x0
 #define ACPI_OWNER_TYPE_METHOD          0x1
 #define ACPI_FIRST_METHOD_ID            0x0000
@@ -163,27 +162,26 @@
  * be the first byte in this structure.
  */
 
-typedef union acpi_name_union
+union acpi_name_union
 {
-	u32                     integer;
-	char                    ascii[4];
-} acpi_name_union;
+	u32                                 integer;
+	char                                ascii[4];
+};
 
-typedef struct acpi_node
+struct acpi_namespace_node
 {
-	u8                      descriptor;     /* Used to differentiate object descriptor types */
-	u8                      type;           /* Type associated with this name */
-	u16                     owner_id;
-	acpi_name_union         name;           /* ACPI Name, always 4 chars per ACPI spec */
+	u8                                  descriptor;     /* Used to differentiate object descriptor types */
+	u8                                  type;           /* Type associated with this name */
+	u16                                 owner_id;
+	union acpi_name_union               name;           /* ACPI Name, always 4 chars per ACPI spec */
 
 
-	union acpi_operand_obj  *object;        /* Pointer to attached ACPI object (optional) */
-	struct acpi_node        *child;         /* first child */
-	struct acpi_node        *peer;          /* Next peer*/
-	u16                     reference_count; /* Current count of references and children */
-	u8                      flags;
-
-} acpi_namespace_node;
+	union acpi_operand_object           *object;        /* Pointer to attached ACPI object (optional) */
+	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;
+};
 
 
 #define ACPI_ENTRY_NOT_FOUND            NULL
@@ -205,50 +203,47 @@
 /*
  * ACPI Table Descriptor.  One per ACPI table
  */
-typedef struct acpi_table_desc
+struct acpi_table_desc
 {
-	struct acpi_table_desc  *prev;
-	struct acpi_table_desc  *next;
-	struct acpi_table_desc  *installed_desc;
-	acpi_table_header       *pointer;
-	u8                      *aml_start;
-	u64                     physical_address;
-	u32                     aml_length;
-	acpi_size               length;
-	u32                     count;
-	acpi_owner_id           table_id;
-	u8                      type;
-	u8                      allocation;
-	u8                      loaded_into_namespace;
-
-} acpi_table_desc;
+	struct acpi_table_desc          *prev;
+	struct acpi_table_desc          *next;
+	struct acpi_table_desc          *installed_desc;
+	struct acpi_table_header        *pointer;
+	u8                              *aml_start;
+	u64                             physical_address;
+	u32                             aml_length;
+	acpi_size                       length;
+	u32                             count;
+	acpi_owner_id                   table_id;
+	u8                              type;
+	u8                              allocation;
+	u8                              loaded_into_namespace;
+};
 
 
-typedef struct
+struct acpi_find_context
 {
-	char                    *search_for;
-	acpi_handle             *list;
-	u32                     *count;
-
-} acpi_find_context;
+	char                            *search_for;
+	acpi_handle                     *list;
+	u32                             *count;
+};
 
 
-typedef struct
+struct acpi_ns_search_data
 {
-	acpi_namespace_node     *node;
-} acpi_ns_search_data;
+	struct acpi_namespace_node      *node;
+};
 
 
 /*
  * Predefined Namespace items
  */
-typedef struct
+struct acpi_predefined_names
 {
-	char                    *name;
-	u8                      type;
-	char                    *val;
-
-} acpi_predefined_names;
+	char                            *name;
+	u8                              type;
+	char                            *val;
+};
 
 
 /* Object types used during package copies */
@@ -259,35 +254,33 @@
 
 /* Info structure used to convert external<->internal namestrings */
 
-typedef struct acpi_namestring_info
+struct acpi_namestring_info
 {
-	char                    *external_name;
-	char                    *next_external_char;
-	char                    *internal_name;
-	u32                     length;
-	u32                     num_segments;
-	u32                     num_carats;
-	u8                      fully_qualified;
-
-} acpi_namestring_info;
+	char                            *external_name;
+	char                            *next_external_char;
+	char                            *internal_name;
+	u32                             length;
+	u32                             num_segments;
+	u32                             num_carats;
+	u8                              fully_qualified;
+};
 
 
 /* Field creation info */
 
-typedef struct
+struct acpi_create_field_info
 {
-	acpi_namespace_node     *region_node;
-	acpi_namespace_node     *field_node;
-	acpi_namespace_node     *register_node;
-	acpi_namespace_node     *data_register_node;
-	u32                     bank_value;
-	u32                     field_bit_position;
-	u32                     field_bit_length;
-	u8                      field_flags;
-	u8                      attribute;
-	u8                      field_type;
-
-} acpi_create_field_info;
+	struct acpi_namespace_node      *region_node;
+	struct acpi_namespace_node      *field_node;
+	struct acpi_namespace_node      *register_node;
+	struct acpi_namespace_node      *data_register_node;
+	u32                             bank_value;
+	u32                             field_bit_position;
+	u32                             field_bit_length;
+	u8                              field_flags;
+	u8                              attribute;
+	u8                              field_type;
+};
 
 
 /*****************************************************************************
@@ -298,26 +291,24 @@
 
 /* Information about each GPE register block */
 
-typedef struct
+struct acpi_gpe_block_info
 {
-	acpi_generic_address    *block_address;
-	u16                     register_count;
-	u8                      block_base_number;
-
-} acpi_gpe_block_info;
+	struct acpi_generic_address     *block_address;
+	u16                             register_count;
+	u8                              block_base_number;
+};
 
 /* Information about a particular GPE register pair */
 
-typedef struct
+struct acpi_gpe_register_info
 {
-	acpi_generic_address    status_address; /* Address of status reg */
-	acpi_generic_address    enable_address; /* Address of enable reg */
-	u8                      status;         /* Current value of status reg */
-	u8                      enable;         /* Current value of enable reg */
-	u8                      wake_enable;    /* Mask of bits to keep enabled when sleeping */
-	u8                      base_gpe_number; /* Base GPE number for this register */
-
-} acpi_gpe_register_info;
+	struct acpi_generic_address     status_address; /* Address of status reg */
+	struct acpi_generic_address     enable_address; /* Address of enable reg */
+	u8                              status;         /* Current value of status reg */
+	u8                              enable;         /* Current value of enable reg */
+	u8                              wake_enable;    /* Mask of bits to keep enabled when sleeping */
+	u8                              base_gpe_number; /* Base GPE number for this register */
+};
 
 
 #define ACPI_GPE_LEVEL_TRIGGERED        1
@@ -326,52 +317,46 @@
 
 /* Information about each particular GPE level */
 
-typedef struct
+struct acpi_gpe_number_info
 {
-	acpi_namespace_node     *method_node;   /* Method node for this GPE level */
-	acpi_gpe_handler        handler;        /* Address of handler, if any */
-	void                    *context;       /* Context to be passed to handler */
-	u8                      type;           /* Level or Edge */
-	u8                      bit_mask;
-
-
-} acpi_gpe_number_info;
+	struct acpi_namespace_node      *method_node;   /* Method node for this GPE level */
+	acpi_gpe_handler                handler;        /* Address of handler, if any */
+	void                            *context;       /* Context to be passed to handler */
+	u8                              type;           /* Level or Edge */
+	u8                              bit_mask;
+};
 
 
-typedef struct
+struct acpi_gpe_index_info
 {
-	u8                      number_index;
-
-} acpi_gpe_index_info;
+	u8                              number_index;
+};
 
 /* Information about each particular fixed event */
 
-typedef struct
+struct acpi_fixed_event_handler
 {
-	acpi_event_handler      handler;        /* Address of handler. */
-	void                    *context;       /* Context to be passed to handler */
-
-} acpi_fixed_event_handler;
+	acpi_event_handler              handler;        /* Address of handler. */
+	void                            *context;       /* Context to be passed to handler */
+};
 
 
-typedef struct
+struct acpi_fixed_event_info
 {
-	u8                      status_register_id;
-	u8                      enable_register_id;
-	u16                     status_bit_mask;
-	u16                     enable_bit_mask;
-
-} acpi_fixed_event_info;
+	u8                              status_register_id;
+	u8                              enable_register_id;
+	u16                             status_bit_mask;
+	u16                             enable_bit_mask;
+};
 
 /* Information used during field processing */
 
-typedef struct
+struct acpi_field_info
 {
-	u8                      skip_field;
-	u8                      field_flag;
-	u32                     pkg_length;
-
-} acpi_field_info;
+	u8                              skip_field;
+	u8                              field_flag;
+	u32                             pkg_length;
+};
 
 
 /*****************************************************************************
@@ -389,157 +374,148 @@
 
 
 /* Forward declarations */
-struct acpi_walk_state;
+struct acpi_walk_state        ;
 struct acpi_obj_mutex;
-union acpi_parse_obj;
+union acpi_parse_object        ;
 
 
 #define ACPI_STATE_COMMON                  /* Two 32-bit fields and a pointer */\
-	u8                      data_type;          /* To differentiate various internal objs */\
-	u8                      flags;      \
-	u16                     value;      \
-	u16                     state;      \
-	u16                     reserved;   \
-	void                    *next;      \
+	u8                                  data_type;          /* To differentiate various internal objs */\
+	u8                                  flags;      \
+	u16                                 value;      \
+	u16                                 state;      \
+	u16                                 reserved;   \
+	void                                *next;      \
 
-typedef struct acpi_common_state
+struct acpi_common_state
 {
 	ACPI_STATE_COMMON
-} acpi_common_state;
+};
 
 
 /*
  * Update state - used to traverse complex objects such as packages
  */
-typedef struct acpi_update_state
+struct acpi_update_state
 {
 	ACPI_STATE_COMMON
-	union acpi_operand_obj  *object;
-
-} acpi_update_state;
+	union acpi_operand_object           *object;
+};
 
 
 /*
  * Pkg state - used to traverse nested package structures
  */
-typedef struct acpi_pkg_state
+struct acpi_pkg_state
 {
 	ACPI_STATE_COMMON
-	union acpi_operand_obj  *source_object;
-	union acpi_operand_obj  *dest_object;
-	struct acpi_walk_state  *walk_state;
-	void                    *this_target_obj;
-	u32                     num_packages;
-	u16                     index;
-
-} acpi_pkg_state;
+	union acpi_operand_object           *source_object;
+	union acpi_operand_object           *dest_object;
+	struct acpi_walk_state              *walk_state;
+	void                                *this_target_obj;
+	u32                                 num_packages;
+	u16                                 index;
+};
 
 
 /*
  * Control state - one per if/else and while constructs.
  * Allows nesting of these constructs
  */
-typedef struct acpi_control_state
+struct acpi_control_state
 {
 	ACPI_STATE_COMMON
-	union acpi_parse_obj    *predicate_op;
-	u8                      *aml_predicate_start;   /* Start of if/while predicate */
-	u8                      *package_end;           /* End of if/while block */
-	u16                     opcode;
-
-} acpi_control_state;
+	union acpi_parse_object             *predicate_op;
+	u8                                  *aml_predicate_start;   /* Start of if/while predicate */
+	u8                                  *package_end;           /* End of if/while block */
+	u16                                 opcode;
+};
 
 
 /*
  * Scope state - current scope during namespace lookups
  */
-typedef struct acpi_scope_state
+struct acpi_scope_state
 {
 	ACPI_STATE_COMMON
-	acpi_namespace_node     *node;
-
-} acpi_scope_state;
+	struct acpi_namespace_node          *node;
+};
 
 
-typedef struct acpi_pscope_state
+struct acpi_pscope_state
 {
 	ACPI_STATE_COMMON
-	union acpi_parse_obj    *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 */
-
-} acpi_pscope_state;
+	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 */
+};
 
 
 /*
  * Thread state - one per thread across multiple walk states.  Multiple walk
  * states are created when there are nested control methods executing.
  */
-typedef struct acpi_thread_state
+struct acpi_thread_state
 {
 	ACPI_STATE_COMMON
-	struct acpi_walk_state  *walk_state_list;       /* Head of list of walk_states for this thread */
-	union acpi_operand_obj  *acquired_mutex_list;   /* List of all currently acquired mutexes */
-	u32                     thread_id;              /* Running thread ID */
-	u16                     current_sync_level;     /* Mutex Sync (nested acquire) level */
-
-} acpi_thread_state;
+	struct acpi_walk_state              *walk_state_list;       /* Head of list of walk_states for this thread */
+	union acpi_operand_object           *acquired_mutex_list;   /* List of all currently acquired mutexes */
+	u32                                 thread_id;              /* Running thread ID */
+	u16                                 current_sync_level;     /* Mutex Sync (nested acquire) level */
+};
 
 
 /*
  * Result values - used to accumulate the results of nested
  * AML arguments
  */
-typedef struct acpi_result_values
+struct acpi_result_values
 {
 	ACPI_STATE_COMMON
-	union acpi_operand_obj  *obj_desc [ACPI_OBJ_NUM_OPERANDS];
-	u8                      num_results;
-	u8                      last_insert;
-
-} acpi_result_values;
+	union acpi_operand_object           *obj_desc [ACPI_OBJ_NUM_OPERANDS];
+	u8                                  num_results;
+	u8                                  last_insert;
+};
 
 
 typedef
 acpi_status (*acpi_parse_downwards) (
-	struct acpi_walk_state  *walk_state,
-	union acpi_parse_obj    **out_op);
+	struct acpi_walk_state              *walk_state,
+	union acpi_parse_object             **out_op);
 
 typedef
 acpi_status (*acpi_parse_upwards) (
-	struct acpi_walk_state  *walk_state);
+	struct acpi_walk_state              *walk_state);
 
 
 /*
  * Notify info - used to pass info to the deferred notify
  * handler/dispatcher.
  */
-typedef struct acpi_notify_info
+struct acpi_notify_info
 {
 	ACPI_STATE_COMMON
-	acpi_namespace_node     *node;
-	union acpi_operand_obj  *handler_obj;
-
-} acpi_notify_info;
+	struct acpi_namespace_node          *node;
+	union acpi_operand_object           *handler_obj;
+};
 
 
 /* Generic state is union of structs above */
 
-typedef union acpi_gen_state
+union acpi_generic_state
 {
-	acpi_common_state       common;
-	acpi_control_state      control;
-	acpi_update_state       update;
-	acpi_scope_state        scope;
-	acpi_pscope_state       parse_scope;
-	acpi_pkg_state          pkg;
-	acpi_thread_state       thread;
-	acpi_result_values      results;
-	acpi_notify_info        notify;
-
-} acpi_generic_state;
+	struct acpi_common_state            common;
+	struct acpi_control_state           control;
+	struct acpi_update_state            update;
+	struct acpi_scope_state             scope;
+	struct acpi_pscope_state            parse_scope;
+	struct acpi_pkg_state               pkg;
+	struct acpi_thread_state            thread;
+	struct acpi_result_values           results;
+	struct acpi_notify_info             notify;
+};
 
 
 /*****************************************************************************
@@ -550,7 +526,7 @@
 
 typedef
 acpi_status (*ACPI_EXECUTE_OP) (
-	struct acpi_walk_state  *walk_state);
+	struct acpi_walk_state              *walk_state);
 
 
 /*****************************************************************************
@@ -562,51 +538,50 @@
 /*
  * AML opcode, name, and argument layout
  */
-typedef struct acpi_opcode_info
+struct acpi_opcode_info
 {
 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
-	char                    *name;          /* Opcode name (disassembler/debug only) */
+	char                                *name;          /* Opcode name (disassembler/debug only) */
 #endif
-	u32                     parse_args;     /* Grammar/Parse time arguments */
-	u32                     runtime_args;   /* Interpret time arguments */
-	u32                     flags;          /* Misc flags */
-	u8                      object_type;    /* Corresponding internal object type */
-	u8                      class;          /* Opcode class */
-	u8                      type;           /* Opcode type */
-
-} acpi_opcode_info;
-
-
-typedef union acpi_parse_val
-{
-	acpi_integer            integer;        /* integer constant (Up to 64 bits) */
-	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 */
-	char                    *name;          /* NULL terminated string */
-	union acpi_parse_obj    *arg;           /* arguments and contained ops */
+	u32                                 parse_args;     /* Grammar/Parse time arguments */
+	u32                                 runtime_args;   /* Interpret time arguments */
+	u32                                 flags;          /* Misc flags */
+	u8                                  object_type;    /* Corresponding internal object type */
+	u8                                  class;          /* Opcode class */
+	u8                                  type;           /* Opcode type */
+};
 
-} acpi_parse_value;
+
+union acpi_parse_value
+{
+	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 */
+	char                                *name;          /* NULL terminated string */
+	union acpi_parse_object             *arg;           /* arguments and contained ops */
+};
 
 
 #define ACPI_PARSE_COMMON \
-	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_obj    *parent;        /* parent op */\
-	union acpi_parse_obj    *next;          /* next op */\
+	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 */\
 	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) */\
-			  /* NON-DEBUG members below: */\
-	acpi_namespace_node     *node;          /* for use by interpreter */\
-	acpi_parse_value        value;          /* Value or args associated with the opcode */\
+	u8                                  disasm_flags;   /* Used during AML disassembly */\
+	u8                                  disasm_opcode;  /* Subtype used for disassembly */\
+	char                                aml_op_name[16]) /* op name (debug only) */\
+			   /* NON-DEBUG members below: */\
+	struct acpi_namespace_node          *node;          /* for use by interpreter */\
+	union acpi_parse_value              value;          /* Value or args associated with the opcode */\
+
 
 #define ACPI_DASM_BUFFER        0x00
 #define ACPI_DASM_RESOURCE      0x01
@@ -618,90 +593,83 @@
 /*
  * generic operation (for example:  If, While, Store)
  */
-typedef struct acpi_parseobj_common
+struct acpi_parse_obj_common
 {
 	ACPI_PARSE_COMMON
-} acpi_parse_obj_common;
+};
 
 
 /*
  * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
  * and bytelists.
  */
-typedef struct acpi_parseobj_named
+struct acpi_parse_obj_named
 {
 	ACPI_PARSE_COMMON
-	u8                      *path;
-	u8                      *data;          /* AML body or bytelist data */
-	u32                     length;         /* AML length */
-	u32                     name;           /* 4-byte name or zero if no name */
-
-} acpi_parse_obj_named;
+	u8                                  *path;
+	u8                                  *data;          /* AML body or bytelist data */
+	u32                                 length;         /* AML length */
+	u32                                 name;           /* 4-byte name or zero if no name */
+};
 
 
 /* The parse node is the fundamental element of the parse tree */
 
-typedef struct acpi_parseobj_asl
+struct acpi_parse_obj_asl
 {
 	ACPI_PARSE_COMMON
+	union acpi_parse_object             *child;
+	union acpi_parse_object             *parent_method;
+	char                                *filename;
+	char                                *external_name;
+	char                                *namepath;
+	char                                name_seg[4];
+	u32                                 extra_value;
+	u32                                 column;
+	u32                                 line_number;
+	u32                                 logical_line_number;
+	u32                                 logical_byte_offset;
+	u32                                 end_line;
+	u32                                 end_logical_line;
+	u32                                 acpi_btype;
+	u32                                 aml_length;
+	u32                                 aml_subtree_length;
+	u32                                 final_aml_length;
+	u32                                 final_aml_offset;
+	u32                                 compile_flags;
+	u16                                 parse_opcode;
+	u8                                  aml_opcode_length;
+	u8                                  aml_pkg_len_bytes;
+	u8                                  extra;
+	char                                parse_op_name[12];
+};
 
-	union acpi_parse_obj        *child;
-
-
-	union acpi_parse_obj        *parent_method;
-	char                        *filename;
-	char                        *external_name;
-	char                        *namepath;
-	char                        name_seg[4];
-	u32                         extra_value;
-	u32                         column;
-	u32                         line_number;
-	u32                         logical_line_number;
-	u32                         logical_byte_offset;
-	u32                         end_line;
-	u32                         end_logical_line;
-	u32                         acpi_btype;
-	u32                         aml_length;
-	u32                         aml_subtree_length;
-	u32                         final_aml_length;
-	u32                         final_aml_offset;
-	u32                         compile_flags;
-	u16                         parse_opcode;
-	u8                          aml_opcode_length;
-	u8                          aml_pkg_len_bytes;
-	u8                          extra;
-	char                        parse_op_name[12];
-
-} acpi_parse_obj_asl;
-
-
-typedef union acpi_parse_obj
-{
-	acpi_parse_obj_common       common;
-	acpi_parse_obj_named        named;
-	acpi_parse_obj_asl          asl;
 
-} acpi_parse_object;
+union acpi_parse_object
+{
+	struct acpi_parse_obj_common        common;
+	struct acpi_parse_obj_named         named;
+	struct acpi_parse_obj_asl           asl;
+};
 
 
 /*
  * Parse state - one state per parser invocation and each control
  * method.
  */
-typedef struct acpi_parse_state
+struct acpi_parse_state
 {
-	u32                     aml_size;
-	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_obj    *start_op;      /* root of parse tree */
-	struct acpi_node        *start_node;
-	union acpi_gen_state    *scope;         /* current scope */
-	union acpi_parse_obj    *start_scope;
-
-} acpi_parse_state;
+	u32                                 aml_size;
+	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 */
+	struct acpi_namespace_node          *start_node;
+	union acpi_generic_state            *scope;         /* current scope */
+	union acpi_parse_object             *start_scope;
+};
 
 
 /* Parse object flags */
@@ -728,13 +696,12 @@
 
 #define PCI_ROOT_HID_STRING         "PNP0A03"
 
-typedef struct
+struct acpi_bit_register_info
 {
-	u8                      parent_register;
-	u8                      bit_position;
-	u16                     access_bit_mask;
-
-} acpi_bit_register_info;
+	u8                                  parent_register;
+	u8                                  bit_position;
+	u16                                 access_bit_mask;
+};
 
 
 /*
@@ -864,11 +831,10 @@
 
 #define ACPI_DEVICE_ID_LENGTH                   0x09
 
-typedef struct
+struct acpi_device_id
 {
-	char            buffer[ACPI_DEVICE_ID_LENGTH];
-
-} acpi_device_id;
+	char                    buffer[ACPI_DEVICE_ID_LENGTH];
+};
 
 
 /*****************************************************************************
@@ -886,16 +852,21 @@
  *
  ****************************************************************************/
 
-typedef struct dbmethodinfo
+struct acpi_db_method_info
 {
-	acpi_handle             thread_gate;
-	char                    *name;
-	char                    **args;
-	u32                     flags;
-	u32                     num_loops;
-	char                    pathname[128];
+	acpi_handle                     thread_gate;
+	char                            *name;
+	char                            **args;
+	u32                             flags;
+	u32                             num_loops;
+	char                            pathname[128];
+};
 
-} acpi_db_method_info;
+struct acpi_integrity_info
+{
+	u32                         nodes;
+	u32                         objects;
+};
 
 
 #define ACPI_DB_REDIRECTABLE_OUTPUT  0x01
@@ -909,13 +880,12 @@
  *
  ****************************************************************************/
 
-typedef struct
+struct acpi_debug_print_info
 {
-	u32                     component_id;
-	char                    *proc_name;
-	char                    *module_name;
-
-} acpi_debug_print_info;
+	u32                             component_id;
+	char                            *proc_name;
+	char                            *module_name;
+};
 
 
 /* Entry for a memory allocation (debug only) */
@@ -925,26 +895,24 @@
 #define ACPI_MAX_MODULE_NAME                 16
 
 #define ACPI_COMMON_DEBUG_MEM_HEADER \
-	struct acpi_debug_mem_block *previous; \
-	struct acpi_debug_mem_block *next; \
-	u32                         size; \
-	u32                         component; \
-	u32                         line; \
-	char                        module[ACPI_MAX_MODULE_NAME]; \
-	u8                          alloc_type;
+	struct acpi_debug_mem_block         *previous; \
+	struct acpi_debug_mem_block         *next; \
+	u32                                 size; \
+	u32                                 component; \
+	u32                                 line; \
+	char                                module[ACPI_MAX_MODULE_NAME]; \
+	u8                                  alloc_type;
 
-typedef struct
+struct acpi_debug_mem_header
 {
 	ACPI_COMMON_DEBUG_MEM_HEADER
+};
 
-} acpi_debug_mem_header;
-
-typedef struct acpi_debug_mem_block
+struct acpi_debug_mem_block
 {
 	ACPI_COMMON_DEBUG_MEM_HEADER
-	u64                         user_space;
-
-} acpi_debug_mem_block;
+	u64                                 user_space;
+};
 
 
 #define ACPI_MEM_LIST_GLOBAL            0
@@ -960,27 +928,26 @@
 #define ACPI_NUM_MEM_LISTS              7
 
 
-typedef struct
+struct acpi_memory_list
 {
-	void                        *list_head;
-	u16                         link_offset;
-	u16                         max_cache_depth;
-	u16                         cache_depth;
-	u16                         object_size;
+	void                                *list_head;
+	u16                                 link_offset;
+	u16                                 max_cache_depth;
+	u16                                 cache_depth;
+	u16                                 object_size;
 
 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 
 	/* Statistics for debug memory tracking only */
 
-	u32                         total_allocated;
-	u32                         total_freed;
-	u32                         current_total_size;
-	u32                         cache_requests;
-	u32                         cache_hits;
-	char                        *list_name;
+	u32                                 total_allocated;
+	u32                                 total_freed;
+	u32                                 current_total_size;
+	u32                                 cache_requests;
+	u32                                 cache_hits;
+	char                                *list_name;
 #endif
-
-} acpi_memory_list;
+};
 
 
 #endif /* __ACLOCAL_H__ */
diff -Nru a/drivers/acpi/include/acmacros.h b/drivers/acpi/include/acmacros.h
--- a/drivers/acpi/include/acmacros.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acmacros.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@
  * Full 64-bit address/integer on both 32-bit and 64-bit platforms
  */
 #define ACPI_LODWORD(l)                 ((u32)(u64)(l))
-#define ACPI_HIDWORD(l)                 ((u32)(((*(uint64_struct *)(void *)(&l))).hi))
+#define ACPI_HIDWORD(l)                 ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))
 
 #define ACPI_GET_ADDRESS(a)             (a)
 #define ACPI_STORE_ADDRESS(a,b)         ((a)=(acpi_physical_address)(b))
@@ -249,19 +249,19 @@
 #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val)  reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
 
 /*
- * An acpi_namespace_node * can appear in some contexts,
- * where a pointer to an acpi_operand_object  can also
+ * An struct acpi_namespace_node * can appear in some contexts,
+ * where a pointer to an union acpi_operand_object    can also
  * appear.  This macro is used to distinguish them.
  *
  * The "Descriptor" field is the first field in both structures.
  */
-#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((acpi_descriptor *)(void *)(d))->descriptor_id)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t)   (((acpi_descriptor *)(void *)(d))->descriptor_id = t)
+#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((union acpi_descriptor *)(void *)(d))->descriptor_id)
+#define ACPI_SET_DESCRIPTOR_TYPE(d,t)   (((union acpi_descriptor *)(void *)(d))->descriptor_id = t)
 
 
 /* Macro to test the object type */
 
-#define ACPI_GET_OBJECT_TYPE(d)         (((acpi_operand_object *)(void *)(d))->common.type)
+#define ACPI_GET_OBJECT_TYPE(d)         (((union acpi_operand_object *)(void *)(d))->common.type)
 
 /* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
 
@@ -389,7 +389,7 @@
  * as a local string ("_proc_name) so that it can be also used by the function exit macros below.
  */
 
-#define ACPI_FUNCTION_NAME(a)           acpi_debug_print_info _dbg;     \
+#define ACPI_FUNCTION_NAME(a)           struct acpi_debug_print_info _dbg;     \
 										_dbg.component_id = _COMPONENT; \
 										_dbg.proc_name   = a;           \
 										_dbg.module_name = _THIS_MODULE;
diff -Nru a/drivers/acpi/include/acnamesp.h b/drivers/acpi/include/acnamesp.h
--- a/drivers/acpi/include/acnamesp.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acnamesp.h	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -78,60 +78,60 @@
 
 acpi_status
 acpi_ns_init_one_device (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_ns_init_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value);
 
 
 acpi_status
 acpi_ns_walk_namespace (
-	acpi_object_type        type,
-	acpi_handle             start_object,
-	u32                     max_depth,
-	u8                      unlock_before_callback,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void                    **return_value);
+	acpi_object_type                type,
+	acpi_handle                     start_object,
+	u32                             max_depth,
+	u8                              unlock_before_callback,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value);
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_next_node (
-	acpi_object_type        type,
-	acpi_namespace_node     *parent,
-	acpi_namespace_node     *child);
+	acpi_object_type                type,
+	struct acpi_namespace_node      *parent,
+	struct acpi_namespace_node      *child);
 
 void
 acpi_ns_delete_namespace_by_owner (
-	u16                     table_id);
+	u16                             table_id);
 
 
 /* Namespace loading - nsload */
 
 acpi_status
 acpi_ns_one_complete_parse (
-	u32                     pass_number,
-	acpi_table_desc         *table_desc);
+	u32                             pass_number,
+	struct acpi_table_desc          *table_desc);
 
 acpi_status
 acpi_ns_parse_table (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *scope);
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *scope);
 
 acpi_status
 acpi_ns_load_table (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *node);
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *node);
 
 acpi_status
 acpi_ns_load_table_by_type (
-	acpi_table_type         table_type);
+	acpi_table_type                 table_type);
 
 
 /*
@@ -144,43 +144,43 @@
 
 acpi_status
 acpi_ns_lookup (
-	acpi_generic_state      *scope_info,
-	char                    *name,
-	acpi_object_type        type,
-	acpi_interpreter_mode   interpreter_mode,
-	u32                     flags,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     **ret_node);
+	union acpi_generic_state        *scope_info,
+	char                            *name,
+	acpi_object_type                type,
+	acpi_interpreter_mode           interpreter_mode,
+	u32                             flags,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      **ret_node);
 
 
 /*
  * Named object allocation/deallocation - nsalloc
  */
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_create_node (
-	u32                     name);
+	u32                             name);
 
 void
 acpi_ns_delete_node (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 void
 acpi_ns_delete_namespace_subtree (
-	acpi_namespace_node     *parent_handle);
+	struct acpi_namespace_node      *parent_handle);
 
 void
 acpi_ns_detach_object (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 void
 acpi_ns_delete_children (
-	acpi_namespace_node     *parent);
+	struct acpi_namespace_node      *parent);
 
 int
 acpi_ns_compare_names (
-	char                    *name1,
-	char                    *name2);
+	char                            *name1,
+	char                            *name2);
 
 /*
  * Namespace modification - nsmodify
@@ -188,11 +188,11 @@
 
 acpi_status
 acpi_ns_unload_namespace (
-	acpi_handle             handle);
+	acpi_handle                     handle);
 
 acpi_status
 acpi_ns_delete_subtree (
-	acpi_handle             start_handle);
+	acpi_handle                     start_handle);
 
 
 /*
@@ -201,32 +201,32 @@
 
 void
 acpi_ns_dump_tables (
-	acpi_handle             search_base,
-	u32                     max_depth);
+	acpi_handle                     search_base,
+	u32                             max_depth);
 
 void
 acpi_ns_dump_entry (
-	acpi_handle             handle,
-	u32                     debug_level);
+	acpi_handle                     handle,
+	u32                             debug_level);
 
 void
 acpi_ns_dump_pathname (
-	acpi_handle             handle,
-	char                    *msg,
-	u32                     level,
-	u32                     component);
+	acpi_handle                     handle,
+	char                            *msg,
+	u32                             level,
+	u32                             component);
 
 void
 acpi_ns_print_pathname (
-	u32                     num_segments,
-	char                    *pathname);
+	u32                             num_segments,
+	char                            *pathname);
 
 acpi_status
 acpi_ns_dump_one_device (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value);
 
 void
 acpi_ns_dump_root_devices (
@@ -234,18 +234,18 @@
 
 acpi_status
 acpi_ns_dump_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value);
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value);
 
 void
 acpi_ns_dump_objects (
-	acpi_object_type        type,
-	u8                      display_type,
-	u32                     max_depth,
-	u32                     ownder_id,
-	acpi_handle             start_handle);
+	acpi_object_type                type,
+	u8                              display_type,
+	u32                             max_depth,
+	u32                             ownder_id,
+	acpi_handle                     start_handle);
 
 
 /*
@@ -254,33 +254,33 @@
 
 acpi_status
 acpi_ns_evaluate_by_handle (
-	acpi_namespace_node     *prefix_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object);
+	struct acpi_namespace_node      *prefix_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object);
 
 acpi_status
 acpi_ns_evaluate_by_name (
-	char                    *pathname,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object);
+	char                            *pathname,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object);
 
 acpi_status
 acpi_ns_evaluate_relative (
-	acpi_namespace_node     *prefix_node,
-	char                    *pathname,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object);
+	struct acpi_namespace_node      *prefix_node,
+	char                            *pathname,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object);
 
 acpi_status
 acpi_ns_execute_control_method (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc);
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc);
 
 acpi_status
 acpi_ns_get_object_value (
-	acpi_namespace_node     *object_node,
-	acpi_operand_object     **return_obj_desc);
+	struct acpi_namespace_node      *object_node,
+	union acpi_operand_object       **return_obj_desc);
 
 
 /*
@@ -289,7 +289,7 @@
 
 acpi_name
 acpi_ns_find_parent_name (
-	acpi_namespace_node     *node_to_search);
+	struct acpi_namespace_node      *node_to_search);
 
 
 /*
@@ -298,42 +298,42 @@
 
 u32
 acpi_ns_opens_scope (
-	acpi_object_type        type);
+	acpi_object_type                type);
 
 void
 acpi_ns_build_external_path (
-	acpi_namespace_node     *node,
-	acpi_size               size,
-	char                    *name_buffer);
+	struct acpi_namespace_node      *node,
+	acpi_size                       size,
+	char                            *name_buffer);
 
 char *
 acpi_ns_get_external_pathname (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 char *
 acpi_ns_name_of_current_scope (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ns_handle_to_pathname (
-	acpi_handle             target_handle,
-	acpi_buffer             *buffer);
+	acpi_handle                     target_handle,
+	struct acpi_buffer              *buffer);
 
 u8
 acpi_ns_pattern_match (
-	acpi_namespace_node     *obj_node,
-	char                    *search_for);
+	struct acpi_namespace_node      *obj_node,
+	char                            *search_for);
 
 acpi_status
 acpi_ns_get_node_by_path (
-	char                    *external_pathname,
-	acpi_namespace_node     *in_prefix_node,
-	u32                     flags,
-	acpi_namespace_node     **out_node);
+	char                            *external_pathname,
+	struct acpi_namespace_node      *in_prefix_node,
+	u32                             flags,
+	struct acpi_namespace_node      **out_node);
 
 acpi_size
 acpi_ns_get_pathname_length (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 
 /*
@@ -342,34 +342,34 @@
 
 acpi_status
 acpi_ns_attach_object (
-	acpi_namespace_node     *node,
-	acpi_operand_object     *object,
-	acpi_object_type        type);
+	struct acpi_namespace_node      *node,
+	union acpi_operand_object       *object,
+	acpi_object_type                type);
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ns_get_attached_object (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ns_get_secondary_object (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 acpi_status
 acpi_ns_attach_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler,
-	void                    *data);
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler,
+	void                            *data);
 
 acpi_status
 acpi_ns_detach_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler);
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler);
 
 acpi_status
 acpi_ns_get_attached_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler,
-	void                    **data);
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler,
+	void                            **data);
 
 
 /*
@@ -378,27 +378,27 @@
 
 acpi_status
 acpi_ns_search_and_enter (
-	u32                     entry_name,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *node,
-	acpi_interpreter_mode   interpreter_mode,
-	acpi_object_type        type,
-	u32                     flags,
-	acpi_namespace_node     **ret_node);
+	u32                             entry_name,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *node,
+	acpi_interpreter_mode           interpreter_mode,
+	acpi_object_type                type,
+	u32                             flags,
+	struct acpi_namespace_node      **ret_node);
 
 acpi_status
 acpi_ns_search_node (
-	u32                     entry_name,
-	acpi_namespace_node     *node,
-	acpi_object_type        type,
-	acpi_namespace_node     **ret_node);
+	u32                             entry_name,
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type,
+	struct acpi_namespace_node      **ret_node);
 
 void
 acpi_ns_install_node (
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *parent_node,
-	acpi_namespace_node     *node,
-	acpi_object_type        type);
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *parent_node,
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type);
 
 
 /*
@@ -407,83 +407,83 @@
 
 u8
 acpi_ns_valid_root_prefix (
-	char                    prefix);
+	char                            prefix);
 
 u8
 acpi_ns_valid_path_separator (
-	char                    sep);
+	char                            sep);
 
 acpi_object_type
 acpi_ns_get_type (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 u32
 acpi_ns_local (
-	acpi_object_type        type);
+	acpi_object_type                type);
 
 void
 acpi_ns_report_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	char                    *internal_name,
-	acpi_status             lookup_status);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	char                            *internal_name,
+	acpi_status                     lookup_status);
 
 void
 acpi_ns_report_method_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	char                    *message,
-	acpi_namespace_node     *node,
-	char                    *path,
-	acpi_status             lookup_status);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	char                            *message,
+	struct acpi_namespace_node      *node,
+	char                            *path,
+	acpi_status                     lookup_status);
 
 void
 acpi_ns_print_node_pathname (
-	acpi_namespace_node     *node,
-	char                    *msg);
+	struct acpi_namespace_node      *node,
+	char                            *msg);
 
 acpi_status
 acpi_ns_build_internal_name (
-	acpi_namestring_info    *info);
+	struct acpi_namestring_info     *info);
 
 void
 acpi_ns_get_internal_name_length (
-	acpi_namestring_info    *info);
+	struct acpi_namestring_info     *info);
 
 acpi_status
 acpi_ns_internalize_name (
-	char                    *dotted_name,
-	char                    **converted_name);
+	char                            *dotted_name,
+	char                            **converted_name);
 
 acpi_status
 acpi_ns_externalize_name (
-	u32                     internal_name_length,
-	char                    *internal_name,
-	u32                     *converted_name_length,
-	char                    **converted_name);
+	u32                             internal_name_length,
+	char                            *internal_name,
+	u32                             *converted_name_length,
+	char                            **converted_name);
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_map_handle_to_node (
-	acpi_handle             handle);
+	acpi_handle                     handle);
 
 acpi_handle
 acpi_ns_convert_entry_to_handle(
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 void
 acpi_ns_terminate (
 	void);
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_parent_node (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_next_valid_node (
-	acpi_namespace_node     *node);
+	struct acpi_namespace_node      *node);
 
 
 #endif /* __ACNAMESP_H__ */
diff -Nru a/drivers/acpi/include/acobject.h b/drivers/acpi/include/acobject.h
--- a/drivers/acpi/include/acobject.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acobject.h	Fri Jan 10 12:12:38 2003
@@ -1,12 +1,12 @@
 
 /******************************************************************************
  *
- * Name: acobject.h - Definition of acpi_operand_object  (Internal object only)
+ * Name: acobject.h - Definition of union acpi_operand_object    (Internal object only)
  *
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 
 
 /*
- * The acpi_operand_object  is used to pass AML operands from the dispatcher
+ * The union acpi_operand_object    is used to pass AML operands from the dispatcher
  * to the interpreter, and to keep track of the various handlers such as
  * address space handlers and notify handlers.  The object is a constant
  * size in order to allow it to be cached and reused.
@@ -46,12 +46,12 @@
  * data_type is used to differentiate between internal descriptors, and MUST
  * be the first byte in this structure.
  */
-#define ACPI_OBJECT_COMMON_HEADER           /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
-	u8                          descriptor;         /* To differentiate various internal objs */\
-	u8                          type;               /* acpi_object_type */\
-	u16                         reference_count;    /* For object deletion management */\
-	union acpi_operand_obj      *next_object;       /* Objects linked to parent NS node */\
-	u8                          flags; \
+#define ACPI_OBJECT_COMMON_HEADER   /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
+	u8                                      descriptor;         /* To differentiate various internal objs */\
+	u8                                      type;               /* acpi_object_type */\
+	u16                                     reference_count;    /* For object deletion management */\
+	union acpi_operand_object               *next_object;       /* Objects linked to parent NS node */\
+	u8                                      flags; \
 
 /* Values for flag byte above */
 
@@ -68,34 +68,34 @@
  * "Field Datum"  -- a datum from the actual field object
  * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
  */
-#define ACPI_COMMON_FIELD_INFO              /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
-	u8                          field_flags;        /* Access, update, and lock bits */\
-	u8                          attribute;          /* From access_as keyword */\
-	u8                          access_byte_width;  /* Read/Write size in bytes */\
-	u32                         bit_length;         /* Length of field in bits */\
-	u32                         base_byte_offset;   /* Byte offset within containing object */\
-	u8                          start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
-	u8                          datum_valid_bits;   /* Valid bit in first "Field datum" */\
-	u8                          end_field_valid_bits; /* Valid bits in the last "field datum" */\
-	u8                          end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
-	u32                         value;              /* Value to store into the Bank or Index register */\
-	acpi_namespace_node         *node;              /* Link back to parent node */
+#define ACPI_COMMON_FIELD_INFO      /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
+	u8                                      field_flags;        /* Access, update, and lock bits */\
+	u8                                      attribute;          /* From access_as keyword */\
+	u8                                      access_byte_width;  /* Read/Write size in bytes */\
+	u32                                     bit_length;         /* Length of field in bits */\
+	u32                                     base_byte_offset;   /* Byte offset within containing object */\
+	u8                                      start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
+	u8                                      datum_valid_bits;   /* Valid bit in first "Field datum" */\
+	u8                                      end_field_valid_bits; /* Valid bits in the last "field datum" */\
+	u8                                      end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
+	u32                                     value;              /* Value to store into the Bank or Index register */\
+	struct acpi_namespace_node              *node;              /* Link back to parent node */
 
 
 /*
  * Fields common to both Strings and Buffers
  */
 #define ACPI_COMMON_BUFFER_INFO \
-	u32                         length;
+	u32                                     length;
 
 
 /*
  * Common fields for objects that support ASL notifications
  */
 #define ACPI_COMMON_NOTIFY_INFO \
-	union acpi_operand_obj      *sys_handler;        /* Handler for system notifies */\
-	union acpi_operand_obj      *drv_handler;        /* Handler for driver notifies */\
-	union acpi_operand_obj      *addr_handler;       /* Handler for Address space */
+	union acpi_operand_object               *sys_handler;        /* Handler for system notifies */\
+	union acpi_operand_object               *drv_handler;        /* Handler for driver notifies */\
+	union acpi_operand_object               *addr_handler;       /* Handler for Address space */
 
 
 /******************************************************************************
@@ -104,54 +104,48 @@
  *
  *****************************************************************************/
 
-typedef struct acpi_object_common
+struct acpi_object_common
 {
 	ACPI_OBJECT_COMMON_HEADER
+};
 
-} acpi_object_common;
 
-
-typedef struct acpi_object_integer
+struct acpi_object_integer
 {
 	ACPI_OBJECT_COMMON_HEADER
-
-	acpi_integer                value;
-
-} acpi_object_integer;
+	acpi_integer                            value;
+};
 
 
-typedef struct acpi_object_string                   /* Null terminated, ASCII characters only */
+struct acpi_object_string           /* Null terminated, ASCII characters only */
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_BUFFER_INFO
-	char                        *pointer;           /* String in AML stream or allocated string */
+	char                                    *pointer;           /* String in AML stream or allocated string */
+};
 
-} acpi_object_string;
 
-
-typedef struct acpi_object_buffer
+struct acpi_object_buffer
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_BUFFER_INFO
-	u8                          *pointer;           /* Buffer in AML stream or allocated buffer */
-	acpi_namespace_node         *node;              /* Link back to parent node */
-	u8                          *aml_start;
-	u32                         aml_length;
-
-} acpi_object_buffer;
+	u8                                      *pointer;           /* Buffer in AML stream or allocated buffer */
+	struct acpi_namespace_node              *node;              /* Link back to parent node */
+	u8                                      *aml_start;
+	u32                                     aml_length;
+};
 
 
-typedef struct acpi_object_package
+struct acpi_object_package
 {
 	ACPI_OBJECT_COMMON_HEADER
 
-	u32                         count;              /* # of elements in package */
-	u32                         aml_length;
-	u8                          *aml_start;
-	acpi_namespace_node         *node;              /* Link back to parent node */
-	union acpi_operand_obj      **elements;         /* Array of pointers to acpi_objects */
-
-} acpi_object_package;
+	u32                                     count;              /* # of elements in package */
+	u32                                     aml_length;
+	u8                                      *aml_start;
+	struct acpi_namespace_node              *node;              /* Link back to parent node */
+	union acpi_operand_object               **elements;         /* Array of pointers to acpi_objects */
+};
 
 
 /******************************************************************************
@@ -160,62 +154,53 @@
  *
  *****************************************************************************/
 
-typedef struct acpi_object_event
+struct acpi_object_event
 {
 	ACPI_OBJECT_COMMON_HEADER
-	void                        *semaphore;
-
-} acpi_object_event;
+	void                                    *semaphore;
+};
 
 
 #define INFINITE_CONCURRENCY        0xFF
 
-typedef struct acpi_object_method
+struct acpi_object_method
 {
 	ACPI_OBJECT_COMMON_HEADER
-	u8                          method_flags;
-	u8                          param_count;
-
-	u32                         aml_length;
-
-	void                        *semaphore;
-	u8                          *aml_start;
-
-	u8                          concurrency;
-	u8                          thread_count;
-	acpi_owner_id               owning_id;
-
-} acpi_object_method;
+	u8                                      method_flags;
+	u8                                      param_count;
+	u32                                     aml_length;
+	void                                    *semaphore;
+	u8                                      *aml_start;
+	u8                                      concurrency;
+	u8                                      thread_count;
+	acpi_owner_id                           owning_id;
+};
 
 
-typedef struct acpi_object_mutex
+struct acpi_object_mutex
 {
 	ACPI_OBJECT_COMMON_HEADER
-	u16                         sync_level;
-	u16                         acquisition_depth;
+	u16                                     sync_level;
+	u16                                     acquisition_depth;
+	struct acpi_thread_state                *owner_thread;
+	void                                    *semaphore;
+	union acpi_operand_object               *prev;              /* Link for list of acquired mutexes */
+	union acpi_operand_object               *next;              /* Link for list of acquired mutexes */
+	struct acpi_namespace_node              *node;              /* containing object */
+};
 
-	struct acpi_thread_state    *owner_thread;
-	void                        *semaphore;
-	union acpi_operand_obj      *prev;              /* Link for list of acquired mutexes */
-	union acpi_operand_obj      *next;              /* Link for list of acquired mutexes */
-	acpi_namespace_node         *node;              /* containing object */
 
-} acpi_object_mutex;
-
-
-typedef struct acpi_object_region
+struct acpi_object_region
 {
 	ACPI_OBJECT_COMMON_HEADER
 
-	u8                          space_id;
-
-	union acpi_operand_obj      *addr_handler;      /* Handler for system notifies */
-	acpi_namespace_node         *node;              /* containing object */
-	union acpi_operand_obj      *next;
-	u32                         length;
-	acpi_physical_address       address;
-
-} acpi_object_region;
+	u8                                      space_id;
+	union acpi_operand_object               *addr_handler;      /* Handler for system notifies */
+	struct acpi_namespace_node              *node;              /* containing object */
+	union acpi_operand_object               *next;
+	u32                                     length;
+	acpi_physical_address                   address;
+};
 
 
 /******************************************************************************
@@ -224,52 +209,44 @@
  *
  *****************************************************************************/
 
-typedef struct acpi_object_notify_common            /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+struct acpi_object_notify_common            /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_NOTIFY_INFO
-
-} acpi_object_notify_common;
+};
 
 
-typedef struct acpi_object_device
+struct acpi_object_device
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_NOTIFY_INFO
-
-} acpi_object_device;
+};
 
 
-typedef struct acpi_object_power_resource
+struct acpi_object_power_resource
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_NOTIFY_INFO
+	u32                                     system_level;
+	u32                                     resource_order;
+};
 
-	u32                         system_level;
-	u32                         resource_order;
 
-} acpi_object_power_resource;
-
-
-typedef struct acpi_object_processor
+struct acpi_object_processor
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_NOTIFY_INFO
+	u32                                     proc_id;
+	u32                                     length;
+	acpi_io_address                         address;
+};
 
-	u32                         proc_id;
-	u32                         length;
-	acpi_io_address             address;
-
-} acpi_object_processor;
 
-
-typedef struct acpi_object_thermal_zone
+struct acpi_object_thermal_zone
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_NOTIFY_INFO
-
-
-} acpi_object_thermal_zone;
+};
 
 
 /******************************************************************************
@@ -278,36 +255,33 @@
  *
  *****************************************************************************/
 
-typedef struct acpi_object_field_common             /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+struct acpi_object_field_common                         /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_FIELD_INFO
-	union acpi_operand_obj      *region_obj;        /* Containing Operation Region object */
-			 /* (REGION/BANK fields only) */
-} acpi_object_field_common;
+	union acpi_operand_object               *region_obj;        /* Containing Operation Region object */
+			  /* (REGION/BANK fields only) */
+};
 
 
-typedef struct acpi_object_region_field
+struct acpi_object_region_field
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_FIELD_INFO
-	union acpi_operand_obj      *region_obj;        /* Containing op_region object */
-
-} acpi_object_region_field;
+	union acpi_operand_object               *region_obj;        /* Containing op_region object */
+};
 
 
-typedef struct acpi_object_bank_field
+struct acpi_object_bank_field
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_FIELD_INFO
+	union acpi_operand_object               *region_obj;        /* Containing op_region object */
+	union acpi_operand_object               *bank_obj;          /* bank_select Register object */
+};
 
-	union acpi_operand_obj      *region_obj;        /* Containing op_region object */
-	union acpi_operand_obj      *bank_obj;          /* bank_select Register object */
-
-} acpi_object_bank_field;
 
-
-typedef struct acpi_object_index_field
+struct acpi_object_index_field
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_FIELD_INFO
@@ -316,23 +290,19 @@
 	 * No "region_obj" pointer needed since the Index and Data registers
 	 * are each field definitions unto themselves.
 	 */
-	union acpi_operand_obj      *index_obj;         /* Index register */
-	union acpi_operand_obj      *data_obj;          /* Data register */
-
-
-} acpi_object_index_field;
+	union acpi_operand_object               *index_obj;         /* Index register */
+	union acpi_operand_object               *data_obj;          /* Data register */
+};
 
 
 /* The buffer_field is different in that it is part of a Buffer, not an op_region */
 
-typedef struct acpi_object_buffer_field
+struct acpi_object_buffer_field
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_FIELD_INFO
-
-	union acpi_operand_obj      *buffer_obj;        /* Containing Buffer object */
-
-} acpi_object_buffer_field;
+	union acpi_operand_object               *buffer_obj;        /* Containing Buffer object */
+};
 
 
 /******************************************************************************
@@ -341,15 +311,13 @@
  *
  *****************************************************************************/
 
-typedef struct acpi_object_notify_handler
+struct acpi_object_notify_handler
 {
 	ACPI_OBJECT_COMMON_HEADER
-
-	acpi_namespace_node         *node;               /* Parent device */
-	acpi_notify_handler         handler;
-	void                        *context;
-
-} acpi_object_notify_handler;
+	struct acpi_namespace_node              *node;              /* Parent device */
+	acpi_notify_handler                     handler;
+	void                                    *context;
+};
 
 
 /* Flags for address handler */
@@ -357,21 +325,18 @@
 #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x1
 
 
-typedef struct acpi_object_addr_handler
+struct acpi_object_addr_handler
 {
 	ACPI_OBJECT_COMMON_HEADER
-
-	u8                          space_id;
-	u16                         hflags;
-	acpi_adr_space_handler      handler;
-
-	acpi_namespace_node         *node;              /* Parent device */
-	void                        *context;
-	acpi_adr_space_setup        setup;
-	union acpi_operand_obj      *region_list;       /* regions using this handler */
-	union acpi_operand_obj      *next;
-
-} acpi_object_addr_handler;
+	u8                                      space_id;
+	u16                                     hflags;
+	acpi_adr_space_handler                  handler;
+	struct acpi_namespace_node              *node;              /* Parent device */
+	void                                    *context;
+	acpi_adr_space_setup                    setup;
+	union acpi_operand_object               *region_list;       /* regions using this handler */
+	union acpi_operand_object               *next;
+};
 
 
 /******************************************************************************
@@ -384,19 +349,16 @@
  * The Reference object type is used for these opcodes:
  * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op
  */
-typedef struct acpi_object_reference
+struct acpi_object_reference
 {
 	ACPI_OBJECT_COMMON_HEADER
-
-	u8                          target_type;        /* Used for index_op */
-	u16                         opcode;
-	u32                         offset;             /* Used for arg_op, local_op, and index_op */
-
-	void                        *object;            /* name_op=>HANDLE to obj, index_op=>acpi_operand_object */
-	acpi_namespace_node         *node;
-	union acpi_operand_obj      **where;
-
-} acpi_object_reference;
+	u8                                      target_type;        /* Used for index_op */
+	u16                                     opcode;
+	u32                                     offset;             /* Used for arg_op, local_op, and index_op */
+	void                                    *object;            /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object  */
+	struct acpi_namespace_node              *node;
+	union acpi_operand_object               **where;
+};
 
 
 /*
@@ -406,93 +368,83 @@
  *
  * Currently: Region and field_unit types
  */
-typedef struct acpi_object_extra
+struct acpi_object_extra
 {
 	ACPI_OBJECT_COMMON_HEADER
-	u8                          byte_fill1;
-	u16                         word_fill1;
-	u32                         aml_length;
-	u8                          *aml_start;
-	acpi_namespace_node         *method_REG;        /* _REG method for this region (if any) */
-	void                        *region_context;    /* Region-specific data */
-
-} acpi_object_extra;
+	u8                                      byte_fill1;
+	u16                                     word_fill1;
+	u32                                     aml_length;
+	u8                                      *aml_start;
+	struct acpi_namespace_node              *method_REG;        /* _REG method for this region (if any) */
+	void                                    *region_context;    /* Region-specific data */
+};
 
 
 /* Additional data that can be attached to namespace nodes */
 
-typedef struct acpi_object_data
+struct acpi_object_data
 {
 	ACPI_OBJECT_COMMON_HEADER
-	acpi_object_handler         handler;
-	void                        *pointer;
-
-} acpi_object_data;
+	acpi_object_handler                     handler;
+	void                                    *pointer;
+};
 
 
 /* Structure used when objects are cached for reuse */
 
-typedef struct acpi_object_cache_list
+struct acpi_object_cache_list
 {
 	ACPI_OBJECT_COMMON_HEADER
-	union acpi_operand_obj      *next;              /* Link for object cache and internal lists*/
-
-} acpi_object_cache_list;
+	union acpi_operand_object               *next;              /* Link for object cache and internal lists*/
+};
 
 
 /******************************************************************************
  *
- * acpi_operand_object Descriptor - a giant union of all of the above
+ * union acpi_operand_object Descriptor - a giant union of all of the above
  *
  *****************************************************************************/
 
-typedef union acpi_operand_obj
+union acpi_operand_object
 {
-	acpi_object_common          common;
-
-	acpi_object_integer         integer;
-	acpi_object_string          string;
-	acpi_object_buffer          buffer;
-	acpi_object_package         package;
-
-	acpi_object_event           event;
-	acpi_object_method          method;
-	acpi_object_mutex           mutex;
-	acpi_object_region          region;
-
-	acpi_object_notify_common   common_notify;
-	acpi_object_device          device;
-	acpi_object_power_resource  power_resource;
-	acpi_object_processor       processor;
-	acpi_object_thermal_zone    thermal_zone;
-
-	acpi_object_field_common    common_field;
-	acpi_object_region_field    field;
-	acpi_object_buffer_field    buffer_field;
-	acpi_object_bank_field      bank_field;
-	acpi_object_index_field     index_field;
-
-	acpi_object_notify_handler  notify_handler;
-	acpi_object_addr_handler    addr_handler;
-
-	acpi_object_reference       reference;
-	acpi_object_extra           extra;
-	acpi_object_data            data;
-	acpi_object_cache_list      cache;
-
-} acpi_operand_object;
+	struct acpi_object_common               common;
+	struct acpi_object_integer              integer;
+	struct acpi_object_string               string;
+	struct acpi_object_buffer               buffer;
+	struct acpi_object_package              package;
+	struct acpi_object_event                event;
+	struct acpi_object_method               method;
+	struct acpi_object_mutex                mutex;
+	struct acpi_object_region               region;
+	struct acpi_object_notify_common        common_notify;
+	struct acpi_object_device               device;
+	struct acpi_object_power_resource       power_resource;
+	struct acpi_object_processor            processor;
+	struct acpi_object_thermal_zone         thermal_zone;
+	struct acpi_object_field_common         common_field;
+	struct acpi_object_region_field         field;
+	struct acpi_object_buffer_field         buffer_field;
+	struct acpi_object_bank_field           bank_field;
+	struct acpi_object_index_field          index_field;
+	struct acpi_object_notify_handler       notify_handler;
+	struct acpi_object_addr_handler         addr_handler;
+	struct acpi_object_reference            reference;
+	struct acpi_object_extra                extra;
+	struct acpi_object_data                 data;
+	struct acpi_object_cache_list           cache;
+};
 
 
 /******************************************************************************
  *
- * acpi_descriptor - objects that share a common descriptor identifier
+ * union acpi_descriptor - objects that share a common descriptor identifier
  *
  *****************************************************************************/
 
 
 /* Object descriptor types */
 
-#define ACPI_DESC_TYPE_CACHED           0x11    /* Used only when object is cached */
+#define ACPI_DESC_TYPE_CACHED           0x11        /* Used only when object is cached */
 #define ACPI_DESC_TYPE_STATE            0x20
 #define ACPI_DESC_TYPE_STATE_UPDATE     0x21
 #define ACPI_DESC_TYPE_STATE_PACKAGE    0x22
@@ -509,14 +461,13 @@
 #define ACPI_DESC_TYPE_NAMED            0xAA
 
 
-typedef union acpi_desc
+union acpi_descriptor
 {
-	u8                          descriptor_id;        /* To differentiate various internal objs */\
-	acpi_operand_object         object;
-	acpi_namespace_node         node;
-	acpi_parse_object           op;
-
-} acpi_descriptor;
+	u8                                      descriptor_id;  /* To differentiate various internal objs */\
+	union acpi_operand_object               object;
+	struct acpi_namespace_node              node;
+	union acpi_parse_object                 op;
+};
 
 
 #endif /* _ACOBJECT_H */
diff -Nru a/drivers/acpi/include/acoutput.h b/drivers/acpi/include/acoutput.h
--- a/drivers/acpi/include/acoutput.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acoutput.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/acparser.h b/drivers/acpi/include/acparser.h
--- a/drivers/acpi/include/acparser.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acparser.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,14 +49,14 @@
 
 acpi_status
 acpi_psx_load_table (
-	u8                      *pcode_addr,
-	u32                     pcode_length);
+	u8                              *pcode_addr,
+	u32                             pcode_length);
 
 acpi_status
 acpi_psx_execute (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc);
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc);
 
 
 /******************************************************************************
@@ -70,110 +70,110 @@
 
 u8 *
 acpi_ps_get_next_package_end (
-	acpi_parse_state        *parser_state);
+	struct acpi_parse_state         *parser_state);
 
 u32
 acpi_ps_get_next_package_length (
-	acpi_parse_state        *parser_state);
+	struct acpi_parse_state         *parser_state);
 
 char *
 acpi_ps_get_next_namestring (
-	acpi_parse_state        *parser_state);
+	struct acpi_parse_state         *parser_state);
 
 void
 acpi_ps_get_next_simple_arg (
-	acpi_parse_state        *parser_state,
-	u32                     arg_type,
-	acpi_parse_object       *arg);
+	struct acpi_parse_state         *parser_state,
+	u32                             arg_type,
+	union acpi_parse_object         *arg);
 
 acpi_status
 acpi_ps_get_next_namepath (
-	acpi_walk_state         *walk_state,
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *arg,
-	u8                      method_call);
+	struct acpi_walk_state          *walk_state,
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *arg,
+	u8                              method_call);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_next_field (
-	acpi_parse_state        *parser_state);
+	struct acpi_parse_state         *parser_state);
 
 acpi_status
 acpi_ps_get_next_arg (
-	acpi_walk_state         *walk_state,
-	acpi_parse_state        *parser_state,
-	u32                     arg_type,
-	acpi_parse_object       **return_arg);
+	struct acpi_walk_state          *walk_state,
+	struct acpi_parse_state         *parser_state,
+	u32                             arg_type,
+	union acpi_parse_object         **return_arg);
 
 
 /* psfind */
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_find_name (
-	acpi_parse_object       *scope,
-	u32                     name,
-	u32                     opcode);
+	union acpi_parse_object         *scope,
+	u32                             name,
+	u32                             opcode);
 
-acpi_parse_object*
+union acpi_parse_object*
 acpi_ps_get_parent (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 
 /* psopcode - AML Opcode information */
 
-const acpi_opcode_info *
+const struct acpi_opcode_info *
 acpi_ps_get_opcode_info (
-	u16                     opcode);
+	u16                             opcode);
 
 char *
 acpi_ps_get_opcode_name (
-	u16                     opcode);
+	u16                             opcode);
 
 
 /* psparse - top level parsing routines */
 
 u32
 acpi_ps_get_opcode_size (
-	u32                     opcode);
+	u32                             opcode);
 
 void
 acpi_ps_complete_this_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op);
 
 acpi_status
 acpi_ps_next_parse_state (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_status             callback_status);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	acpi_status                     callback_status);
 
 acpi_status
 acpi_ps_find_object (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       **out_op);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         **out_op);
 
 void
 acpi_ps_delete_parse_tree (
-	acpi_parse_object       *root);
+	union acpi_parse_object         *root);
 
 acpi_status
 acpi_ps_parse_loop (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ps_parse_aml (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ps_parse_table (
-	u8                      *aml,
-	u32                     aml_size,
-	acpi_parse_downwards    descending_callback,
-	acpi_parse_upwards      ascending_callback,
-	acpi_parse_object       **root_object);
+	u8                              *aml,
+	u32                             aml_size,
+	acpi_parse_downwards            descending_callback,
+	acpi_parse_upwards              ascending_callback,
+	union acpi_parse_object         **root_object);
 
 u16
 acpi_ps_peek_opcode (
-	acpi_parse_state        *state);
+	struct acpi_parse_state         *state);
 
 
 /* psscope - Scope stack management routines */
@@ -181,108 +181,108 @@
 
 acpi_status
 acpi_ps_init_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *root);
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *root);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_parent_scope (
-	acpi_parse_state        *state);
+	struct acpi_parse_state         *state);
 
 u8
 acpi_ps_has_completed_scope (
-	acpi_parse_state        *parser_state);
+	struct acpi_parse_state         *parser_state);
 
 void
 acpi_ps_pop_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       **op,
-	u32                     *arg_list,
-	u32                     *arg_count);
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         **op,
+	u32                             *arg_list,
+	u32                             *arg_count);
 
 acpi_status
 acpi_ps_push_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *op,
-	u32                     remaining_args,
-	u32                     arg_count);
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *op,
+	u32                             remaining_args,
+	u32                             arg_count);
 
 void
 acpi_ps_cleanup_scope (
-	acpi_parse_state        *state);
+	struct acpi_parse_state         *state);
 
 
 /* pstree - parse tree manipulation routines */
 
 void
 acpi_ps_append_arg(
-	acpi_parse_object       *op,
-	acpi_parse_object       *arg);
+	union acpi_parse_object         *op,
+	union acpi_parse_object         *arg);
 
-acpi_parse_object*
+union acpi_parse_object*
 acpi_ps_find (
-	acpi_parse_object       *scope,
-	char                    *path,
-	u16                     opcode,
-	u32                     create);
+	union acpi_parse_object         *scope,
+	char                            *path,
+	u16                             opcode,
+	u32                             create);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_arg(
-	acpi_parse_object       *op,
-	u32                      argn);
+	union acpi_parse_object         *op,
+	u32                              argn);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_child (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_depth_next (
-	acpi_parse_object       *origin,
-	acpi_parse_object       *op);
+	union acpi_parse_object         *origin,
+	union acpi_parse_object         *op);
 
 
 /* pswalk - parse tree walk routines */
 
 acpi_status
 acpi_ps_walk_parsed_aml (
-	acpi_parse_object       *start_op,
-	acpi_parse_object       *end_op,
-	acpi_operand_object     *mth_desc,
-	acpi_namespace_node     *start_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **caller_return_desc,
-	acpi_owner_id           owner_id,
-	acpi_parse_downwards    descending_callback,
-	acpi_parse_upwards      ascending_callback);
+	union acpi_parse_object         *start_op,
+	union acpi_parse_object         *end_op,
+	union acpi_operand_object       *mth_desc,
+	struct acpi_namespace_node      *start_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **caller_return_desc,
+	acpi_owner_id                   owner_id,
+	acpi_parse_downwards            descending_callback,
+	acpi_parse_upwards              ascending_callback);
 
 acpi_status
 acpi_ps_get_next_walk_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_parse_upwards      ascending_callback);
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	acpi_parse_upwards              ascending_callback);
 
 acpi_status
 acpi_ps_delete_completed_op (
-	acpi_walk_state         *walk_state);
+	struct acpi_walk_state          *walk_state);
 
 
 /* psutils - parser utilities */
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_create_scope_op (
 	void);
 
 void
 acpi_ps_init_op (
-	acpi_parse_object       *op,
-	u16                     opcode);
+	union acpi_parse_object         *op,
+	u16                             opcode);
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_alloc_op (
-	u16                     opcode);
+	u16                             opcode);
 
 void
 acpi_ps_free_op (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 void
 acpi_ps_delete_parse_cache (
@@ -290,39 +290,39 @@
 
 u8
 acpi_ps_is_leading_char (
-	u32                     c);
+	u32                             c);
 
 u8
 acpi_ps_is_prefix_char (
-	u32                     c);
+	u32                             c);
 
 u32
 acpi_ps_get_name(
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 void
 acpi_ps_set_name(
-	acpi_parse_object       *op,
-	u32                     name);
+	union acpi_parse_object         *op,
+	u32                             name);
 
 
 /* psdump - display parser tree */
 
 u32
 acpi_ps_sprint_path (
-	char                    *buffer_start,
-	u32                     buffer_size,
-	acpi_parse_object       *op);
+	char                            *buffer_start,
+	u32                             buffer_size,
+	union acpi_parse_object         *op);
 
 u32
 acpi_ps_sprint_op (
-	char                    *buffer_start,
-	u32                     buffer_size,
-	acpi_parse_object       *op);
+	char                            *buffer_start,
+	u32                             buffer_size,
+	union acpi_parse_object         *op);
 
 void
 acpi_ps_show (
-	acpi_parse_object       *op);
+	union acpi_parse_object         *op);
 
 
 #endif /* __ACPARSER_H__ */
diff -Nru a/drivers/acpi/include/acpi.h b/drivers/acpi/include/acpi.h
--- a/drivers/acpi/include/acpi.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acpi.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/acpiosxf.h b/drivers/acpi/include/acpiosxf.h
--- a/drivers/acpi/include/acpiosxf.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acpiosxf.h	Fri Jan 10 12:12:37 2003
@@ -9,7 +9,7 @@
 
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,13 +49,12 @@
 #define ACPI_SIGNAL_FATAL           0
 #define ACPI_SIGNAL_BREAKPOINT      1
 
-typedef struct acpi_fatal_info
+struct acpi_signal_fatal_info
 {
-	u32                     type;
-	u32                     code;
-	u32                     argument;
-
-} acpi_signal_fatal_info;
+	u32                             type;
+	u32                             code;
+	u32                             argument;
+};
 
 
 /*
@@ -64,11 +63,11 @@
 
 typedef u32
 (ACPI_SYSTEM_XFACE *OSD_HANDLER) (
-	void                    *context);
+	void                            *context);
 
 typedef void
 (ACPI_SYSTEM_XFACE *OSD_EXECUTION_CALLBACK) (
-	void                    *context);
+	void                            *context);
 
 
 /*
@@ -90,13 +89,13 @@
 
 acpi_status
 acpi_os_get_root_pointer (
-	u32                     flags,
-	acpi_pointer            *address);
+	u32                             flags,
+	struct acpi_pointer             *address);
 
 acpi_status
 acpi_os_table_override (
-	acpi_table_header       *existing_table,
-	acpi_table_header       **new_table);
+	struct acpi_table_header        *existing_table,
+	struct acpi_table_header        **new_table);
 
 
 /*
@@ -105,24 +104,24 @@
 
 acpi_status
 acpi_os_create_semaphore (
-	u32                     max_units,
-	u32                     initial_units,
-	acpi_handle             *out_handle);
+	u32                             max_units,
+	u32                             initial_units,
+	acpi_handle                     *out_handle);
 
 acpi_status
 acpi_os_delete_semaphore (
-	acpi_handle             handle);
+	acpi_handle                     handle);
 
 acpi_status
 acpi_os_wait_semaphore (
-	acpi_handle             handle,
-	u32                     units,
-	u16                     timeout);
+	acpi_handle                     handle,
+	u32                             units,
+	u16                             timeout);
 
 acpi_status
 acpi_os_signal_semaphore (
-	acpi_handle             handle,
-	u32                     units);
+	acpi_handle                     handle,
+	u32                             units);
 
 
 /*
@@ -131,27 +130,27 @@
 
 void *
 acpi_os_allocate (
-	acpi_size               size);
+	acpi_size                       size);
 
 void
 acpi_os_free (
-	void *                  memory);
+	void *                          memory);
 
 acpi_status
 acpi_os_map_memory (
-	acpi_physical_address   physical_address,
-	acpi_size               size,
-	void                    **logical_address);
+	acpi_physical_address           physical_address,
+	acpi_size                       size,
+	void                            **logical_address);
 
 void
 acpi_os_unmap_memory (
-	void                    *logical_address,
-	acpi_size               size);
+	void                            *logical_address,
+	acpi_size                       size);
 
 acpi_status
 acpi_os_get_physical_address (
-	void                    *logical_address,
-	acpi_physical_address   *physical_address);
+	void                            *logical_address,
+	acpi_physical_address           *physical_address);
 
 
 /*
@@ -160,13 +159,13 @@
 
 acpi_status
 acpi_os_install_interrupt_handler (
-	u32                     interrupt_number,
+	u32                             interrupt_number,
 	OSD_HANDLER             service_routine,
-	void                    *context);
+	void                            *context);
 
 acpi_status
 acpi_os_remove_interrupt_handler (
-	u32                     interrupt_number,
+	u32                             interrupt_number,
 	OSD_HANDLER             service_routine);
 
 
@@ -180,18 +179,18 @@
 
 acpi_status
 acpi_os_queue_for_execution (
-	u32                     priority,
+	u32                             priority,
 	OSD_EXECUTION_CALLBACK  function,
-	void                    *context);
+	void                            *context);
 
 void
 acpi_os_sleep (
-	u32                     seconds,
-	u32                     milliseconds);
+	u32                             seconds,
+	u32                             milliseconds);
 
 void
 acpi_os_stall (
-	u32                     microseconds);
+	u32                             microseconds);
 
 
 /*
@@ -200,15 +199,15 @@
 
 acpi_status
 acpi_os_read_port (
-	acpi_io_address         address,
-	void                    *value,
-	u32                     width);
+	acpi_io_address                 address,
+	void                            *value,
+	u32                             width);
 
 acpi_status
 acpi_os_write_port (
-	acpi_io_address         address,
-	acpi_integer            value,
-	u32                     width);
+	acpi_io_address                 address,
+	acpi_integer                    value,
+	u32                             width);
 
 
 /*
@@ -217,15 +216,15 @@
 
 acpi_status
 acpi_os_read_memory (
-	acpi_physical_address   address,
-	void                    *value,
-	u32                     width);
+	acpi_physical_address           address,
+	void                            *value,
+	u32                             width);
 
 acpi_status
 acpi_os_write_memory (
-	acpi_physical_address   address,
-	acpi_integer            value,
-	u32                     width);
+	acpi_physical_address           address,
+	acpi_integer                    value,
+	u32                             width);
 
 
 /*
@@ -234,26 +233,26 @@
 
 acpi_status
 acpi_os_read_pci_configuration (
-	acpi_pci_id             *pci_id,
-	u32                     reg,
-	void                    *value,
-	u32                     width);
+	struct acpi_pci_id              *pci_id,
+	u32                             register,
+	void                            *value,
+	u32                             width);
 
 acpi_status
 acpi_os_write_pci_configuration (
-	acpi_pci_id             *pci_id,
-	u32                     reg,
-	acpi_integer            value,
-	u32                     width);
+	struct acpi_pci_id              *pci_id,
+	u32                             register,
+	acpi_integer                    value,
+	u32                             width);
 
 /*
  * Interim function needed for PCI IRQ routing
  */
 void
 acpi_os_derive_pci_id(
-	acpi_handle             rhandle,
-	acpi_handle             chandle,
-	acpi_pci_id             **pci_id);
+	acpi_handle                     rhandle,
+	acpi_handle                     chandle,
+	struct acpi_pci_id              **pci_id);
 
 /*
  * Miscellaneous
@@ -261,13 +260,13 @@
 
 u8
 acpi_os_readable (
-	void                    *pointer,
-	u32                     length);
+	void                            *pointer,
+	u32                             length);
 
 u8
 acpi_os_writable (
-	void                    *pointer,
-	u32                     length);
+	void                            *pointer,
+	u32                             length);
 
 u32
 acpi_os_get_timer (
@@ -275,8 +274,8 @@
 
 acpi_status
 acpi_os_signal (
-	u32                     function,
-	void                    *info);
+	u32                             function,
+	void                            *info);
 
 /*
  * Debug print routines
@@ -284,17 +283,17 @@
 
 void ACPI_INTERNAL_VAR_XFACE
 acpi_os_printf (
-	const char              *format,
+	const char                      *format,
 	...);
 
 void
 acpi_os_vprintf (
-	const char              *format,
+	const char                      *format,
 	va_list                 args);
 
 void
 acpi_os_redirect_output (
-	void                    *destination);
+	void                            *destination);
 
 
 /*
@@ -303,8 +302,25 @@
 
 u32
 acpi_os_get_line (
-	char                    *buffer);
+	char                            *buffer);
+
+
+/*
+ * Directory manipulation
+ */
+
+void *
+acpi_os_open_directory (
+	char                            *pathname,
+	char                            *wildcard_spec);
+
+char *
+acpi_os_get_next_filename (
+	void                            *dir_handle);
 
+void
+acpi_os_close_directory (
+	void                            *dir_handle);
 
 /*
  * Debug
@@ -312,10 +328,10 @@
 
 void
 acpi_os_dbg_assert(
-	void                    *failed_assertion,
-	void                    *file_name,
-	u32                     line_number,
-	char                    *message);
+	void                            *failed_assertion,
+	void                            *file_name,
+	u32                             line_number,
+	char                            *message);
 
 
 #endif /* __ACPIOSXF_H__ */
diff -Nru a/drivers/acpi/include/acpixf.h b/drivers/acpi/include/acpixf.h
--- a/drivers/acpi/include/acpixf.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acpixf.h	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -41,11 +41,11 @@
 
 acpi_status
 acpi_enable_subsystem (
-	u32                     flags);
+	u32                             flags);
 
 acpi_status
 acpi_initialize_objects (
-	u32                     flags);
+	u32                             flags);
 
 acpi_status
 acpi_terminate (
@@ -65,11 +65,11 @@
 
 acpi_status
 acpi_get_system_info (
-	acpi_buffer             *ret_buffer);
+	struct acpi_buffer              *ret_buffer);
 
 const char *
 acpi_format_exception (
-	acpi_status             exception);
+	acpi_status                     exception);
 
 acpi_status
 acpi_purge_cached_objects (
@@ -77,8 +77,8 @@
 
 acpi_status
 acpi_install_initialization_handler (
-	acpi_init_handler       handler,
-	u32                     function);
+	acpi_init_handler               handler,
+	u32                             function);
 
 /*
  * ACPI Memory manager
@@ -86,15 +86,15 @@
 
 void *
 acpi_allocate (
-	u32                     size);
+	u32                             size);
 
 void *
 acpi_callocate (
-	u32                     size);
+	u32                             size);
 
 void
 acpi_free (
-	void                    *address);
+	void                            *address);
 
 
 /*
@@ -103,8 +103,8 @@
 
 acpi_status
 acpi_find_root_pointer (
-	u32                     flags,
-	acpi_pointer            *rsdp_address);
+	u32                             flags,
+	struct acpi_pointer             *rsdp_address);
 
 acpi_status
 acpi_load_tables (
@@ -112,30 +112,30 @@
 
 acpi_status
 acpi_load_table (
-	acpi_table_header       *table_ptr);
+	struct acpi_table_header        *table_ptr);
 
 acpi_status
 acpi_unload_table (
-	acpi_table_type         table_type);
+	acpi_table_type                 table_type);
 
 acpi_status
 acpi_get_table_header (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_table_header       *out_table_header);
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_table_header        *out_table_header);
 
 acpi_status
 acpi_get_table (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_buffer             *ret_buffer);
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_get_firmware_table (
-	acpi_string             signature,
-	u32                     instance,
-	u32                     flags,
-	acpi_table_header       **table_pointer);
+	acpi_string                     signature,
+	u32                             instance,
+	u32                             flags,
+	struct acpi_table_header        **table_pointer);
 
 
 /*
@@ -144,48 +144,48 @@
 
 acpi_status
 acpi_walk_namespace (
-	acpi_object_type        type,
-	acpi_handle             start_object,
-	u32                     max_depth,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void *                  *return_value);
+	acpi_object_type                type,
+	acpi_handle                     start_object,
+	u32                             max_depth,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_get_devices (
-	char                    *HID,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void                    **return_value);
+	char                            *HID,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value);
 
 acpi_status
 acpi_get_name (
-	acpi_handle             handle,
-	u32                     name_type,
-	acpi_buffer             *ret_path_ptr);
+	acpi_handle                     handle,
+	u32                             name_type,
+	struct acpi_buffer              *ret_path_ptr);
 
 acpi_status
 acpi_get_handle (
-	acpi_handle             parent,
-	acpi_string             pathname,
-	acpi_handle             *ret_handle);
+	acpi_handle                     parent,
+	acpi_string                     pathname,
+	acpi_handle                     *ret_handle);
 
 acpi_status
 acpi_attach_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler,
-	void                    *data);
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler,
+	void                            *data);
 
 acpi_status
 acpi_detach_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler);
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler);
 
 acpi_status
 acpi_get_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler,
-	void                    **data);
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler,
+	void                            **data);
 
 
 /*
@@ -194,40 +194,40 @@
 
 acpi_status
 acpi_evaluate_object (
-	acpi_handle             object,
-	acpi_string             pathname,
-	acpi_object_list        *parameter_objects,
-	acpi_buffer             *return_object_buffer);
+	acpi_handle                     object,
+	acpi_string                     pathname,
+	struct acpi_object_list         *parameter_objects,
+	struct acpi_buffer              *return_object_buffer);
 
 acpi_status
 acpi_evaluate_object_typed (
-	acpi_handle             object,
-	acpi_string             pathname,
-	acpi_object_list        *external_params,
-	acpi_buffer             *return_buffer,
-	acpi_object_type        return_type);
+	acpi_handle                     object,
+	acpi_string                     pathname,
+	struct acpi_object_list         *external_params,
+	struct acpi_buffer              *return_buffer,
+	acpi_object_type                return_type);
 
 acpi_status
 acpi_get_object_info (
-	acpi_handle             device,
-	acpi_device_info        *info);
+	acpi_handle                     device,
+	struct acpi_device_info         *info);
 
 acpi_status
 acpi_get_next_object (
-	acpi_object_type        type,
-	acpi_handle             parent,
-	acpi_handle             child,
-	acpi_handle             *out_handle);
+	acpi_object_type                type,
+	acpi_handle                     parent,
+	acpi_handle                     child,
+	acpi_handle                     *out_handle);
 
 acpi_status
 acpi_get_type (
-	acpi_handle             object,
-	acpi_object_type        *out_type);
+	acpi_handle                     object,
+	acpi_object_type                *out_type);
 
 acpi_status
 acpi_get_parent (
-	acpi_handle             object,
-	acpi_handle             *out_handle);
+	acpi_handle                     object,
+	acpi_handle                     *out_handle);
 
 
 /*
@@ -236,85 +236,85 @@
 
 acpi_status
 acpi_install_fixed_event_handler (
-	u32                     acpi_event,
-	acpi_event_handler      handler,
-	void                    *context);
+	u32                             acpi_event,
+	acpi_event_handler              handler,
+	void                            *context);
 
 acpi_status
 acpi_remove_fixed_event_handler (
-	u32                     acpi_event,
-	acpi_event_handler      handler);
+	u32                             acpi_event,
+	acpi_event_handler              handler);
 
 acpi_status
 acpi_install_notify_handler (
-	acpi_handle             device,
-	u32                     handler_type,
-	acpi_notify_handler     handler,
-	void                    *context);
+	acpi_handle                     device,
+	u32                             handler_type,
+	acpi_notify_handler             handler,
+	void                            *context);
 
 acpi_status
 acpi_remove_notify_handler (
-	acpi_handle             device,
-	u32                     handler_type,
-	acpi_notify_handler     handler);
+	acpi_handle                     device,
+	u32                             handler_type,
+	acpi_notify_handler             handler);
 
 acpi_status
 acpi_install_address_space_handler (
-	acpi_handle             device,
-	acpi_adr_space_type     space_id,
-	acpi_adr_space_handler  handler,
-	acpi_adr_space_setup    setup,
-	void                    *context);
+	acpi_handle                     device,
+	acpi_adr_space_type             space_id,
+	acpi_adr_space_handler          handler,
+	acpi_adr_space_setup            setup,
+	void                            *context);
 
 acpi_status
 acpi_remove_address_space_handler (
-	acpi_handle             device,
-	acpi_adr_space_type     space_id,
-	acpi_adr_space_handler  handler);
+	acpi_handle                     device,
+	acpi_adr_space_type             space_id,
+	acpi_adr_space_handler          handler);
 
 acpi_status
 acpi_install_gpe_handler (
-	u32                     gpe_number,
-	u32                     type,
-	acpi_gpe_handler        handler,
-	void                    *context);
+	u32                             gpe_number,
+	u32                             type,
+	acpi_gpe_handler                handler,
+	void                            *context);
 
 acpi_status
 acpi_acquire_global_lock (
-	u16                     timeout,
-	u32                     *handle);
+	u16                             timeout,
+	u32                             *handle);
 
 acpi_status
 acpi_release_global_lock (
-	u32                     handle);
+	u32                             handle);
 
 acpi_status
 acpi_remove_gpe_handler (
-	u32                     gpe_number,
-	acpi_gpe_handler        handler);
+	u32                             gpe_number,
+	acpi_gpe_handler                handler);
 
 acpi_status
 acpi_enable_event (
-	u32                     acpi_event,
-	u32                     type,
-	u32                     flags);
+	u32                             acpi_event,
+	u32                             type,
+	u32                             flags);
 
 acpi_status
 acpi_disable_event (
-	u32                     acpi_event,
-	u32                     type,
-	u32                     flags);
+	u32                             acpi_event,
+	u32                             type,
+	u32                             flags);
 
 acpi_status
 acpi_clear_event (
-	u32                     acpi_event,
-	u32                     type);
+	u32                             acpi_event,
+	u32                             type);
 
 acpi_status
 acpi_get_event_status (
-	u32                     acpi_event,
-	u32                     type,
-	acpi_event_status       *event_status);
+	u32                             acpi_event,
+	u32                             type,
+	acpi_event_status               *event_status);
 
 /*
  * Resource interfaces
@@ -322,23 +322,23 @@
 
 acpi_status
 acpi_get_current_resources(
-	acpi_handle             device_handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_get_possible_resources(
-	acpi_handle             device_handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_set_current_resources (
-	acpi_handle             device_handle,
-	acpi_buffer             *in_buffer);
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *in_buffer);
 
 acpi_status
 acpi_get_irq_routing_table (
-	acpi_handle             bus_device_handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     bus_device_handle,
+	struct acpi_buffer              *ret_buffer);
 
 
 /*
@@ -347,41 +347,41 @@
 
 acpi_status
 acpi_get_register (
-	u32                     register_id,
-	u32                     *return_value,
-	u32                     flags);
+	u32                             register_id,
+	u32                             *return_value,
+	u32                             flags);
 
 acpi_status
 acpi_set_register (
-	u32                     register_id,
-	u32                     value,
-	u32                     flags);
+	u32                             register_id,
+	u32                             value,
+	u32                             flags);
 
 acpi_status
 acpi_set_firmware_waking_vector (
-	acpi_physical_address   physical_address);
+	acpi_physical_address           physical_address);
 
 acpi_status
 acpi_get_firmware_waking_vector (
-	acpi_physical_address   *physical_address);
+	acpi_physical_address           *physical_address);
 
 acpi_status
 acpi_get_sleep_type_data (
-	u8                      sleep_state,
-	u8                      *slp_typ_a,
-	u8                      *slp_typ_b);
+	u8                              sleep_state,
+	u8                              *slp_typ_a,
+	u8                              *slp_typ_b);
 
 acpi_status
 acpi_enter_sleep_state_prep (
-	u8                      sleep_state);
+	u8                              sleep_state);
 
 acpi_status
 acpi_enter_sleep_state (
-	u8                      sleep_state);
+	u8                              sleep_state);
 
 acpi_status
 acpi_leave_sleep_state (
-	u8                      sleep_state);
+	u8                              sleep_state);
 
 
 #endif /* __ACXFACE_H__ */
diff -Nru a/drivers/acpi/include/acresrc.h b/drivers/acpi/include/acresrc.h
--- a/drivers/acpi/include/acresrc.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/acresrc.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -32,39 +32,39 @@
 
 acpi_status
 acpi_rs_get_prt_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer);
 
 
 acpi_status
 acpi_rs_get_crs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_rs_get_prs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_rs_set_srs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer);
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_rs_create_resource_list (
-	acpi_operand_object     *byte_stream_buffer,
-	acpi_buffer             *output_buffer);
+	union acpi_operand_object       *byte_stream_buffer,
+	struct acpi_buffer              *output_buffer);
 
 acpi_status
 acpi_rs_create_byte_stream (
-	acpi_resource           *linked_list_buffer,
-	acpi_buffer             *output_buffer);
+	struct acpi_resource            *linked_list_buffer,
+	struct acpi_buffer              *output_buffer);
 
 acpi_status
 acpi_rs_create_pci_routing_table (
-	acpi_operand_object     *package_object,
-	acpi_buffer             *output_buffer);
+	union acpi_operand_object       *package_object,
+	struct acpi_buffer              *output_buffer);
 
 
 /*
@@ -72,295 +72,295 @@
  */
 void
 acpi_rs_dump_irq (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_address16 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_address32 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_address64 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_dma (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_io (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_extended_irq (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_fixed_io (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_fixed_memory32 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_memory24 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_memory32 (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_start_depend_fns (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_vendor_specific (
-	acpi_resource_data      *data);
+	union acpi_resource_data        *data);
 
 void
 acpi_rs_dump_resource_list (
-	acpi_resource           *resource);
+	struct acpi_resource            *resource);
 
 void
 acpi_rs_dump_irq_list (
-	u8                      *route_table);
+	u8                              *route_table);
 
 acpi_status
 acpi_rs_get_byte_stream_start (
-	u8                      *byte_stream_buffer,
-	u8                      **byte_stream_start,
-	u32                     *size);
+	u8                              *byte_stream_buffer,
+	u8                              **byte_stream_start,
+	u32                             *size);
 
 acpi_status
 acpi_rs_get_list_length (
-	u8                      *byte_stream_buffer,
-	u32                     byte_stream_buffer_length,
-	acpi_size               *size_needed);
+	u8                              *byte_stream_buffer,
+	u32                             byte_stream_buffer_length,
+	acpi_size                       *size_needed);
 
 acpi_status
 acpi_rs_get_byte_stream_length (
-	acpi_resource           *linked_list_buffer,
-	acpi_size               *size_needed);
+	struct acpi_resource            *linked_list_buffer,
+	acpi_size                       *size_needed);
 
 acpi_status
 acpi_rs_get_pci_routing_table_length (
-	acpi_operand_object     *package_object,
-	acpi_size               *buffer_size_needed);
+	union acpi_operand_object       *package_object,
+	acpi_size                       *buffer_size_needed);
 
 acpi_status
 acpi_rs_byte_stream_to_list (
-	u8                      *byte_stream_buffer,
-	u32                     byte_stream_buffer_length,
-	u8                      *output_buffer);
+	u8                              *byte_stream_buffer,
+	u32                             byte_stream_buffer_length,
+	u8                              *output_buffer);
 
 acpi_status
 acpi_rs_list_to_byte_stream (
-	acpi_resource           *linked_list,
-	acpi_size               byte_stream_size_needed,
-	u8                      *output_buffer);
+	struct acpi_resource            *linked_list,
+	acpi_size                       byte_stream_size_needed,
+	u8                              *output_buffer);
 
 acpi_status
 acpi_rs_io_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_fixed_io_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_io_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_fixed_io_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_irq_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_irq_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_dma_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_dma_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_address16_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_address16_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_address32_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_address32_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_address64_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_address64_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_start_depend_fns_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_end_depend_fns_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_start_depend_fns_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_end_depend_fns_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_memory24_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_memory24_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_memory32_range_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_fixed_memory32_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_memory32_range_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_fixed_memory32_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_extended_irq_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_extended_irq_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_end_tag_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_end_tag_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 acpi_status
 acpi_rs_vendor_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size);
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size);
 
 acpi_status
 acpi_rs_vendor_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed);
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed);
 
 u8
 acpi_rs_get_resource_type (
-	u8                      resource_start_byte);
+	u8                              resource_start_byte);
 
 #endif  /* __ACRESRC_H__ */
diff -Nru a/drivers/acpi/include/acstruct.h b/drivers/acpi/include/acstruct.h
--- a/drivers/acpi/include/acstruct.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acstruct.h	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,145 +47,137 @@
 #define ACPI_WALK_CONST_REQUIRED    3
 #define ACPI_WALK_CONST_OPTIONAL    4
 
-typedef struct acpi_walk_state
+struct acpi_walk_state
 {
-	u8                      data_type;                          /* To differentiate various internal objs MUST BE FIRST!*/\
-	acpi_owner_id           owner_id;                           /* Owner of objects created during the walk */
-	u8                      last_predicate;                     /* Result of last predicate */
-	u8                      current_result;                     /* */
-	u8                      next_op_info;                       /* Info about next_op */
-	u8                      num_operands;                       /* Stack pointer for Operands[] array */
-	u8                      return_used;
-	u8                      walk_type;
-	u16                     opcode;                             /* Current AML opcode */
-	u8                      scope_depth;
-	u8                      reserved1;
-	u32                     arg_count;                          /* push for fixed or var args */
-	u32                     aml_offset;
-	u32                     arg_types;
-	u32                     method_breakpoint;                  /* For single stepping */
-	u32                     user_breakpoint;                    /* User AML breakpoint */
-	u32                     parse_flags;
-	u32                     prev_arg_types;
-
-
-	u8                      *aml_last_while;
-	struct acpi_node        arguments[ACPI_METHOD_NUM_ARGS];    /* Control method arguments */
-	union acpi_operand_obj  **caller_return_desc;
-	acpi_generic_state      *control_state;                     /* List of control states (nested IFs) */
-	struct acpi_node        local_variables[ACPI_METHOD_NUM_LOCALS];    /* Control method locals */
-	struct acpi_node        *method_call_node;                  /* Called method Node*/
-	acpi_parse_object       *method_call_op;                    /* method_call Op if running a method */
-	union acpi_operand_obj  *method_desc;                       /* Method descriptor if running a method */
-	struct acpi_node        *method_node;                       /* Method Node if running a method */
-	acpi_parse_object       *op;                                /* Current parser op */
-	union acpi_operand_obj  *operands[ACPI_OBJ_NUM_OPERANDS+1];      /* Operands passed to the interpreter (+1 for NULL terminator) */
-	const acpi_opcode_info  *op_info;                           /* Info on current opcode */
-	acpi_parse_object       *origin;                            /* Start of walk [Obsolete] */
-	union acpi_operand_obj  **params;
-	acpi_parse_state        parser_state;                       /* Current state of parser */
-	union acpi_operand_obj  *result_obj;
-	acpi_generic_state      *results;                           /* Stack of accumulated results */
-	union acpi_operand_obj  *return_desc;                       /* Return object, if any */
-	acpi_generic_state      *scope_info;                        /* Stack of nested scopes */
-
-	acpi_parse_object       *prev_op;                           /* Last op that was processed */
-	acpi_parse_object       *next_op;                           /* next op to be processed */
-	acpi_parse_downwards    descending_callback;
-	acpi_parse_upwards      ascending_callback;
-	acpi_thread_state       *thread;
-	struct acpi_walk_state  *next;                              /* Next walk_state in list */
-
-
-} acpi_walk_state;
+	u8                                  data_type;                          /* To differentiate various internal objs MUST BE FIRST!*/\
+	acpi_owner_id                       owner_id;                           /* Owner of objects created during the walk */
+	u8                                  last_predicate;                     /* Result of last predicate */
+	u8                                  current_result;                     /* */
+	u8                                  next_op_info;                       /* Info about next_op */
+	u8                                  num_operands;                       /* Stack pointer for Operands[] array */
+	u8                                  return_used;
+	u8                                  walk_type;
+	u16                                 opcode;                             /* Current AML opcode */
+	u8                                  scope_depth;
+	u8                                  reserved1;
+	u32                                 arg_count;                          /* push for fixed or var args */
+	u32                                 aml_offset;
+	u32                                 arg_types;
+	u32                                 method_breakpoint;                  /* For single stepping */
+	u32                                 user_breakpoint;                    /* User AML breakpoint */
+	u32                                 parse_flags;
+	u32                                 prev_arg_types;
+
+	u8                                  *aml_last_while;
+	struct acpi_namespace_node          arguments[ACPI_METHOD_NUM_ARGS];    /* Control method arguments */
+	union acpi_operand_object           **caller_return_desc;
+	union acpi_generic_state            *control_state;                     /* List of control states (nested IFs) */
+	struct acpi_namespace_node          local_variables[ACPI_METHOD_NUM_LOCALS];    /* Control method locals */
+	struct acpi_namespace_node          *method_call_node;                  /* Called method Node*/
+	union acpi_parse_object             *method_call_op;                    /* method_call Op if running a method */
+	union acpi_operand_object           *method_desc;                       /* Method descriptor if running a method */
+	struct acpi_namespace_node          *method_node;                       /* Method Node if running a method */
+	union acpi_parse_object             *op;                                /* Current parser op */
+	union acpi_operand_object           *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
+	const struct acpi_opcode_info       *op_info;                           /* Info on current opcode */
+	union acpi_parse_object             *origin;                            /* Start of walk [Obsolete] */
+	union acpi_operand_object           **params;
+	struct acpi_parse_state             parser_state;                       /* Current state of parser */
+	union acpi_operand_object           *result_obj;
+	union acpi_generic_state            *results;                           /* Stack of accumulated results */
+	union acpi_operand_object           *return_desc;                       /* Return object, if any */
+	union acpi_generic_state            *scope_info;                        /* Stack of nested scopes */
+
+	union acpi_parse_object             *prev_op;                           /* Last op that was processed */
+	union acpi_parse_object             *next_op;                           /* next op to be processed */
+	acpi_parse_downwards                descending_callback;
+	acpi_parse_upwards                  ascending_callback;
+	struct acpi_thread_state            *thread;
+	struct acpi_walk_state              *next;                              /* Next walk_state in list */
+};
 
 
 /* Info used by acpi_ps_init_objects */
 
-typedef struct acpi_init_walk_info
+struct acpi_init_walk_info
 {
-	u16                     method_count;
-	u16                     device_count;
-	u16                     op_region_count;
-	u16                     field_count;
-	u16                     buffer_count;
-	u16                     package_count;
-	u16                     op_region_init;
-	u16                     field_init;
-	u16                     buffer_init;
-	u16                     package_init;
-	u16                     object_count;
-	acpi_table_desc         *table_desc;
-
-} acpi_init_walk_info;
+	u16                             method_count;
+	u16                             device_count;
+	u16                             op_region_count;
+	u16                             field_count;
+	u16                             buffer_count;
+	u16                             package_count;
+	u16                             op_region_init;
+	u16                             field_init;
+	u16                             buffer_init;
+	u16                             package_init;
+	u16                             object_count;
+	struct acpi_table_desc          *table_desc;
+};
 
 
 /* Info used by acpi_ns_initialize_devices */
 
-typedef struct acpi_device_walk_info
+struct acpi_device_walk_info
 {
-	u16                     device_count;
-	u16                     num_STA;
-	u16                     num_INI;
-	acpi_table_desc         *table_desc;
-
-} acpi_device_walk_info;
+	u16                             device_count;
+	u16                             num_STA;
+	u16                             num_INI;
+	struct acpi_table_desc          *table_desc;
+};
 
 
 /* TBD: [Restructure] Merge with struct above */
 
-typedef struct acpi_walk_info
+struct acpi_walk_info
 {
-	u32                     debug_level;
-	u32                     owner_id;
-	u8                      display_type;
-
-} acpi_walk_info;
+	u32                             debug_level;
+	u32                             owner_id;
+	u8                              display_type;
+};
 
 /* Display Types */
 
 #define ACPI_DISPLAY_SUMMARY    0
 #define ACPI_DISPLAY_OBJECTS    1
 
-typedef struct acpi_get_devices_info
+struct acpi_get_devices_info
 {
-	acpi_walk_callback      user_function;
-	void                    *context;
-	char                    *hid;
-
-} acpi_get_devices_info;
+	acpi_walk_callback              user_function;
+	void                            *context;
+	char                            *hid;
+};
 
 
-typedef union acpi_aml_operands
+union acpi_aml_operands
 {
-	acpi_operand_object         *operands[7];
+	union acpi_operand_object           *operands[7];
 
 	struct
 	{
-		acpi_object_integer     *type;
-		acpi_object_integer     *code;
-		acpi_object_integer     *argument;
+		struct acpi_object_integer      *type;
+		struct acpi_object_integer      *code;
+		struct acpi_object_integer      *argument;
 
 	} fatal;
 
 	struct
 	{
-		acpi_operand_object     *source;
-		acpi_object_integer     *index;
-		acpi_operand_object     *target;
+		union acpi_operand_object       *source;
+		struct acpi_object_integer      *index;
+		union acpi_operand_object       *target;
 
 	} index;
 
 	struct
 	{
-		acpi_operand_object     *source;
-		acpi_object_integer     *index;
-		acpi_object_integer     *length;
-		acpi_operand_object     *target;
+		union acpi_operand_object       *source;
+		struct acpi_object_integer      *index;
+		struct acpi_object_integer      *length;
+		union acpi_operand_object       *target;
 
 	} mid;
-
-} acpi_aml_operands;
+};
 
 
 #endif
diff -Nru a/drivers/acpi/include/actables.h b/drivers/acpi/include/actables.h
--- a/drivers/acpi/include/actables.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actables.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@
 
 acpi_status
 acpi_tb_handle_to_object (
-	u16                     table_id,
-	acpi_table_desc         **table_desc);
+	u16                             table_id,
+	struct acpi_table_desc          **table_desc);
 
 /*
  * tbconvrt - Table conversion routines
@@ -42,7 +42,7 @@
 
 acpi_status
 acpi_tb_convert_to_xsdt (
-	acpi_table_desc         *table_info);
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_convert_table_fadt (
@@ -50,12 +50,12 @@
 
 acpi_status
 acpi_tb_build_common_facs (
-	acpi_table_desc         *table_info);
+	struct acpi_table_desc          *table_info);
 
 u32
 acpi_tb_get_table_count (
-	rsdp_descriptor         *RSDP,
-	acpi_table_header       *RSDT);
+	struct rsdp_descriptor          *RSDP,
+	struct acpi_table_header        *RSDT);
 
 /*
  * tbget - Table "get" routines
@@ -63,48 +63,48 @@
 
 acpi_status
 acpi_tb_get_table (
-	acpi_pointer            *address,
-	acpi_table_desc         *table_info);
+	struct acpi_pointer             *address,
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_get_table_header (
-	acpi_pointer            *address,
-	acpi_table_header       *return_header);
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *return_header);
 
 acpi_status
 acpi_tb_get_table_body (
-	acpi_pointer            *address,
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info);
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_get_this_table (
-	acpi_pointer            *address,
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info);
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_table_override (
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info);
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_get_table_ptr (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_table_header       **table_ptr_loc);
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_table_header        **table_ptr_loc);
 
 acpi_status
 acpi_tb_verify_rsdp (
-	acpi_pointer            *address);
+	struct acpi_pointer             *address);
 
 void
 acpi_tb_get_rsdt_address (
-	acpi_pointer            *out_address);
+	struct acpi_pointer             *out_address);
 
 acpi_status
 acpi_tb_validate_rsdt (
-	acpi_table_header       *table_ptr);
+	struct acpi_table_header        *table_ptr);
 
 acpi_status
 acpi_tb_get_required_tables (
@@ -112,14 +112,14 @@
 
 acpi_status
 acpi_tb_get_primary_table (
-	acpi_pointer            *address,
-	acpi_table_desc         *table_info);
+	struct acpi_pointer             *address,
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_get_secondary_table (
-	acpi_pointer            *address,
-	acpi_string             signature,
-	acpi_table_desc         *table_info);
+	struct acpi_pointer             *address,
+	acpi_string                     signature,
+	struct acpi_table_desc          *table_info);
 
 /*
  * tbinstall - Table installation
@@ -127,23 +127,23 @@
 
 acpi_status
 acpi_tb_install_table (
-	acpi_table_desc         *table_info);
+	struct acpi_table_desc          *table_info);
 
 acpi_status
 acpi_tb_match_signature (
-	char                    *signature,
-	acpi_table_desc         *table_info,
-	u8                      search_type);
+	char                            *signature,
+	struct acpi_table_desc          *table_info,
+	u8                              search_type);
 
 acpi_status
 acpi_tb_recognize_table (
-	acpi_table_desc         *table_info,
-	u8                     search_type);
+	struct acpi_table_desc          *table_info,
+	u8                             search_type);
 
 acpi_status
 acpi_tb_init_table_descriptor (
-	acpi_table_type         table_type,
-	acpi_table_desc         *table_info);
+	acpi_table_type                 table_type,
+	struct acpi_table_desc          *table_info);
 
 
 /*
@@ -156,19 +156,19 @@
 
 void
 acpi_tb_delete_acpi_table (
-	acpi_table_type         type);
+	acpi_table_type                 type);
 
 void
 acpi_tb_delete_single_table (
-	acpi_table_desc         *table_desc);
+	struct acpi_table_desc          *table_desc);
 
-acpi_table_desc *
+struct acpi_table_desc *
 acpi_tb_uninstall_table (
-	acpi_table_desc         *table_desc);
+	struct acpi_table_desc          *table_desc);
 
 void
 acpi_tb_free_acpi_tables_of_type (
-	acpi_table_desc         *table_info);
+	struct acpi_table_desc          *table_info);
 
 
 /*
@@ -181,13 +181,13 @@
 
 u8 *
 acpi_tb_scan_memory_for_rsdp (
-	u8                      *start_address,
-	u32                     length);
+	u8                              *start_address,
+	u32                             length);
 
 acpi_status
 acpi_tb_find_rsdp (
-	acpi_table_desc         *table_info,
-	u32                     flags);
+	struct acpi_table_desc          *table_info,
+	u32                             flags);
 
 
 /*
@@ -196,23 +196,23 @@
 
 acpi_status
 acpi_tb_find_table (
-	char                    *signature,
-	char                    *oem_id,
-	char                    *oem_table_id,
-	acpi_table_header       **table_ptr);
+	char                            *signature,
+	char                            *oem_id,
+	char                            *oem_table_id,
+	struct acpi_table_header        **table_ptr);
 
 acpi_status
 acpi_tb_verify_table_checksum (
-	acpi_table_header       *table_header);
+	struct acpi_table_header        *table_header);
 
 u8
 acpi_tb_checksum (
-	void                    *buffer,
-	u32                     length);
+	void                            *buffer,
+	u32                             length);
 
 acpi_status
 acpi_tb_validate_table_header (
-	acpi_table_header       *table_header);
+	struct acpi_table_header        *table_header);
 
 
 #endif /* __ACTABLES_H__ */
diff -Nru a/drivers/acpi/include/actbl.h b/drivers/acpi/include/actbl.h
--- a/drivers/acpi/include/actbl.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actbl.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@
 #define DUAL_PIC                0
 #define MULTIPLE_APIC           1
 
-/* values of Type in APIC_HEADER */
+/* values of Type in struct apic_header */
 
 #define APIC_PROC               0
 #define APIC_IO                 1
@@ -61,10 +61,10 @@
  * Common table types.  The base code can remain
  * constant if the underlying tables are changed
  */
-#define RSDT_DESCRIPTOR         RSDT_DESCRIPTOR_REV2
-#define xsdt_descriptor         XSDT_DESCRIPTOR_REV2
-#define FACS_DESCRIPTOR         facs_descriptor_rev2
-#define FADT_DESCRIPTOR         fadt_descriptor_rev2
+#define RSDT_DESCRIPTOR         struct rsdt_descriptor_rev2
+#define XSDT_DESCRIPTOR         struct xsdt_descriptor_rev2
+#define FACS_DESCRIPTOR         struct facs_descriptor_rev2
+#define FADT_DESCRIPTOR         struct fadt_descriptor_rev2
 
 
 #pragma pack(1)
@@ -73,83 +73,77 @@
  * Architecture-independent tables
  * The architecture dependent tables are in separate files
  */
-typedef struct  /* Root System Descriptor Pointer */
+struct rsdp_descriptor         /* Root System Descriptor Pointer */
 {
-	char                    signature [8];          /* ACPI signature, contains "RSD PTR " */
-	u8                      checksum;               /* To make sum of struct == 0 */
-	char                    oem_id [6];             /* OEM identification */
-	u8                      revision;               /* Must be 0 for 1.0, 2 for 2.0 */
-	u32                     rsdt_physical_address;  /* 32-bit physical address of RSDT */
-	u32                     length;                 /* XSDT Length in bytes including hdr */
-	u64                     xsdt_physical_address;  /* 64-bit physical address of XSDT */
-	u8                      extended_checksum;      /* Checksum of entire table */
-	char                    reserved [3];           /* Reserved field must be 0 */
+	char                            signature [8];          /* ACPI signature, contains "RSD PTR " */
+	u8                              checksum;               /* To make sum of struct == 0 */
+	char                            oem_id [6];             /* OEM identification */
+	u8                              revision;               /* Must be 0 for 1.0, 2 for 2.0 */
+	u32                             rsdt_physical_address;  /* 32-bit physical address of RSDT */
+	u32                             length;                 /* XSDT Length in bytes including hdr */
+	u64                             xsdt_physical_address;  /* 64-bit physical address of XSDT */
+	u8                              extended_checksum;      /* Checksum of entire table */
+	char                            reserved [3];           /* Reserved field must be 0 */
+};
 
-} rsdp_descriptor;
 
-
-typedef struct  /* ACPI common table header */
+struct acpi_table_header         /* ACPI common table header */
 {
-	char                    signature [4];          /* ACPI signature (4 ASCII characters) */
-	u32                     length;                 /* Length of table, in bytes, including header */
-	u8                      revision;               /* ACPI Specification minor version # */
-	u8                      checksum;               /* To make sum of entire table == 0 */
-	char                    oem_id [6];             /* OEM identification */
-	char                    oem_table_id [8];       /* OEM table identification */
-	u32                     oem_revision;           /* OEM revision number */
-	char                    asl_compiler_id [4];    /* ASL compiler vendor ID */
-	u32                     asl_compiler_revision;  /* ASL compiler revision number */
-
-} acpi_table_header;
+	char                            signature [4];          /* ACPI signature (4 ASCII characters) */
+	u32                             length;                 /* Length of table, in bytes, including header */
+	u8                              revision;               /* ACPI Specification minor version # */
+	u8                              checksum;               /* To make sum of entire table == 0 */
+	char                            oem_id [6];             /* OEM identification */
+	char                            oem_table_id [8];       /* OEM table identification */
+	u32                             oem_revision;           /* OEM revision number */
+	char                            asl_compiler_id [4];    /* ASL compiler vendor ID */
+	u32                             asl_compiler_revision;  /* ASL compiler revision number */
+};
 
 
-typedef struct  /* Common FACS for internal use */
+struct acpi_common_facs          /* Common FACS for internal use */
 {
-	u32                     *global_lock;
-	u64                     *firmware_waking_vector;
-	u8                      vector_width;
+	u32                             *global_lock;
+	u64                             *firmware_waking_vector;
+	u8                              vector_width;
+};
 
-} acpi_common_facs;
 
-
-typedef struct  /* APIC Table */
+struct apic_table
 {
-	acpi_table_header       header;                 /* ACPI table header */
-	u32                     local_apic_address;     /* Physical address for accessing local APICs */
-	u32                     PCATcompat      : 1;    /* a one indicates system also has dual 8259s */
-	u32                     reserved1       : 31;
-
-} APIC_TABLE;
+	struct acpi_table_header        header;                 /* ACPI table header */
+	u32                             local_apic_address;     /* Physical address for accessing local APICs */
+	u32                             PCATcompat      : 1;    /* a one indicates system also has dual 8259s */
+	u32                             reserved1       : 31;
+};
 
 
-typedef struct  /* APIC Header */
+struct apic_header
 {
-	u8                      type;                   /* APIC type.  Either APIC_PROC or APIC_IO */
-	u8                      length;                 /* Length of APIC structure */
+	u8                              type;                   /* APIC type.  Either APIC_PROC or APIC_IO */
+	u8                              length;                 /* Length of APIC structure */
+};
 
-} APIC_HEADER;
 
-
-typedef struct  /* Processor APIC */
+struct processor_apic
 {
-	APIC_HEADER             header;
-	u8                      processor_apic_id;      /* ACPI processor id */
-	u8                      local_apic_id;          /* Processor's local APIC id */
-	u32                     processor_enabled: 1;   /* Processor is usable if set */
-	u32                     reserved1       : 31;
-
-} PROCESSOR_APIC;
+	struct apic_header              header;
+	u8                              processor_apic_id;      /* ACPI processor id */
+	u8                              local_apic_id;          /* Processor's local APIC id */
+	u32                             processor_enabled: 1;   /* Processor is usable if set */
+	u32                             reserved1       : 31;
+};
 
 
-typedef struct  /* IO APIC */
+struct io_apic
 {
-	APIC_HEADER             header;
-	u8                      io_apic_id;             /* I/O APIC ID */
-	u8                      reserved;               /* Reserved - must be zero */
-	u32                     io_apic_address;        /* APIC's physical address */
-	u32                     vector;                 /* Interrupt vector index where INTI
+	struct apic_header              header;
+	u8                              io_apic_id;             /* I/O APIC ID */
+	u8                              reserved;               /* Reserved - must be zero */
+	u32                             io_apic_address;        /* APIC's physical address */
+	u32                             vector;                 /* Interrupt vector index where INTI
 			  * lines start */
-} IO_APIC;
+};
 
 
 /*
@@ -160,14 +154,13 @@
  *  IA64 TBD:   Modify Smart Battery Description to comply with ACPI IA64
  *              extensions.
  */
-typedef struct  /* Smart Battery Description Table */
+struct smart_battery_description_table
 {
-	acpi_table_header       header;
-	u32                     warning_level;
-	u32                     low_level;
-	u32                     critical_level;
-
-} SMART_BATTERY_DESCRIPTION_TABLE;
+	struct acpi_table_header        header;
+	u32                             warning_level;
+	u32                             low_level;
+	u32                             critical_level;
+};
 
 
 #pragma pack()
@@ -182,7 +175,7 @@
 #define ACPI_MEM_ALLOCATED      1
 #define ACPI_MEM_MAPPED         2
 
-/* Definitions for the Flags bitfield member of ACPI_TABLE_SUPPORT */
+/* Definitions for the Flags bitfield member of struct acpi_table_support */
 
 #define ACPI_TABLE_SINGLE       0x00
 #define ACPI_TABLE_MULTIPLE     0x01
@@ -196,15 +189,14 @@
 
 /* Data about each known table type */
 
-typedef struct _acpi_table_support
+struct acpi_table_support
 {
-	char                    *name;
-	char                    *signature;
-	void                    **global_ptr;
-	u8                      sig_length;
-	u8                      flags;
-
-} ACPI_TABLE_SUPPORT;
+	char                            *name;
+	char                            *signature;
+	void                            **global_ptr;
+	u8                              sig_length;
+	u8                              flags;
+};
 
 
 /*
diff -Nru a/drivers/acpi/include/actbl1.h b/drivers/acpi/include/actbl1.h
--- a/drivers/acpi/include/actbl1.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actbl1.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -30,87 +30,85 @@
 /*
  * ACPI 1.0 Root System Description Table (RSDT)
  */
-typedef struct
+struct rsdt_descriptor_rev1
 {
-	acpi_table_header       header;                 /* ACPI Table header */
-	u32                     table_offset_entry [1]; /* Array of pointers to other */
+	struct acpi_table_header        header;                 /* ACPI Table header */
+	u32                             table_offset_entry [1]; /* Array of pointers to other */
 			 /* ACPI tables */
-} RSDT_DESCRIPTOR_REV1;
+};
 
 
 /*
  * ACPI 1.0 Firmware ACPI Control Structure (FACS)
  */
-typedef struct
+struct facs_descriptor_rev1
 {
-	char                    signature[4];           /* ACPI Signature */
-	u32                     length;                 /* Length of structure, in bytes */
-	u32                     hardware_signature;     /* Hardware configuration signature */
-	u32                     firmware_waking_vector; /* ACPI OS waking vector */
-	u32                     global_lock;            /* Global Lock */
-	u32                     S4bios_f        : 1;    /* Indicates if S4BIOS support is present */
-	u32                     reserved1       : 31;   /* Must be 0 */
-	u8                      resverved3 [40];        /* Reserved - must be zero */
-
-} facs_descriptor_rev1;
+	char                            signature[4];           /* ACPI Signature */
+	u32                             length;                 /* Length of structure, in bytes */
+	u32                             hardware_signature;     /* Hardware configuration signature */
+	u32                             firmware_waking_vector; /* ACPI OS waking vector */
+	u32                             global_lock;            /* Global Lock */
+	u32                             S4bios_f        : 1;    /* Indicates if S4BIOS support is present */
+	u32                             reserved1       : 31;   /* Must be 0 */
+	u8                              resverved3 [40];        /* Reserved - must be zero */
+};
 
 
 /*
  * ACPI 1.0 Fixed ACPI Description Table (FADT)
  */
-typedef struct
+struct fadt_descriptor_rev1
 {
-	acpi_table_header       header;                 /* ACPI Table header */
-	u32                     firmware_ctrl;          /* Physical address of FACS */
-	u32                     dsdt;                   /* Physical address of DSDT */
-	u8                      model;                  /* System Interrupt Model */
-	u8                      reserved1;              /* Reserved */
-	u16                     sci_int;                /* System vector of SCI interrupt */
-	u32                     smi_cmd;                /* Port address of SMI command port */
-	u8                      acpi_enable;            /* Value to write to smi_cmd to enable ACPI */
-	u8                      acpi_disable;           /* Value to write to smi_cmd to disable ACPI */
-	u8                      S4bios_req;             /* Value to write to SMI CMD to enter S4BIOS state */
-	u8                      reserved2;              /* Reserved - must be zero */
-	u32                     pm1a_evt_blk;           /* Port address of Power Mgt 1a acpi_event Reg Blk */
-	u32                     pm1b_evt_blk;           /* Port address of Power Mgt 1b acpi_event Reg Blk */
-	u32                     pm1a_cnt_blk;           /* Port address of Power Mgt 1a Control Reg Blk */
-	u32                     pm1b_cnt_blk;           /* Port address of Power Mgt 1b Control Reg Blk */
-	u32                     pm2_cnt_blk;            /* Port address of Power Mgt 2 Control Reg Blk */
-	u32                     pm_tmr_blk;             /* Port address of Power Mgt Timer Ctrl Reg Blk */
-	u32                     gpe0_blk;               /* Port addr of General Purpose acpi_event 0 Reg Blk */
-	u32                     gpe1_blk;               /* Port addr of General Purpose acpi_event 1 Reg Blk */
-	u8                      pm1_evt_len;            /* Byte length of ports at pm1_x_evt_blk */
-	u8                      pm1_cnt_len;            /* Byte length of ports at pm1_x_cnt_blk */
-	u8                      pm2_cnt_len;            /* Byte Length of ports at pm2_cnt_blk */
-	u8                      pm_tm_len;              /* Byte Length of ports at pm_tm_blk */
-	u8                      gpe0_blk_len;           /* Byte Length of ports at gpe0_blk */
-	u8                      gpe1_blk_len;           /* Byte Length of ports at gpe1_blk */
-	u8                      gpe1_base;              /* Offset in gpe model where gpe1 events start */
-	u8                      reserved3;              /* Reserved */
-	u16                     plvl2_lat;              /* Worst case HW latency to enter/exit C2 state */
-	u16                     plvl3_lat;              /* Worst case HW latency to enter/exit C3 state */
-	u16                     flush_size;             /* Size of area read to flush caches */
-	u16                     flush_stride;           /* Stride used in flushing caches */
-	u8                      duty_offset;            /* Bit location of duty cycle field in p_cnt reg */
-	u8                      duty_width;             /* Bit width of duty cycle field in p_cnt reg */
-	u8                      day_alrm;               /* Index to day-of-month alarm in RTC CMOS RAM */
-	u8                      mon_alrm;               /* Index to month-of-year alarm in RTC CMOS RAM */
-	u8                      century;                /* Index to century in RTC CMOS RAM */
-	u8                      reserved4;              /* Reserved */
-	u8                      reserved4a;             /* Reserved */
-	u8                      reserved4b;             /* Reserved */
-	u32                     wb_invd         : 1;    /* The wbinvd instruction works properly */
-	u32                     wb_invd_flush   : 1;    /* The wbinvd flushes but does not invalidate */
-	u32                     proc_c1         : 1;    /* All processors support C1 state */
-	u32                     plvl2_up        : 1;    /* C2 state works on MP system */
-	u32                     pwr_button      : 1;    /* Power button is handled as a generic feature */
-	u32                     sleep_button    : 1;    /* Sleep button is handled as a generic feature, or not present */
-	u32                     fixed_rTC       : 1;    /* RTC wakeup stat not in fixed register space */
-	u32                     rtcs4           : 1;    /* RTC wakeup stat not possible from S4 */
-	u32                     tmr_val_ext     : 1;    /* The tmr_val width is 32 bits (0 = 24 bits) */
-	u32                     reserved5       : 23;   /* Reserved - must be zero */
-
-}  fadt_descriptor_rev1;
+	struct acpi_table_header        header;                 /* ACPI Table header */
+	u32                             firmware_ctrl;          /* Physical address of FACS */
+	u32                             dsdt;                   /* Physical address of DSDT */
+	u8                              model;                  /* System Interrupt Model */
+	u8                              reserved1;              /* Reserved */
+	u16                             sci_int;                /* System vector of SCI interrupt */
+	u32                             smi_cmd;                /* Port address of SMI command port */
+	u8                              acpi_enable;            /* Value to write to smi_cmd to enable ACPI */
+	u8                              acpi_disable;           /* Value to write to smi_cmd to disable ACPI */
+	u8                              S4bios_req;             /* Value to write to SMI CMD to enter S4BIOS state */
+	u8                              reserved2;              /* Reserved - must be zero */
+	u32                             pm1a_evt_blk;           /* Port address of Power Mgt 1a acpi_event Reg Blk */
+	u32                             pm1b_evt_blk;           /* Port address of Power Mgt 1b acpi_event Reg Blk */
+	u32                             pm1a_cnt_blk;           /* Port address of Power Mgt 1a Control Reg Blk */
+	u32                             pm1b_cnt_blk;           /* Port address of Power Mgt 1b Control Reg Blk */
+	u32                             pm2_cnt_blk;            /* Port address of Power Mgt 2 Control Reg Blk */
+	u32                             pm_tmr_blk;             /* Port address of Power Mgt Timer Ctrl Reg Blk */
+	u32                             gpe0_blk;               /* Port addr of General Purpose acpi_event 0 Reg Blk */
+	u32                             gpe1_blk;               /* Port addr of General Purpose acpi_event 1 Reg Blk */
+	u8                              pm1_evt_len;            /* Byte length of ports at pm1_x_evt_blk */
+	u8                              pm1_cnt_len;            /* Byte length of ports at pm1_x_cnt_blk */
+	u8                              pm2_cnt_len;            /* Byte Length of ports at pm2_cnt_blk */
+	u8                              pm_tm_len;              /* Byte Length of ports at pm_tm_blk */
+	u8                              gpe0_blk_len;           /* Byte Length of ports at gpe0_blk */
+	u8                              gpe1_blk_len;           /* Byte Length of ports at gpe1_blk */
+	u8                              gpe1_base;              /* Offset in gpe model where gpe1 events start */
+	u8                              reserved3;              /* Reserved */
+	u16                             plvl2_lat;              /* Worst case HW latency to enter/exit C2 state */
+	u16                             plvl3_lat;              /* Worst case HW latency to enter/exit C3 state */
+	u16                             flush_size;             /* Size of area read to flush caches */
+	u16                             flush_stride;           /* Stride used in flushing caches */
+	u8                              duty_offset;            /* Bit location of duty cycle field in p_cnt reg */
+	u8                              duty_width;             /* Bit width of duty cycle field in p_cnt reg */
+	u8                              day_alrm;               /* Index to day-of-month alarm in RTC CMOS RAM */
+	u8                              mon_alrm;               /* Index to month-of-year alarm in RTC CMOS RAM */
+	u8                              century;                /* Index to century in RTC CMOS RAM */
+	u8                              reserved4;              /* Reserved */
+	u8                              reserved4a;             /* Reserved */
+	u8                              reserved4b;             /* Reserved */
+	u32                             wb_invd         : 1;    /* The wbinvd instruction works properly */
+	u32                             wb_invd_flush   : 1;    /* The wbinvd flushes but does not invalidate */
+	u32                             proc_c1         : 1;    /* All processors support C1 state */
+	u32                             plvl2_up        : 1;    /* C2 state works on MP system */
+	u32                             pwr_button      : 1;    /* Power button is handled as a generic feature */
+	u32                             sleep_button    : 1;    /* Sleep button is handled as a generic feature, or not present */
+	u32                             fixed_rTC       : 1;    /* RTC wakeup stat not in fixed register space */
+	u32                             rtcs4           : 1;    /* RTC wakeup stat not possible from S4 */
+	u32                             tmr_val_ext     : 1;    /* The tmr_val width is 32 bits (0 = 24 bits) */
+	u32                             reserved5       : 23;   /* Reserved - must be zero */
+};
 
 #pragma pack()
 
diff -Nru a/drivers/acpi/include/actbl2.h b/drivers/acpi/include/actbl2.h
--- a/drivers/acpi/include/actbl2.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actbl2.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,133 +50,130 @@
 /*
  * ACPI 2.0 Root System Description Table (RSDT)
  */
-typedef struct
+struct rsdt_descriptor_rev2
 {
-	acpi_table_header       header;                 /* ACPI table header */
-	u32                     table_offset_entry [1]; /* Array of pointers to  */
+	struct acpi_table_header        header;                 /* ACPI table header */
+	u32                             table_offset_entry [1]; /* Array of pointers to  */
 			 /* ACPI table headers */
-} RSDT_DESCRIPTOR_REV2;
+};
 
 
 /*
  * ACPI 2.0 Extended System Description Table (XSDT)
  */
-typedef struct
+struct xsdt_descriptor_rev2
 {
-	acpi_table_header       header;                 /* ACPI table header */
-	u64                     table_offset_entry [1]; /* Array of pointers to  */
+	struct acpi_table_header        header;                 /* ACPI table header */
+	u64                             table_offset_entry [1]; /* Array of pointers to  */
 			 /* ACPI table headers */
-} XSDT_DESCRIPTOR_REV2;
+};
 
 
 /*
  * ACPI 2.0 Firmware ACPI Control Structure (FACS)
  */
-typedef struct
+struct facs_descriptor_rev2
 {
-	char                    signature[4];           /* ACPI signature */
-	u32                     length;                 /* Length of structure, in bytes */
-	u32                     hardware_signature;     /* Hardware configuration signature */
-	u32                     firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
-	u32                     global_lock;            /* Global Lock used to synchronize access to shared hardware resources */
-	u32                     S4bios_f        : 1;    /* S4Bios_f - Indicates if S4BIOS support is present */
-	u32                     reserved1       : 31;   /* Must be 0 */
-	u64                     xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
-	u8                      version;                /* Version of this table */
-	u8                      reserved3 [31];         /* Reserved - must be zero */
-
-} facs_descriptor_rev2;
+	char                            signature[4];           /* ACPI signature */
+	u32                             length;                 /* Length of structure, in bytes */
+	u32                             hardware_signature;     /* Hardware configuration signature */
+	u32                             firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
+	u32                             global_lock;            /* Global Lock used to synchronize access to shared hardware resources */
+	u32                             S4bios_f        : 1;    /* S4Bios_f - Indicates if S4BIOS support is present */
+	u32                             reserved1       : 31;   /* Must be 0 */
+	u64                             xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
+	u8                              version;                /* Version of this table */
+	u8                              reserved3 [31];         /* Reserved - must be zero */
+};
 
 
 /*
  * ACPI 2.0 Generic Address Structure (GAS)
  */
-typedef struct
+struct acpi_generic_address
 {
-	u8                      address_space_id;       /* Address space where struct or register exists. */
-	u8                      register_bit_width;     /* Size in bits of given register */
-	u8                      register_bit_offset;    /* Bit offset within the register */
-	u8                      reserved;               /* Must be 0 */
-	u64                     address;                /* 64-bit address of struct or register */
-
-} acpi_generic_address;
+	u8                              address_space_id;       /* Address space where struct or register exists. */
+	u8                              register_bit_width;     /* Size in bits of given register */
+	u8                              register_bit_offset;    /* Bit offset within the register */
+	u8                              reserved;               /* Must be 0 */
+	u64                             address;                /* 64-bit address of struct or register */
+};
 
 
 /*
  * ACPI 2.0 Fixed ACPI Description Table (FADT)
  */
-typedef struct
+struct fadt_descriptor_rev2
 {
-	acpi_table_header       header;             /* ACPI table header */
-	u32                     V1_firmware_ctrl;   /* 32-bit physical address of FACS */
-	u32                     V1_dsdt;            /* 32-bit physical address of DSDT */
-	u8                      reserved1;          /* System Interrupt Model isn't used in ACPI 2.0*/
-	u8                      prefer_PM_profile;  /* Conveys preferred power management profile to OSPM. */
-	u16                     sci_int;            /* System vector of SCI interrupt */
-	u32                     smi_cmd;            /* Port address of SMI command port */
-	u8                      acpi_enable;        /* Value to write to smi_cmd to enable ACPI */
-	u8                      acpi_disable;       /* Value to write to smi_cmd to disable ACPI */
-	u8                      S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */
-	u8                      pstate_cnt;         /* Processor performance state control*/
-	u32                     V1_pm1a_evt_blk;    /* Port address of Power Mgt 1a acpi_event Reg Blk */
-	u32                     V1_pm1b_evt_blk;    /* Port address of Power Mgt 1b acpi_event Reg Blk */
-	u32                     V1_pm1a_cnt_blk;    /* Port address of Power Mgt 1a Control Reg Blk */
-	u32                     V1_pm1b_cnt_blk;    /* Port address of Power Mgt 1b Control Reg Blk */
-	u32                     V1_pm2_cnt_blk;     /* Port address of Power Mgt 2 Control Reg Blk */
-	u32                     V1_pm_tmr_blk;      /* Port address of Power Mgt Timer Ctrl Reg Blk */
-	u32                     V1_gpe0_blk;        /* Port addr of General Purpose acpi_event 0 Reg Blk */
-	u32                     V1_gpe1_blk;        /* Port addr of General Purpose acpi_event 1 Reg Blk */
-	u8                      pm1_evt_len;        /* Byte length of ports at pm1_x_evt_blk */
-	u8                      pm1_cnt_len;        /* Byte length of ports at pm1_x_cnt_blk */
-	u8                      pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */
-	u8                      pm_tm_len;          /* Byte Length of ports at pm_tm_blk */
-	u8                      gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */
-	u8                      gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */
-	u8                      gpe1_base;          /* Offset in gpe model where gpe1 events start */
-	u8                      cst_cnt;            /* Support for the _CST object and C States change notification.*/
-	u16                     plvl2_lat;          /* Worst case HW latency to enter/exit C2 state */
-	u16                     plvl3_lat;          /* Worst case HW latency to enter/exit C3 state */
-	u16                     flush_size;         /* Number of flush strides that need to be read */
-	u16                     flush_stride;       /* Processor's memory cache line width, in bytes */
-	u8                      duty_offset;        /* Processor's duty cycle index in processor's P_CNT reg*/
-	u8                      duty_width;         /* Processor's duty cycle value bit width in P_CNT register.*/
-	u8                      day_alrm;           /* Index to day-of-month alarm in RTC CMOS RAM */
-	u8                      mon_alrm;           /* Index to month-of-year alarm in RTC CMOS RAM */
-	u8                      century;            /* Index to century in RTC CMOS RAM */
-	u16                     iapc_boot_arch;     /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
-	u8                      reserved2;          /* Reserved */
-	u32                     wb_invd     : 1;    /* The wbinvd instruction works properly */
-	u32                     wb_invd_flush : 1;  /* The wbinvd flushes but does not invalidate */
-	u32                     proc_c1     : 1;    /* All processors support C1 state */
-	u32                     plvl2_up    : 1;    /* C2 state works on MP system */
-	u32                     pwr_button  : 1;    /* Power button is handled as a generic feature */
-	u32                     sleep_button : 1;   /* Sleep button is handled as a generic feature, or not present */
-	u32                     fixed_rTC   : 1;    /* RTC wakeup stat not in fixed register space */
-	u32                     rtcs4       : 1;    /* RTC wakeup stat not possible from S4 */
-	u32                     tmr_val_ext : 1;    /* Indicates tmr_val is 32 bits 0=24-bits*/
-	u32                     dock_cap    : 1;    /* Supports Docking */
-	u32                     reset_reg_sup : 1;  /* Indicates system supports system reset via the FADT RESET_REG*/
-	u32                     sealed_case : 1;    /* Indicates system has no internal expansion capabilities and case is sealed. */
-	u32                     headless    : 1;    /* Indicates system does not have local video capabilities or local input devices.*/
-	u32                     cpu_sw_sleep : 1;   /* Indicates to OSPM that a processor native instruction */
+	struct acpi_table_header        header;             /* ACPI table header */
+	u32                             V1_firmware_ctrl;   /* 32-bit physical address of FACS */
+	u32                             V1_dsdt;            /* 32-bit physical address of DSDT */
+	u8                              reserved1;          /* System Interrupt Model isn't used in ACPI 2.0*/
+	u8                              prefer_PM_profile;  /* Conveys preferred power management profile to OSPM. */
+	u16                             sci_int;            /* System vector of SCI interrupt */
+	u32                             smi_cmd;            /* Port address of SMI command port */
+	u8                              acpi_enable;        /* Value to write to smi_cmd to enable ACPI */
+	u8                              acpi_disable;       /* Value to write to smi_cmd to disable ACPI */
+	u8                              S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */
+	u8                              pstate_cnt;         /* Processor performance state control*/
+	u32                             V1_pm1a_evt_blk;    /* Port address of Power Mgt 1a acpi_event Reg Blk */
+	u32                             V1_pm1b_evt_blk;    /* Port address of Power Mgt 1b acpi_event Reg Blk */
+	u32                             V1_pm1a_cnt_blk;    /* Port address of Power Mgt 1a Control Reg Blk */
+	u32                             V1_pm1b_cnt_blk;    /* Port address of Power Mgt 1b Control Reg Blk */
+	u32                             V1_pm2_cnt_blk;     /* Port address of Power Mgt 2 Control Reg Blk */
+	u32                             V1_pm_tmr_blk;      /* Port address of Power Mgt Timer Ctrl Reg Blk */
+	u32                             V1_gpe0_blk;        /* Port addr of General Purpose acpi_event 0 Reg Blk */
+	u32                             V1_gpe1_blk;        /* Port addr of General Purpose acpi_event 1 Reg Blk */
+	u8                              pm1_evt_len;        /* Byte length of ports at pm1_x_evt_blk */
+	u8                              pm1_cnt_len;        /* Byte length of ports at pm1_x_cnt_blk */
+	u8                              pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */
+	u8                              pm_tm_len;          /* Byte Length of ports at pm_tm_blk */
+	u8                              gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */
+	u8                              gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */
+	u8                              gpe1_base;          /* Offset in gpe model where gpe1 events start */
+	u8                              cst_cnt;            /* Support for the _CST object and C States change notification.*/
+	u16                             plvl2_lat;          /* Worst case HW latency to enter/exit C2 state */
+	u16                             plvl3_lat;          /* Worst case HW latency to enter/exit C3 state */
+	u16                             flush_size;         /* Number of flush strides that need to be read */
+	u16                             flush_stride;       /* Processor's memory cache line width, in bytes */
+	u8                              duty_offset;        /* Processor's duty cycle index in processor's P_CNT reg*/
+	u8                              duty_width;         /* Processor's duty cycle value bit width in P_CNT register.*/
+	u8                              day_alrm;           /* Index to day-of-month alarm in RTC CMOS RAM */
+	u8                              mon_alrm;           /* Index to month-of-year alarm in RTC CMOS RAM */
+	u8                              century;            /* Index to century in RTC CMOS RAM */
+	u16                             iapc_boot_arch;     /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
+	u8                              reserved2;          /* Reserved */
+	u32                             wb_invd     : 1;    /* The wbinvd instruction works properly */
+	u32                             wb_invd_flush : 1;  /* The wbinvd flushes but does not invalidate */
+	u32                             proc_c1     : 1;    /* All processors support C1 state */
+	u32                             plvl2_up    : 1;    /* C2 state works on MP system */
+	u32                             pwr_button  : 1;    /* Power button is handled as a generic feature */
+	u32                             sleep_button : 1;   /* Sleep button is handled as a generic feature, or not present */
+	u32                             fixed_rTC   : 1;    /* RTC wakeup stat not in fixed register space */
+	u32                             rtcs4       : 1;    /* RTC wakeup stat not possible from S4 */
+	u32                             tmr_val_ext : 1;    /* Indicates tmr_val is 32 bits 0=24-bits*/
+	u32                             dock_cap    : 1;    /* Supports Docking */
+	u32                             reset_reg_sup : 1;  /* Indicates system supports system reset via the FADT RESET_REG*/
+	u32                             sealed_case : 1;    /* Indicates system has no internal expansion capabilities and case is sealed. */
+	u32                             headless    : 1;    /* Indicates system does not have local video capabilities or local input devices.*/
+	u32                             cpu_sw_sleep : 1;   /* Indicates to OSPM that a processor native instruction */
 			   /* Must be executed after writing the SLP_TYPx register. */
-	u32                     reserved6   : 18;   /* Reserved - must be zero */
-
-	acpi_generic_address    reset_register;     /* Reset register address in GAS format */
-	u8                      reset_value;        /* Value to write to the reset_register port to reset the system. */
-	u8                      reserved7[3];       /* These three bytes must be zero */
-	u64                     xfirmware_ctrl;     /* 64-bit physical address of FACS */
-	u64                     Xdsdt;              /* 64-bit physical address of DSDT */
-	acpi_generic_address    xpm1a_evt_blk;      /* Extended Power Mgt 1a acpi_event Reg Blk address */
-	acpi_generic_address    xpm1b_evt_blk;      /* Extended Power Mgt 1b acpi_event Reg Blk address */
-	acpi_generic_address    xpm1a_cnt_blk;      /* Extended Power Mgt 1a Control Reg Blk address */
-	acpi_generic_address    xpm1b_cnt_blk;      /* Extended Power Mgt 1b Control Reg Blk address */
-	acpi_generic_address    xpm2_cnt_blk;       /* Extended Power Mgt 2 Control Reg Blk address */
-	acpi_generic_address    xpm_tmr_blk;        /* Extended Power Mgt Timer Ctrl Reg Blk address */
-	acpi_generic_address    xgpe0_blk;          /* Extended General Purpose acpi_event 0 Reg Blk address */
-	acpi_generic_address    xgpe1_blk;          /* Extended General Purpose acpi_event 1 Reg Blk address */
+	u32                             reserved6   : 18;   /* Reserved - must be zero */
 
-}  fadt_descriptor_rev2;
+	struct acpi_generic_address     reset_register;     /* Reset register address in GAS format */
+	u8                              reset_value;        /* Value to write to the reset_register port to reset the system. */
+	u8                              reserved7[3];       /* These three bytes must be zero */
+	u64                             xfirmware_ctrl;     /* 64-bit physical address of FACS */
+	u64                             Xdsdt;              /* 64-bit physical address of DSDT */
+	struct acpi_generic_address     xpm1a_evt_blk;      /* Extended Power Mgt 1a acpi_event Reg Blk address */
+	struct acpi_generic_address     xpm1b_evt_blk;      /* Extended Power Mgt 1b acpi_event Reg Blk address */
+	struct acpi_generic_address     xpm1a_cnt_blk;      /* Extended Power Mgt 1a Control Reg Blk address */
+	struct acpi_generic_address     xpm1b_cnt_blk;      /* Extended Power Mgt 1b Control Reg Blk address */
+	struct acpi_generic_address     xpm2_cnt_blk;       /* Extended Power Mgt 2 Control Reg Blk address */
+	struct acpi_generic_address     xpm_tmr_blk;        /* Extended Power Mgt Timer Ctrl Reg Blk address */
+	struct acpi_generic_address     xgpe0_blk;          /* Extended General Purpose acpi_event 0 Reg Blk address */
+	struct acpi_generic_address     xgpe1_blk;          /* Extended General Purpose acpi_event 1 Reg Blk address */
+};
 
 
 #pragma pack()
diff -Nru a/drivers/acpi/include/actbl71.h b/drivers/acpi/include/actbl71.h
--- a/drivers/acpi/include/actbl71.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actbl71.h	Fri Jan 10 12:12:38 2003
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -40,105 +40,103 @@
 
 /* Only for clarity in declarations */
 
-typedef u64                 IO_ADDRESS;
+typedef u64                         IO_ADDRESS;
 
 
 #pragma pack(1)
-typedef struct  /* Root System Descriptor Pointer */
+struct  /* Root System Descriptor Pointer */
 {
 	NATIVE_CHAR             signature [8];          /* contains "RSD PTR " */
-	u8                      checksum;               /* to make sum of struct == 0 */
+	u8                              checksum;               /* to make sum of struct == 0 */
 	NATIVE_CHAR             oem_id [6];             /* OEM identification */
-	u8                      reserved;               /* Must be 0 for 1.0, 2 for 2.0 */
-	u64                     rsdt_physical_address;  /* 64-bit physical address of RSDT */
-} RSDP_DESCRIPTOR_REV071;
+	u8                              reserved;               /* Must be 0 for 1.0, 2 for 2.0 */
+	u64                             rsdt_physical_address;  /* 64-bit physical address of RSDT */
+};
 
 
 /*****************************************/
 /* IA64 Extensions to ACPI Spec Rev 0.71 */
 /* for the Root System Description Table */
 /*****************************************/
-typedef struct
+struct
 {
-	acpi_table_header   header;                 /* Table header */
-	u32                 reserved_pad;           /* IA64 alignment, must be 0 */
-	u64                 table_offset_entry [1]; /* Array of pointers to other */
+	struct acpi_table_header    header;                 /* Table header */
+	u32                         reserved_pad;           /* IA64 alignment, must be 0 */
+	u64                         table_offset_entry [1]; /* Array of pointers to other */
 			   /* tables' headers */
-} RSDT_DESCRIPTOR_REV071;
+};
 
 
 /*******************************************/
 /* IA64 Extensions to ACPI Spec Rev 0.71   */
 /* for the Firmware ACPI Control Structure */
 /*******************************************/
-typedef struct
+struct
 {
 	NATIVE_CHAR         signature[4];         /* signature "FACS" */
-	u32                 length;               /* length of structure, in bytes */
-	u32                 hardware_signature;   /* hardware configuration signature */
-	u32                 reserved4;            /* must be 0 */
-	u64                 firmware_waking_vector; /* ACPI OS waking vector */
-	u64                 global_lock;          /* Global Lock */
-	u32                 S4bios_f      : 1;    /* Indicates if S4BIOS support is present */
-	u32                 reserved1     : 31;   /* must be 0 */
-	u8                  reserved3 [28];       /* reserved - must be zero */
-
-} facs_descriptor_rev071;
+	u32                         length;               /* length of structure, in bytes */
+	u32                         hardware_signature;   /* hardware configuration signature */
+	u32                         reserved4;            /* must be 0 */
+	u64                         firmware_waking_vector; /* ACPI OS waking vector */
+	u64                         global_lock;          /* Global Lock */
+	u32                         S4bios_f      : 1;    /* Indicates if S4BIOS support is present */
+	u32                         reserved1     : 31;   /* must be 0 */
+	u8                          reserved3 [28];       /* reserved - must be zero */
+};
 
 
 /******************************************/
 /* IA64 Extensions to ACPI Spec Rev 0.71  */
 /* for the Fixed ACPI Description Table   */
 /******************************************/
-typedef struct
+struct
 {
-	acpi_table_header   header;             /* table header */
-	u32                 reserved_pad;       /* IA64 alignment, must be 0 */
-	u64                 firmware_ctrl;      /* 64-bit Physical address of FACS */
-	u64                 dsdt;               /* 64-bit Physical address of DSDT */
-	u8                  model;              /* System Interrupt Model */
-	u8                  address_space;      /* Address Space Bitmask */
-	u16                 sci_int;            /* System vector of SCI interrupt */
-	u8                  acpi_enable;        /* value to write to smi_cmd to enable ACPI */
-	u8                  acpi_disable;       /* value to write to smi_cmd to disable ACPI */
-	u8                  S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */
-	u8                  reserved2;          /* reserved - must be zero */
-	u64                 smi_cmd;            /* Port address of SMI command port */
-	u64                 pm1a_evt_blk;       /* Port address of Power Mgt 1a acpi_event Reg Blk */
-	u64                 pm1b_evt_blk;       /* Port address of Power Mgt 1b acpi_event Reg Blk */
-	u64                 pm1a_cnt_blk;       /* Port address of Power Mgt 1a Control Reg Blk */
-	u64                 pm1b_cnt_blk;       /* Port address of Power Mgt 1b Control Reg Blk */
-	u64                 pm2_cnt_blk;        /* Port address of Power Mgt 2 Control Reg Blk */
-	u64                 pm_tmr_blk;         /* Port address of Power Mgt Timer Ctrl Reg Blk */
-	u64                 gpe0_blk;           /* Port addr of General Purpose acpi_event 0 Reg Blk */
-	u64                 gpe1_blk;           /* Port addr of General Purpose acpi_event 1 Reg Blk */
-	u8                  pm1_evt_len;        /* Byte length of ports at pm1_x_evt_blk */
-	u8                  pm1_cnt_len;        /* Byte length of ports at pm1_x_cnt_blk */
-	u8                  pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */
-	u8                  pm_tm_len;          /* Byte Length of ports at pm_tm_blk */
-	u8                  gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */
-	u8                  gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */
-	u8                  gpe1_base;          /* offset in gpe model where gpe1 events start */
-	u8                  reserved3;          /* reserved */
-	u16                 plvl2_lat;          /* worst case HW latency to enter/exit C2 state */
-	u16                 plvl3_lat;          /* worst case HW latency to enter/exit C3 state */
-	u8                  day_alrm;           /* index to day-of-month alarm in RTC CMOS RAM */
-	u8                  mon_alrm;           /* index to month-of-year alarm in RTC CMOS RAM */
-	u8                  century;            /* index to century in RTC CMOS RAM */
-	u8                  reserved4;          /* reserved */
-	u32                 flush_cash  : 1;    /* PAL_FLUSH_CACHE is correctly supported */
-	u32                 reserved5   : 1;    /* reserved - must be zero */
-	u32                 proc_c1     : 1;    /* all processors support C1 state */
-	u32                 plvl2_up    : 1;    /* C2 state works on MP system */
-	u32                 pwr_button  : 1;    /* Power button is handled as a generic feature */
-	u32                 sleep_button : 1;   /* Sleep button is handled as a generic feature, or not present */
-	u32                 fixed_rTC   : 1;    /* RTC wakeup stat not in fixed register space */
-	u32                 rtcs4       : 1;    /* RTC wakeup stat not possible from S4 */
-	u32                 tmr_val_ext : 1;    /* tmr_val is 32 bits */
-	u32                 dock_cap    : 1;    /* Supports Docking */
-	u32                 reserved6   : 22;    /* reserved - must be zero */
-
-}  fadt_descriptor_rev071;
+	struct acpi_table_header    header;             /* table header */
+	u32                         reserved_pad;       /* IA64 alignment, must be 0 */
+	u64                         firmware_ctrl;      /* 64-bit Physical address of FACS */
+	u64                         dsdt;               /* 64-bit Physical address of DSDT */
+	u8                          model;              /* System Interrupt Model */
+	u8                          address_space;      /* Address Space Bitmask */
+	u16                         sci_int;            /* System vector of SCI interrupt */
+	u8                          acpi_enable;        /* value to write to smi_cmd to enable ACPI */
+	u8                          acpi_disable;       /* value to write to smi_cmd to disable ACPI */
+	u8                          S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */
+	u8                          reserved2;          /* reserved - must be zero */
+	u64                         smi_cmd;            /* Port address of SMI command port */
+	u64                         pm1a_evt_blk;       /* Port address of Power Mgt 1a acpi_event Reg Blk */
+	u64                         pm1b_evt_blk;       /* Port address of Power Mgt 1b acpi_event Reg Blk */
+	u64                         pm1a_cnt_blk;       /* Port address of Power Mgt 1a Control Reg Blk */
+	u64                         pm1b_cnt_blk;       /* Port address of Power Mgt 1b Control Reg Blk */
+	u64                         pm2_cnt_blk;        /* Port address of Power Mgt 2 Control Reg Blk */
+	u64                         pm_tmr_blk;         /* Port address of Power Mgt Timer Ctrl Reg Blk */
+	u64                         gpe0_blk;           /* Port addr of General Purpose acpi_event 0 Reg Blk */
+	u64                         gpe1_blk;           /* Port addr of General Purpose acpi_event 1 Reg Blk */
+	u8                          pm1_evt_len;        /* Byte length of ports at pm1_x_evt_blk */
+	u8                          pm1_cnt_len;        /* Byte length of ports at pm1_x_cnt_blk */
+	u8                          pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */
+	u8                          pm_tm_len;          /* Byte Length of ports at pm_tm_blk */
+	u8                          gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */
+	u8                          gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */
+	u8                          gpe1_base;          /* offset in gpe model where gpe1 events start */
+	u8                          reserved3;          /* reserved */
+	u16                         plvl2_lat;          /* worst case HW latency to enter/exit C2 state */
+	u16                         plvl3_lat;          /* worst case HW latency to enter/exit C3 state */
+	u8                          day_alrm;           /* index to day-of-month alarm in RTC CMOS RAM */
+	u8                          mon_alrm;           /* index to month-of-year alarm in RTC CMOS RAM */
+	u8                          century;            /* index to century in RTC CMOS RAM */
+	u8                          reserved4;          /* reserved */
+	u32                         flush_cash  : 1;    /* PAL_FLUSH_CACHE is correctly supported */
+	u32                         reserved5   : 1;    /* reserved - must be zero */
+	u32                         proc_c1     : 1;    /* all processors support C1 state */
+	u32                         plvl2_up    : 1;    /* C2 state works on MP system */
+	u32                         pwr_button  : 1;    /* Power button is handled as a generic feature */
+	u32                         sleep_button : 1;   /* Sleep button is handled as a generic feature, or not present */
+	u32                         fixed_rTC   : 1;    /* RTC wakeup stat not in fixed register space */
+	u32                         rtcs4       : 1;    /* RTC wakeup stat not possible from S4 */
+	u32                         tmr_val_ext : 1;    /* tmr_val is 32 bits */
+	u32                         dock_cap    : 1;    /* Supports Docking */
+	u32                         reserved6   : 22;    /* reserved - must be zero */
+};
 
 #pragma pack()
 
diff -Nru a/drivers/acpi/include/actypes.h b/drivers/acpi/include/actypes.h
--- a/drivers/acpi/include/actypes.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/actypes.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -90,13 +90,13 @@
 
 /*! [End] no source code translation !*/
 
-typedef s64                             acpi_native_int;
-typedef u64                             acpi_native_uint;
+typedef s64                                     acpi_native_int;
+typedef u64                                     acpi_native_uint;
 
-typedef u64                             acpi_table_ptr;
-typedef u64                             acpi_io_address;
-typedef u64                             acpi_physical_address;
-typedef u64                             acpi_size;
+typedef u64                                     acpi_table_ptr;
+typedef u64                                     acpi_io_address;
+typedef u64                                     acpi_physical_address;
+typedef u64                                     acpi_size;
 
 #define ALIGNED_ADDRESS_BOUNDARY        0x00000008      /* No hardware alignment support in IA64 */
 #define ACPI_USE_NATIVE_DIVIDE                          /* Native 64-bit integer support */
@@ -118,22 +118,21 @@
 typedef int                             INT16;
 typedef unsigned long                   UINT32;
 
-typedef struct
+struct
 {
 	UINT32                                  Lo;
 	UINT32                                  Hi;
-
-} UINT64;
+};
 
 /*! [End] no source code translation !*/
 
-typedef u16                             acpi_native_uint;
-typedef s16                             acpi_native_int;
+typedef u16                                     acpi_native_uint;
+typedef s16                                     acpi_native_int;
 
-typedef u32                             acpi_table_ptr;
-typedef u32                             acpi_io_address;
-typedef char                            *acpi_physical_address;
-typedef u16                             acpi_size;
+typedef u32                                     acpi_table_ptr;
+typedef u32                                     acpi_io_address;
+typedef char                                    *acpi_physical_address;
+typedef u16                                     acpi_size;
 
 #define ALIGNED_ADDRESS_BOUNDARY        0x00000002
 #define _HW_ALIGNMENT_SUPPORT
@@ -165,13 +164,13 @@
 
 /*! [End] no source code translation !*/
 
-typedef s32                             acpi_native_int;
-typedef u32                             acpi_native_uint;
+typedef s32                                     acpi_native_int;
+typedef u32                                     acpi_native_uint;
 
-typedef u64                             acpi_table_ptr;
-typedef u32                             acpi_io_address;
-typedef u64                             acpi_physical_address;
-typedef u32                             acpi_size;
+typedef u64                                     acpi_table_ptr;
+typedef u32                                     acpi_io_address;
+typedef u64                                     acpi_physical_address;
+typedef u32                                     acpi_size;
 
 #define ALIGNED_ADDRESS_BOUNDARY        0x00000004
 #define _HW_ALIGNMENT_SUPPORT
@@ -186,27 +185,25 @@
 /*
  * Miscellaneous common types
  */
-typedef u32                             UINT32_BIT;
-typedef acpi_native_uint                ACPI_PTRDIFF;
+typedef u32                                     UINT32_BIT;
+typedef acpi_native_uint                        ACPI_PTRDIFF;
 
 /*
  * Pointer overlays to avoid lots of typecasting for
  * code that accepts both physical and logical pointers.
  */
-typedef union acpi_ptrs
+union acpi_pointers
 {
-	acpi_physical_address       physical;
-	void                        *logical;
-	acpi_table_ptr              value;
-
-} acpi_pointers;
-
-typedef struct acpi_pointer
-{
-	u32                         pointer_type;
-	union acpi_ptrs             pointer;
-
-} acpi_pointer;
+	acpi_physical_address               physical;
+	void                                *logical;
+	acpi_table_ptr                      value;
+};
+
+struct acpi_pointer
+{
+	u32                                 pointer_type;
+	union acpi_pointers                 pointer;
+};
 
 /* pointer_types for above */
 
@@ -245,31 +242,28 @@
 /*
  * Local datatypes
  */
-typedef u32                             acpi_status;    /* All ACPI Exceptions */
-typedef u32                             acpi_name;      /* 4-byte ACPI name */
-typedef char*                           acpi_string;    /* Null terminated ASCII string */
-typedef void*                           acpi_handle;    /* Actually a ptr to an Node */
+typedef u32                                     acpi_status;    /* All ACPI Exceptions */
+typedef u32                                     acpi_name;      /* 4-byte ACPI name */
+typedef char *                                  acpi_string;    /* Null terminated ASCII string */
+typedef void *                                  acpi_handle;    /* Actually a ptr to an Node */
 
-typedef struct
+struct uint64_struct
 {
-	u32                         lo;
-	u32                         hi;
+	u32                                 lo;
+	u32                                 hi;
+};
 
-} uint64_struct;
-
-typedef union
+union uint64_overlay
 {
-	u64                         full;
-	uint64_struct               part;
-
-} uint64_overlay;
+	u64                                 full;
+	struct uint64_struct                part;
+};
 
-typedef struct
+struct uint32_struct
 {
-	u32                         lo;
-	u32                         hi;
-
-} uint32_struct;
+	u32                                 lo;
+	u32                                 hi;
+};
 
 
 /*
@@ -283,7 +277,7 @@
 
 /* 32-bit integers only, no 64-bit support */
 
-typedef u32                             acpi_integer;
+typedef u32                                     acpi_integer;
 #define ACPI_INTEGER_MAX                ACPI_UINT32_MAX
 #define ACPI_INTEGER_BIT_SIZE           32
 #define ACPI_MAX_BCD_VALUE              99999999
@@ -297,7 +291,7 @@
 
 /* 64-bit integers */
 
-typedef u64                             acpi_integer;
+typedef u64                                     acpi_integer;
 #define ACPI_INTEGER_MAX                ACPI_UINT64_MAX
 #define ACPI_INTEGER_BIT_SIZE           64
 #define ACPI_MAX_BCD_VALUE              9999999999999999
@@ -384,7 +378,7 @@
 /*
  *  Table types.  These values are passed to the table related APIs
  */
-typedef u32                             acpi_table_type;
+typedef u32                                     acpi_table_type;
 
 #define ACPI_TABLE_RSDP                 (acpi_table_type) 0
 #define ACPI_TABLE_DSDT                 (acpi_table_type) 1
@@ -406,7 +400,7 @@
  * Types must be kept in sync with the global acpi_ns_properties
  * and acpi_ns_type_names arrays.
  */
-typedef u32                             acpi_object_type;
+typedef u32                                     acpi_object_type;
 
 #define ACPI_TYPE_ANY                   0x00
 #define ACPI_TYPE_INTEGER               0x01  /* Byte/Word/Dword/Zero/One/Ones */
@@ -450,7 +444,7 @@
 
 /*
  * These are special object types that never appear in
- * a Namespace node, only in an acpi_operand_object
+ * a Namespace node, only in an union acpi_operand_object
  */
 #define ACPI_TYPE_LOCAL_EXTRA           0x1B
 #define ACPI_TYPE_LOCAL_DATA            0x1C
@@ -505,7 +499,7 @@
 /*
  * acpi_event Types: Fixed & General Purpose
  */
-typedef u32                             acpi_event_type;
+typedef u32                                     acpi_event_type;
 
 #define ACPI_EVENT_FIXED                0
 #define ACPI_EVENT_GPE                  1
@@ -550,7 +544,7 @@
  *          |     +----- Set?
  *          +----------- <Reserved>
  */
-typedef u32                             acpi_event_status;
+typedef u32                                     acpi_event_status;
 
 #define ACPI_EVENT_FLAG_DISABLED        (acpi_event_status) 0x00
 #define ACPI_EVENT_FLAG_ENABLED         (acpi_event_status) 0x01
@@ -569,7 +563,7 @@
 
 /* Address Space (Operation Region) Types */
 
-typedef u8                              acpi_adr_space_type;
+typedef u8                                      acpi_adr_space_type;
 
 #define ACPI_ADR_SPACE_SYSTEM_MEMORY    (acpi_adr_space_type) 0
 #define ACPI_ADR_SPACE_SYSTEM_IO        (acpi_adr_space_type) 1
@@ -579,6 +573,7 @@
 #define ACPI_ADR_SPACE_CMOS             (acpi_adr_space_type) 5
 #define ACPI_ADR_SPACE_PCI_BAR_TARGET   (acpi_adr_space_type) 6
 #define ACPI_ADR_SPACE_DATA_TABLE       (acpi_adr_space_type) 7
+#define ACPI_ADR_SPACE_FIXED_HARDWARE   (acpi_adr_space_type) 127
 
 
 /*
@@ -616,70 +611,68 @@
 /*
  * External ACPI object definition
  */
-typedef union acpi_obj
+union acpi_object
 {
-	acpi_object_type            type;   /* See definition of acpi_ns_type for values */
+	acpi_object_type                    type;   /* See definition of acpi_ns_type for values */
 	struct
 	{
-		acpi_object_type            type;
-		acpi_integer                value;      /* The actual number */
+		acpi_object_type                    type;
+		acpi_integer                        value;      /* The actual number */
 	} integer;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         length;     /* # of bytes in string, excluding trailing null */
-		char                        *pointer;   /* points to the string value */
+		acpi_object_type                    type;
+		u32                                 length;     /* # of bytes in string, excluding trailing null */
+		char                                *pointer;   /* points to the string value */
 	} string;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         length;     /* # of bytes in buffer */
-		u8                          *pointer;   /* points to the buffer */
+		acpi_object_type                    type;
+		u32                                 length;     /* # of bytes in buffer */
+		u8                                  *pointer;   /* points to the buffer */
 	} buffer;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         fill1;
-		acpi_handle                 handle;     /* object reference */
+		acpi_object_type                    type;
+		u32                                 fill1;
+		acpi_handle                         handle;     /* object reference */
 	} reference;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         count;      /* # of elements in package */
-		union acpi_obj              *elements;  /* Pointer to an array of ACPI_OBJECTs */
+		acpi_object_type                    type;
+		u32                                 count;      /* # of elements in package */
+		union acpi_object                   *elements;  /* Pointer to an array of ACPI_OBJECTs */
 	} package;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         proc_id;
-		acpi_io_address             pblk_address;
-		u32                         pblk_length;
+		acpi_object_type                    type;
+		u32                                 proc_id;
+		acpi_io_address                     pblk_address;
+		u32                                 pblk_length;
 	} processor;
 
 	struct
 	{
-		acpi_object_type            type;
-		u32                         system_level;
-		u32                         resource_order;
+		acpi_object_type                    type;
+		u32                                 system_level;
+		u32                                 resource_order;
 	} power_resource;
-
-} acpi_object;
+};
 
 
 /*
  * List of objects, used as a parameter list for control method evaluation
  */
-typedef struct acpi_obj_list
+struct acpi_object_list
 {
-	u32                         count;
-	acpi_object                 *pointer;
-
-} acpi_object_list;
+	u32                                 count;
+	union acpi_object                   *pointer;
+};
 
 
 /*
@@ -689,12 +682,11 @@
 #define ACPI_ALLOCATE_BUFFER        (acpi_size) (-1)
 #define ACPI_ALLOCATE_LOCAL_BUFFER  (acpi_size) (-2)
 
-typedef struct
+struct acpi_buffer
 {
-	acpi_size                   length;         /* Length in bytes of the buffer */
-	void                        *pointer;       /* pointer to buffer */
-
-} acpi_buffer;
+	acpi_size                           length;         /* Length in bytes of the buffer */
+	void                                *pointer;       /* pointer to buffer */
+};
 
 
 /*
@@ -717,29 +709,27 @@
 /*
  * ACPI Table Info.  One per ACPI table _type_
  */
-typedef struct acpi_table_info
+struct acpi_table_info
 {
-	u32                         count;
-
-} acpi_table_info;
+	u32                                 count;
+};
 
 
 /*
  * System info returned by acpi_get_system_info()
  */
-typedef struct _acpi_sys_info
+struct acpi_system_info
 {
-	u32                         acpi_ca_version;
-	u32                         flags;
-	u32                         timer_resolution;
-	u32                         reserved1;
-	u32                         reserved2;
-	u32                         debug_level;
-	u32                         debug_layer;
-	u32                         num_table_types;
-	acpi_table_info             table_info [NUM_ACPI_TABLES];
-
-} acpi_system_info;
+	u32                                 acpi_ca_version;
+	u32                                 flags;
+	u32                                 timer_resolution;
+	u32                                 reserved1;
+	u32                                 reserved2;
+	u32                                 debug_level;
+	u32                                 debug_layer;
+	u32                                 num_table_types;
+	struct acpi_table_info              table_info [NUM_ACPI_TABLES];
+};
 
 
 /*
@@ -747,28 +737,28 @@
  */
 typedef
 u32 (*acpi_event_handler) (
-	void                        *context);
+	void                                *context);
 
 typedef
 void (*acpi_gpe_handler) (
-	void                        *context);
+	void                                *context);
 
 typedef
 void (*acpi_notify_handler) (
-	acpi_handle                 device,
-	u32                         value,
-	void                        *context);
+	acpi_handle                         device,
+	u32                                 value,
+	void                                *context);
 
 typedef
 void (*acpi_object_handler) (
-	acpi_handle                 object,
-	u32                         function,
-	void                        *data);
+	acpi_handle                         object,
+	u32                                 function,
+	void                                *data);
 
 typedef
 acpi_status (*acpi_init_handler) (
-	acpi_handle                 object,
-	u32                         function);
+	acpi_handle                         object,
+	u32                                 function);
 
 #define ACPI_INIT_DEVICE_INI        1
 
@@ -777,32 +767,32 @@
 
 typedef
 acpi_status (*acpi_adr_space_handler) (
-	u32                         function,
-	acpi_physical_address       address,
-	u32                         bit_width,
-	acpi_integer                *value,
-	void                        *handler_context,
-	void                        *region_context);
+	u32                                 function,
+	acpi_physical_address               address,
+	u32                                 bit_width,
+	acpi_integer                        *value,
+	void                                *handler_context,
+	void                                *region_context);
 
 #define ACPI_DEFAULT_HANDLER        NULL
 
 
 typedef
 acpi_status (*acpi_adr_space_setup) (
-	acpi_handle                 region_handle,
-	u32                         function,
-	void                        *handler_context,
-	void                        **region_context);
+	acpi_handle                         region_handle,
+	u32                                 function,
+	void                                *handler_context,
+	void                                **region_context);
 
 #define ACPI_REGION_ACTIVATE    0
 #define ACPI_REGION_DEACTIVATE  1
 
 typedef
 acpi_status (*acpi_walk_callback) (
-	acpi_handle                 obj_handle,
-	u32                         nesting_level,
-	void                        *context,
-	void                        **return_value);
+	acpi_handle                         obj_handle,
+	u32                                 nesting_level,
+	void                                *context,
+	void                                **return_value);
 
 
 /* Interrupt handler return values */
@@ -820,47 +810,47 @@
 
 
 #define ACPI_COMMON_OBJ_INFO \
-	acpi_object_type            type;           /* ACPI object type */ \
-	acpi_name                   name            /* ACPI object Name */
+	acpi_object_type                    type;           /* ACPI object type */ \
+	acpi_name                           name            /* ACPI object Name */
 
 
-typedef struct
+struct acpi_obj_info_header
 {
 	ACPI_COMMON_OBJ_INFO;
-} acpi_obj_info_header;
+};
 
 
-typedef struct
+struct acpi_device_info
 {
 	ACPI_COMMON_OBJ_INFO;
 
-	u32                         valid;              /*  Are the next bits legit? */
-	char                        hardware_id[9];     /*  _HID value if any */
-	char                        unique_id[9];       /*  _UID value if any */
-	acpi_integer                address;            /*  _ADR value if any */
-	u32                         current_status;     /*  _STA value */
-} acpi_device_info;
+	u32                                 valid;              /*  Are the next bits legit? */
+	char                                hardware_id[9];     /*  _HID value if any */
+	char                                unique_id[9];       /*  _UID value if any */
+	acpi_integer                        address;            /*  _ADR value if any */
+	u32                                 current_status;     /*  _STA value */
+};
 
 
 /* Context structs for address space handlers */
 
-typedef struct
+struct acpi_pci_id
 {
-	u16                         segment;
-	u16                         bus;
-	u16                         device;
-	u16                         function;
-} acpi_pci_id;
-
-
-typedef struct
-{
-	u32                         length;
-	acpi_physical_address       address;
-	acpi_physical_address       mapped_physical_address;
-	u8                          *mapped_logical_address;
-	acpi_size                   mapped_length;
-} acpi_mem_space_context;
+	u16                                 segment;
+	u16                                 bus;
+	u16                                 device;
+	u16                                 function;
+};
+
+
+struct acpi_mem_space_context
+{
+	u32                                 length;
+	acpi_physical_address               address;
+	acpi_physical_address               mapped_physical_address;
+	u8                                  *mapped_logical_address;
+	acpi_size                           mapped_length;
+};
 
 
 /*
@@ -947,195 +937,176 @@
 /*
  *  Structures used to describe device resources
  */
-typedef struct
-{
-	u32                         edge_level;
-	u32                         active_high_low;
-	u32                         shared_exclusive;
-	u32                         number_of_interrupts;
-	u32                         interrupts[1];
-
-} acpi_resource_irq;
-
-typedef struct
-{
-	u32                         type;
-	u32                         bus_master;
-	u32                         transfer;
-	u32                         number_of_channels;
-	u32                         channels[1];
-
-} acpi_resource_dma;
-
-typedef struct
+struct acpi_resource_irq
 {
-	u32                         compatibility_priority;
-	u32                         performance_robustness;
-
-} acpi_resource_start_dpf;
+	u32                                 edge_level;
+	u32                                 active_high_low;
+	u32                                 shared_exclusive;
+	u32                                 number_of_interrupts;
+	u32                                 interrupts[1];
+};
+
+struct acpi_resource_dma
+{
+	u32                                 type;
+	u32                                 bus_master;
+	u32                                 transfer;
+	u32                                 number_of_channels;
+	u32                                 channels[1];
+};
+
+struct acpi_resource_start_dpf
+{
+	u32                                 compatibility_priority;
+	u32                                 performance_robustness;
+};
 
 /*
  * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
  * needed because it has no fields
  */
 
-typedef struct
-{
-	u32                         io_decode;
-	u32                         min_base_address;
-	u32                         max_base_address;
-	u32                         alignment;
-	u32                         range_length;
-
-} acpi_resource_io;
-
-typedef struct
-{
-	u32                         base_address;
-	u32                         range_length;
-
-} acpi_resource_fixed_io;
-
-typedef struct
-{
-	u32                         length;
-	u8                          reserved[1];
-
-} acpi_resource_vendor;
-
-typedef struct
-{
-	u8                          checksum;
-
-} acpi_resource_end_tag;
-
-typedef struct
-{
-	u32                         read_write_attribute;
-	u32                         min_base_address;
-	u32                         max_base_address;
-	u32                         alignment;
-	u32                         range_length;
-
-} acpi_resource_mem24;
-
-typedef struct
-{
-	u32                         read_write_attribute;
-	u32                         min_base_address;
-	u32                         max_base_address;
-	u32                         alignment;
-	u32                         range_length;
-
-} acpi_resource_mem32;
-
-typedef struct
-{
-	u32                         read_write_attribute;
-	u32                         range_base_address;
-	u32                         range_length;
-
-} acpi_resource_fixed_mem32;
-
-typedef struct
-{
-	u16                         cache_attribute;
-	u16                         read_write_attribute;
-
-} acpi_memory_attribute;
-
-typedef struct
-{
-	u16                         range_attribute;
-	u16                         reserved;
-
-} acpi_io_attribute;
-
-typedef struct
-{
-	u16                         reserved1;
-	u16                         reserved2;
-
-} acpi_bus_attribute;
-
-typedef union
-{
-	acpi_memory_attribute       memory;
-	acpi_io_attribute           io;
-	acpi_bus_attribute          bus;
-
-} acpi_resource_attribute;
-
-typedef struct
-{
-	u32                         index;
-	u32                         string_length;
-	char                        *string_ptr;
-
-} acpi_resource_source;
-
-typedef struct
+struct acpi_resource_io
 {
-	u32                         resource_type;
-	u32                         producer_consumer;
-	u32                         decode;
-	u32                         min_address_fixed;
-	u32                         max_address_fixed;
-	acpi_resource_attribute     attribute;
-	u32                         granularity;
-	u32                         min_address_range;
-	u32                         max_address_range;
-	u32                         address_translation_offset;
-	u32                         address_length;
-	acpi_resource_source        resource_source;
-
-} acpi_resource_address16;
-
-typedef struct
-{
-	u32                         resource_type;
-	u32                         producer_consumer;
-	u32                         decode;
-	u32                         min_address_fixed;
-	u32                         max_address_fixed;
-	acpi_resource_attribute     attribute;
-	u32                         granularity;
-	u32                         min_address_range;
-	u32                         max_address_range;
-	u32                         address_translation_offset;
-	u32                         address_length;
-	acpi_resource_source        resource_source;
-
-} acpi_resource_address32;
-
-typedef struct
-{
-	u32                         resource_type;
-	u32                         producer_consumer;
-	u32                         decode;
-	u32                         min_address_fixed;
-	u32                         max_address_fixed;
-	acpi_resource_attribute     attribute;
-	u64                         granularity;
-	u64                         min_address_range;
-	u64                         max_address_range;
-	u64                         address_translation_offset;
-	u64                         address_length;
-	acpi_resource_source        resource_source;
-
-} acpi_resource_address64;
-
-typedef struct
-{
-	u32                         producer_consumer;
-	u32                         edge_level;
-	u32                         active_high_low;
-	u32                         shared_exclusive;
-	u32                         number_of_interrupts;
-	acpi_resource_source        resource_source;
-	u32                         interrupts[1];
-
-} acpi_resource_ext_irq;
+	u32                                 io_decode;
+	u32                                 min_base_address;
+	u32                                 max_base_address;
+	u32                                 alignment;
+	u32                                 range_length;
+};
+
+struct acpi_resource_fixed_io
+{
+	u32                                 base_address;
+	u32                                 range_length;
+};
+
+struct acpi_resource_vendor
+{
+	u32                                 length;
+	u8                                  reserved[1];
+};
+
+struct acpi_resource_end_tag
+{
+	u8                                  checksum;
+};
+
+struct acpi_resource_mem24
+{
+	u32                                 read_write_attribute;
+	u32                                 min_base_address;
+	u32                                 max_base_address;
+	u32                                 alignment;
+	u32                                 range_length;
+};
+
+struct acpi_resource_mem32
+{
+	u32                                 read_write_attribute;
+	u32                                 min_base_address;
+	u32                                 max_base_address;
+	u32                                 alignment;
+	u32                                 range_length;
+};
+
+struct acpi_resource_fixed_mem32
+{
+	u32                                 read_write_attribute;
+	u32                                 range_base_address;
+	u32                                 range_length;
+};
+
+struct acpi_memory_attribute
+{
+	u16                                 cache_attribute;
+	u16                                 read_write_attribute;
+};
+
+struct acpi_io_attribute
+{
+	u16                                 range_attribute;
+	u16                                 reserved;
+};
+
+struct acpi_bus_attribute
+{
+	u16                                 reserved1;
+	u16                                 reserved2;
+};
+
+union acpi_resource_attribute
+{
+	struct acpi_memory_attribute        memory;
+	struct acpi_io_attribute            io;
+	struct acpi_bus_attribute           bus;
+};
+
+struct acpi_resource_source
+{
+	u32                                 index;
+	u32                                 string_length;
+	char                                *string_ptr;
+};
+
+struct acpi_resource_address16
+{
+	u32                                 resource_type;
+	u32                                 producer_consumer;
+	u32                                 decode;
+	u32                                 min_address_fixed;
+	u32                                 max_address_fixed;
+	union acpi_resource_attribute       attribute;
+	u32                                 granularity;
+	u32                                 min_address_range;
+	u32                                 max_address_range;
+	u32                                 address_translation_offset;
+	u32                                 address_length;
+	struct acpi_resource_source         resource_source;
+};
+
+struct acpi_resource_address32
+{
+	u32                                 resource_type;
+	u32                                 producer_consumer;
+	u32                                 decode;
+	u32                                 min_address_fixed;
+	u32                                 max_address_fixed;
+	union acpi_resource_attribute       attribute;
+	u32                                 granularity;
+	u32                                 min_address_range;
+	u32                                 max_address_range;
+	u32                                 address_translation_offset;
+	u32                                 address_length;
+	struct acpi_resource_source         resource_source;
+};
+
+struct acpi_resource_address64
+{
+	u32                                 resource_type;
+	u32                                 producer_consumer;
+	u32                                 decode;
+	u32                                 min_address_fixed;
+	u32                                 max_address_fixed;
+	union acpi_resource_attribute       attribute;
+	u64                                 granularity;
+	u64                                 min_address_range;
+	u64                                 max_address_range;
+	u64                                 address_translation_offset;
+	u64                                 address_length;
+	struct acpi_resource_source         resource_source;
+};
+
+struct acpi_resource_ext_irq
+{
+	u32                                 producer_consumer;
+	u32                                 edge_level;
+	u32                                 active_high_low;
+	u32                                 shared_exclusive;
+	u32                                 number_of_interrupts;
+	struct acpi_resource_source         resource_source;
+	u32                                 interrupts[1];
+};
 
 
 /* ACPI_RESOURCE_TYPEs */
@@ -1156,41 +1127,39 @@
 #define ACPI_RSTYPE_ADDRESS64           13
 #define ACPI_RSTYPE_EXT_IRQ             14
 
-typedef u32                             acpi_resource_type;
+typedef u32                                     acpi_resource_type;
 
-typedef union
+union acpi_resource_data
 {
-	acpi_resource_irq           irq;
-	acpi_resource_dma           dma;
-	acpi_resource_start_dpf     start_dpf;
-	acpi_resource_io            io;
-	acpi_resource_fixed_io      fixed_io;
-	acpi_resource_vendor        vendor_specific;
-	acpi_resource_end_tag       end_tag;
-	acpi_resource_mem24         memory24;
-	acpi_resource_mem32         memory32;
-	acpi_resource_fixed_mem32   fixed_memory32;
-	acpi_resource_address16     address16;
-	acpi_resource_address32     address32;
-	acpi_resource_address64     address64;
-	acpi_resource_ext_irq       extended_irq;
-
-} acpi_resource_data;
-
-typedef struct acpi_resource
-{
-	acpi_resource_type          id;
-	u32                         length;
-	acpi_resource_data          data;
-
-} acpi_resource;
+	struct acpi_resource_irq            irq;
+	struct acpi_resource_dma            dma;
+	struct acpi_resource_start_dpf      start_dpf;
+	struct acpi_resource_io             io;
+	struct acpi_resource_fixed_io       fixed_io;
+	struct acpi_resource_vendor         vendor_specific;
+	struct acpi_resource_end_tag        end_tag;
+	struct acpi_resource_mem24          memory24;
+	struct acpi_resource_mem32          memory32;
+	struct acpi_resource_fixed_mem32    fixed_memory32;
+	struct acpi_resource_address16      address16;
+	struct acpi_resource_address32      address32;
+	struct acpi_resource_address64      address64;
+	struct acpi_resource_ext_irq        extended_irq;
+};
+
+struct acpi_resource
+{
+	acpi_resource_type                  id;
+	u32                                 length;
+	union acpi_resource_data            data;
+};
 
 #define ACPI_RESOURCE_LENGTH                12
 #define ACPI_RESOURCE_LENGTH_NO_DATA        8       /* Id + Length fields */
 
 #define ACPI_SIZEOF_RESOURCE(type)          (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (type))
 
-#define ACPI_NEXT_RESOURCE(res)             (acpi_resource *)((u8 *) res + res->length)
+#define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
 
 #ifdef _HW_ALIGNMENT_SUPPORT
 #define ACPI_ALIGN_RESOURCE_SIZE(length)    (length)
@@ -1203,15 +1172,14 @@
  */
 
 
-typedef struct acpi_pci_routing_table
+struct acpi_pci_routing_table
 {
-	u32                         length;
-	u32                         pin;
-	acpi_integer                address;        /* here for 64-bit alignment */
-	u32                         source_index;
-	char                        source[4];      /* pad to 64 bits so sizeof() works in all cases */
-
-} acpi_pci_routing_table;
+	u32                                 length;
+	u32                                 pin;
+	acpi_integer                        address;        /* here for 64-bit alignment */
+	u32                                 source_index;
+	char                                source[4];      /* pad to 64 bits so sizeof() works in all cases */
+};
 
 /*
  * END: of definitions for PCI Routing tables
diff -Nru a/drivers/acpi/include/acutils.h b/drivers/acpi/include/acutils.h
--- a/drivers/acpi/include/acutils.h	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/include/acutils.h	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,27 +28,27 @@
 
 typedef
 acpi_status (*acpi_pkg_callback) (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context);
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context);
 
 
 acpi_status
 acpi_ut_walk_package_tree (
-	acpi_operand_object     *source_object,
-	void                    *target_object,
-	acpi_pkg_callback       walk_callback,
-	void                    *context);
+	union acpi_operand_object       *source_object,
+	void                            *target_object,
+	acpi_pkg_callback               walk_callback,
+	void                            *context);
 
 
-typedef struct acpi_pkg_info
+struct acpi_pkg_info
 {
-	u8                      *free_space;
-	acpi_size               length;
-	u32                     object_space;
-	u32                     num_packages;
-} acpi_pkg_info;
+	u8                              *free_space;
+	acpi_size                       length;
+	u32                             object_space;
+	u32                             num_packages;
+};
 
 #define REF_INCREMENT       (u16) 0
 #define REF_DECREMENT       (u16) 1
@@ -97,38 +97,38 @@
 
 char *
 acpi_ut_get_mutex_name (
-	u32                     mutex_id);
+	u32                             mutex_id);
 
 #endif
 
 char *
 acpi_ut_get_type_name (
-	acpi_object_type        type);
+	acpi_object_type                type);
 
 char *
 acpi_ut_get_object_type_name (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 char *
 acpi_ut_get_region_name (
-	u8                      space_id);
+	u8                              space_id);
 
 char *
 acpi_ut_get_event_name (
-	u32                     event_id);
+	u32                             event_id);
 
 char
 acpi_ut_hex_to_ascii_char (
-	acpi_integer            integer,
-	u32                     position);
+	acpi_integer                    integer,
+	u32                             position);
 
 u8
 acpi_ut_valid_object_type (
-	acpi_object_type        type);
+	acpi_object_type                type);
 
 acpi_owner_id
 acpi_ut_allocate_owner_id (
-	u32                     id_type);
+	u32                             id_type);
 
 
 /*
@@ -139,71 +139,71 @@
 
 acpi_size
 acpi_ut_strlen (
-	const char              *string);
+	const char                      *string);
 
 char *
 acpi_ut_strcpy (
-	char                    *dst_string,
-	const char              *src_string);
+	char                            *dst_string,
+	const char                      *src_string);
 
 char *
 acpi_ut_strncpy (
-	char                    *dst_string,
-	const char              *src_string,
-	acpi_size               count);
+	char                            *dst_string,
+	const char                      *src_string,
+	acpi_size                       count);
 
 int
 acpi_ut_strncmp (
-	const char              *string1,
-	const char              *string2,
-	acpi_size               count);
+	const char                      *string1,
+	const char                      *string2,
+	acpi_size                       count);
 
 int
 acpi_ut_strcmp (
-	const char              *string1,
-	const char              *string2);
+	const char                      *string1,
+	const char                      *string2);
 
 char *
 acpi_ut_strcat (
-	char                    *dst_string,
-	const char              *src_string);
+	char                            *dst_string,
+	const char                      *src_string);
 
 char *
 acpi_ut_strncat (
-	char                    *dst_string,
-	const char              *src_string,
-	acpi_size               count);
+	char                            *dst_string,
+	const char                      *src_string,
+	acpi_size                       count);
 
 u32
 acpi_ut_strtoul (
-	const char              *string,
-	char                    **terminator,
-	u32                     base);
+	const char                      *string,
+	char                            **terminator,
+	u32                             base);
 
 char *
 acpi_ut_strstr (
-	char                    *string1,
-	char                    *string2);
+	char                            *string1,
+	char                            *string2);
 
 void *
 acpi_ut_memcpy (
-	void                    *dest,
-	const void              *src,
-	acpi_size               count);
+	void                            *dest,
+	const void                      *src,
+	acpi_size                       count);
 
 void *
 acpi_ut_memset (
-	void                    *dest,
-	acpi_native_uint        value,
-	acpi_size               count);
+	void                            *dest,
+	acpi_native_uint                value,
+	acpi_size                       count);
 
 int
 acpi_ut_to_upper (
-	int                     c);
+	int                             c);
 
 int
 acpi_ut_to_lower (
-	int                     c);
+	int                             c);
 
 extern const u8 _acpi_ctype[];
 
@@ -235,67 +235,67 @@
 
 acpi_status
 acpi_ut_build_simple_object(
-	acpi_operand_object     *obj,
-	acpi_object             *user_obj,
-	u8                      *data_space,
-	u32                     *buffer_space_used);
+	union acpi_operand_object       *obj,
+	union acpi_object               *user_obj,
+	u8                              *data_space,
+	u32                             *buffer_space_used);
 
 acpi_status
 acpi_ut_build_package_object (
-	acpi_operand_object     *obj,
-	u8                      *buffer,
-	u32                     *space_used);
+	union acpi_operand_object       *obj,
+	u8                              *buffer,
+	u32                             *space_used);
 
 acpi_status
 acpi_ut_copy_ielement_to_eelement (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context);
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context);
 
 acpi_status
 acpi_ut_copy_ielement_to_ielement (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context);
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context);
 
 acpi_status
 acpi_ut_copy_iobject_to_eobject (
-	acpi_operand_object     *obj,
-	acpi_buffer             *ret_buffer);
+	union acpi_operand_object       *obj,
+	struct acpi_buffer              *ret_buffer);
 
 acpi_status
 acpi_ut_copy_esimple_to_isimple(
-	acpi_object             *user_obj,
-	acpi_operand_object     **return_obj);
+	union acpi_object               *user_obj,
+	union acpi_operand_object       **return_obj);
 
 acpi_status
 acpi_ut_copy_eobject_to_iobject (
-	acpi_object             *obj,
-	acpi_operand_object     **internal_obj);
+	union acpi_object               *obj,
+	union acpi_operand_object       **internal_obj);
 
 acpi_status
 acpi_ut_copy_isimple_to_isimple (
-	acpi_operand_object     *source_obj,
-	acpi_operand_object     *dest_obj);
+	union acpi_operand_object       *source_obj,
+	union acpi_operand_object       *dest_obj);
 
 acpi_status
 acpi_ut_copy_ipackage_to_ipackage (
-	acpi_operand_object     *source_obj,
-	acpi_operand_object     *dest_obj,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *source_obj,
+	union acpi_operand_object       *dest_obj,
+	struct acpi_walk_state          *walk_state);
 
 acpi_status
 acpi_ut_copy_simple_object (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *dest_desc);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *dest_desc);
 
 acpi_status
 acpi_ut_copy_iobject_to_iobject (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     **dest_desc,
-	acpi_walk_state         *walk_state);
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       **dest_desc,
+	struct acpi_walk_state          *walk_state);
 
 
 /*
@@ -304,8 +304,8 @@
 
 acpi_status
 acpi_ut_update_object_reference (
-	acpi_operand_object     *object,
-	u16                     action);
+	union acpi_operand_object       *object,
+	u16                             action);
 
 
 /*
@@ -322,89 +322,89 @@
 
 void
 acpi_ut_trace (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info);
 
 void
 acpi_ut_trace_ptr (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	void                    *pointer);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	void                            *pointer);
 
 void
 acpi_ut_trace_u32 (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	u32                     integer);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	u32                             integer);
 
 void
 acpi_ut_trace_str (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *string);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *string);
 
 void
 acpi_ut_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info);
 
 void
 acpi_ut_status_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	acpi_status             status);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	acpi_status                     status);
 
 void
 acpi_ut_value_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	acpi_integer            value);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	acpi_integer                    value);
 
 void
 acpi_ut_ptr_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	u8                      *ptr);
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	u8                              *ptr);
 
 void
 acpi_ut_report_info (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id);
 
 void
 acpi_ut_report_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id);
 
 void
 acpi_ut_report_warning (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id);
 
 void
 acpi_ut_dump_buffer (
-	u8                      *buffer,
-	u32                     count,
-	u32                     display,
-	u32                     component_id);
+	u8                              *buffer,
+	u32                             count,
+	u32                             display,
+	u32                             component_id);
 
 void ACPI_INTERNAL_VAR_XFACE
 acpi_ut_debug_print (
-	u32                     requested_debug_level,
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *format,
+	u32                             requested_debug_level,
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *format,
 	...) ACPI_PRINTF_LIKE_FUNC;
 
 void ACPI_INTERNAL_VAR_XFACE
 acpi_ut_debug_print_raw (
-	u32                     requested_debug_level,
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *format,
+	u32                             requested_debug_level,
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *format,
 	...) ACPI_PRINTF_LIKE_FUNC;
 
 
@@ -414,19 +414,19 @@
 
 void
 acpi_ut_delete_internal_obj (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 void
 acpi_ut_delete_internal_package_object (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 void
 acpi_ut_delete_internal_simple_object (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 void
 acpi_ut_delete_internal_object_list (
-	acpi_operand_object     **obj_list);
+	union acpi_operand_object       **obj_list);
 
 
 /*
@@ -448,36 +448,36 @@
 
 acpi_status
 acpi_ut_evaluate_object (
-	acpi_namespace_node     *prefix_node,
-	char                    *path,
-	u32                     expected_return_btypes,
-	acpi_operand_object     **return_desc);
+	struct acpi_namespace_node      *prefix_node,
+	char                            *path,
+	u32                             expected_return_btypes,
+	union acpi_operand_object       **return_desc);
 
 acpi_status
 acpi_ut_evaluate_numeric_object (
-	char                    *object_name,
-	acpi_namespace_node     *device_node,
-	acpi_integer            *address);
+	char                            *object_name,
+	struct acpi_namespace_node      *device_node,
+	acpi_integer                    *address);
 
 acpi_status
 acpi_ut_execute_HID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *hid);
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *hid);
 
 acpi_status
 acpi_ut_execute_CID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *cid);
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *cid);
 
 acpi_status
 acpi_ut_execute_STA (
-	acpi_namespace_node     *device_node,
-	u32                     *status_flags);
+	struct acpi_namespace_node      *device_node,
+	u32                             *status_flags);
 
 acpi_status
 acpi_ut_execute_UID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *uid);
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *uid);
 
 
 /*
@@ -494,52 +494,52 @@
 
 acpi_status
 acpi_ut_create_mutex (
-	acpi_mutex_handle       mutex_id);
+	acpi_mutex_handle               mutex_id);
 
 acpi_status
 acpi_ut_delete_mutex (
-	acpi_mutex_handle       mutex_id);
+	acpi_mutex_handle               mutex_id);
 
 acpi_status
 acpi_ut_acquire_mutex (
-	acpi_mutex_handle       mutex_id);
+	acpi_mutex_handle               mutex_id);
 
 acpi_status
 acpi_ut_release_mutex (
-	acpi_mutex_handle       mutex_id);
+	acpi_mutex_handle               mutex_id);
 
 
 /*
  * ut_object - internal object create/delete/cache routines
  */
 
-acpi_operand_object  *
+union acpi_operand_object    *
 acpi_ut_create_internal_object_dbg (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	acpi_object_type        type);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	acpi_object_type                type);
 
 void *
 acpi_ut_allocate_object_desc_dbg (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id);
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id);
 
 #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
 #define acpi_ut_allocate_object_desc()  acpi_ut_allocate_object_desc_dbg (_THIS_MODULE,__LINE__,_COMPONENT)
 
 void
 acpi_ut_delete_object_desc (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 u8
 acpi_ut_valid_internal_object (
-	void                    *object);
+	void                            *object);
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ut_create_buffer_object (
-	acpi_size               buffer_size);
+	acpi_size                       buffer_size);
 
 
 /*
@@ -548,11 +548,11 @@
 
 void
 acpi_ut_add_reference (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 void
 acpi_ut_remove_reference (
-	acpi_operand_object     *object);
+	union acpi_operand_object       *object);
 
 /*
  * ut_size - Object size routines
@@ -560,25 +560,25 @@
 
 acpi_status
 acpi_ut_get_simple_object_size (
-	acpi_operand_object     *obj,
-	acpi_size               *obj_length);
+	union acpi_operand_object       *obj,
+	acpi_size                       *obj_length);
 
 acpi_status
 acpi_ut_get_package_object_size (
-	acpi_operand_object     *obj,
-	acpi_size               *obj_length);
+	union acpi_operand_object       *obj,
+	acpi_size                       *obj_length);
 
 acpi_status
 acpi_ut_get_object_size(
-	acpi_operand_object     *obj,
-	acpi_size               *obj_length);
+	union acpi_operand_object       *obj,
+	acpi_size                       *obj_length);
 
 acpi_status
 acpi_ut_get_element_length (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context);
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context);
 
 
 /*
@@ -587,53 +587,53 @@
 
 void
 acpi_ut_push_generic_state (
-	acpi_generic_state      **list_head,
-	acpi_generic_state      *state);
+	union acpi_generic_state        **list_head,
+	union acpi_generic_state        *state);
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_pop_generic_state (
-	acpi_generic_state      **list_head);
+	union acpi_generic_state        **list_head);
 
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_generic_state (
 	void);
 
-acpi_thread_state *
+struct acpi_thread_state *
 acpi_ut_create_thread_state (
 	void);
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_update_state (
-	acpi_operand_object     *object,
-	u16                     action);
+	union acpi_operand_object       *object,
+	u16                             action);
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_pkg_state (
-	void                    *internal_object,
-	void                    *external_object,
-	u16                     index);
+	void                            *internal_object,
+	void                            *external_object,
+	u16                             index);
 
 acpi_status
 acpi_ut_create_update_state_and_push (
-	acpi_operand_object     *object,
-	u16                     action,
-	acpi_generic_state      **state_list);
+	union acpi_operand_object       *object,
+	u16                             action,
+	union acpi_generic_state        **state_list);
 
 acpi_status
 acpi_ut_create_pkg_state_and_push (
-	void                    *internal_object,
-	void                    *external_object,
-	u16                     index,
-	acpi_generic_state      **state_list);
+	void                            *internal_object,
+	void                            *external_object,
+	u16                             index,
+	union acpi_generic_state        **state_list);
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_control_state (
 	void);
 
 void
 acpi_ut_delete_generic_state (
-	acpi_generic_state      *state);
+	union acpi_generic_state        *state);
 
 void
 acpi_ut_delete_generic_state_cache (
@@ -649,64 +649,64 @@
 
 void
 acpi_ut_print_string (
-	char                    *string,
-	u8                      max_length);
+	char                            *string,
+	u8                              max_length);
 
 acpi_status
 acpi_ut_divide (
-	acpi_integer            *in_dividend,
-	acpi_integer            *in_divisor,
-	acpi_integer            *out_quotient,
-	acpi_integer            *out_remainder);
+	acpi_integer                    *in_dividend,
+	acpi_integer                    *in_divisor,
+	acpi_integer                    *out_quotient,
+	acpi_integer                    *out_remainder);
 
 acpi_status
 acpi_ut_short_divide (
-	acpi_integer            *in_dividend,
-	u32                     divisor,
-	acpi_integer            *out_quotient,
-	u32                     *out_remainder);
+	acpi_integer                    *in_dividend,
+	u32                             divisor,
+	acpi_integer                    *out_quotient,
+	u32                             *out_remainder);
 
 u8
 acpi_ut_valid_acpi_name (
-	u32                     name);
+	u32                             name);
 
 u8
 acpi_ut_valid_acpi_character (
-	char                    character);
+	char                            character);
 
 acpi_status
 acpi_ut_strtoul64 (
-	char                    *string,
-	u32                     base,
-	acpi_integer            *ret_integer);
+	char                            *string,
+	u32                             base,
+	acpi_integer                    *ret_integer);
 
 char *
 acpi_ut_strupr (
-	char                    *src_string);
+	char                            *src_string);
 
 u8 *
 acpi_ut_get_resource_end_tag (
-	acpi_operand_object     *obj_desc);
+	union acpi_operand_object       *obj_desc);
 
 u8
 acpi_ut_generate_checksum (
-	u8                      *buffer,
-	u32                     length);
+	u8                              *buffer,
+	u32                             length);
 
 u32
 acpi_ut_dword_byte_swap (
-	u32                     value);
+	u32                             value);
 
 void
 acpi_ut_set_integer_width (
-	u8                      revision);
+	u8                              revision);
 
 #ifdef ACPI_DEBUG_OUTPUT
 void
 acpi_ut_display_init_pathname (
-	u8                      type,
-	acpi_namespace_node     *obj_handle,
-	char                    *path);
+	u8                              type,
+	struct acpi_namespace_node      *obj_handle,
+	char                            *path);
 
 #endif
 
@@ -717,89 +717,89 @@
 
 void *
 acpi_ut_acquire_from_cache (
-	u32                     list_id);
+	u32                             list_id);
 
 void
 acpi_ut_release_to_cache (
-	u32                     list_id,
-	void                    *object);
+	u32                             list_id,
+	void                            *object);
 
 void
 acpi_ut_delete_generic_cache (
-	u32                     list_id);
+	u32                             list_id);
 
 acpi_status
 acpi_ut_validate_buffer (
-	acpi_buffer             *buffer);
+	struct acpi_buffer              *buffer);
 
 acpi_status
 acpi_ut_initialize_buffer (
-	acpi_buffer             *buffer,
-	acpi_size               required_length);
+	struct acpi_buffer              *buffer,
+	acpi_size                       required_length);
 
 
 /* Memory allocation functions */
 
 void *
 acpi_ut_allocate (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 void *
 acpi_ut_callocate (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 
 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 
 void *
 acpi_ut_allocate_and_track (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 void *
 acpi_ut_callocate_and_track (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 void
 acpi_ut_free_and_track (
-	void                    *address,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	void                            *address,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
 acpi_ut_find_allocation (
-	u32                     list_id,
-	void                    *allocation);
+	u32                             list_id,
+	void                            *allocation);
 
 acpi_status
 acpi_ut_track_allocation (
-	u32                     list_id,
-	acpi_debug_mem_block    *address,
-	acpi_size               size,
-	u8                      alloc_type,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	u32                             list_id,
+	struct acpi_debug_mem_block     *address,
+	acpi_size                       size,
+	u8                              alloc_type,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 acpi_status
 acpi_ut_remove_allocation (
-	u32                     list_id,
-	acpi_debug_mem_block    *address,
-	u32                     component,
-	char                    *module,
-	u32                     line);
+	u32                             list_id,
+	struct acpi_debug_mem_block     *address,
+	u32                             component,
+	char                            *module,
+	u32                             line);
 
 void
 acpi_ut_dump_allocation_info (
@@ -807,8 +807,8 @@
 
 void
 acpi_ut_dump_allocations (
-	u32                     component,
-	char                    *module);
+	u32                             component,
+	char                            *module);
 #endif
 
 
diff -Nru a/drivers/acpi/include/amlcode.h b/drivers/acpi/include/amlcode.h
--- a/drivers/acpi/include/amlcode.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/amlcode.h	Fri Jan 10 12:12:38 2003
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/amlresrc.h b/drivers/acpi/include/amlresrc.h
--- a/drivers/acpi/include/amlresrc.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/amlresrc.h	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -69,13 +69,12 @@
 #define ASL_RDESC_END_TAG_SIZE                  0x01
 
 
-typedef struct asl_resource_node
+struct asl_resource_node
 {
-	u32                         buffer_length;
-	void                        *buffer;
-	struct asl_resource_node    *next;
-
-} asl_resource_node;
+	u32                                 buffer_length;
+	void                                *buffer;
+	struct asl_resource_node            *next;
+};
 
 
 /*
@@ -86,213 +85,194 @@
  */
 #pragma pack(1)
 
-typedef struct asl_irq_format_desc
+struct asl_irq_format_desc
 {
-	u8                          descriptor_type;
-	u16                         irq_mask;
-	u8                          flags;
-
-} asl_irq_format_desc;
+	u8                                  descriptor_type;
+	u16                                 irq_mask;
+	u8                                  flags;
+};
 
 
-typedef struct asl_irq_noflags_desc
+struct asl_irq_noflags_desc
 {
-	u8                          descriptor_type;
-	u16                         irq_mask;
-
-} asl_irq_noflags_desc;
+	u8                                  descriptor_type;
+	u16                                 irq_mask;
+};
 
 
-typedef struct asl_dma_format_desc
+struct asl_dma_format_desc
 {
-	u8                          descriptor_type;
-	u8                          dma_channel_mask;
-	u8                          flags;
+	u8                                  descriptor_type;
+	u8                                  dma_channel_mask;
+	u8                                  flags;
+};
 
-} asl_dma_format_desc;
 
-
-typedef struct asl_start_dependent_desc
+struct asl_start_dependent_desc
 {
-	u8                          descriptor_type;
-	u8                          flags;
-
-} asl_start_dependent_desc;
+	u8                                  descriptor_type;
+	u8                                  flags;
+};
 
 
-typedef struct asl_start_dependent_noprio_desc
+struct asl_start_dependent_noprio_desc
 {
-	u8                          descriptor_type;
-
-} asl_start_dependent_noprio_desc;
+	u8                                  descriptor_type;
+};
 
 
-typedef struct asl_end_dependent_desc
+struct asl_end_dependent_desc
 {
-	u8                          descriptor_type;
+	u8                                  descriptor_type;
+};
 
-} asl_end_dependent_desc;
 
-
-typedef struct asl_io_port_desc
+struct asl_io_port_desc
 {
-	u8                          descriptor_type;
-	u8                          information;
-	u16                         address_min;
-	u16                         address_max;
-	u8                          alignment;
-	u8                          length;
-
-} asl_io_port_desc;
+	u8                                  descriptor_type;
+	u8                                  information;
+	u16                                 address_min;
+	u16                                 address_max;
+	u8                                  alignment;
+	u8                                  length;
+};
 
 
-typedef struct asl_fixed_io_port_desc
+struct asl_fixed_io_port_desc
 {
-	u8                          descriptor_type;
-	u16                         base_address;
-	u8                          length;
-
-} asl_fixed_io_port_desc;
+	u8                                  descriptor_type;
+	u16                                 base_address;
+	u8                                  length;
+};
 
 
-typedef struct asl_small_vendor_desc
+struct asl_small_vendor_desc
 {
-	u8                          descriptor_type;
-	u8                          vendor_defined[7];
+	u8                                  descriptor_type;
+	u8                                  vendor_defined[7];
+};
 
-} asl_small_vendor_desc;
 
-
-typedef struct asl_end_tag_desc
+struct asl_end_tag_desc
 {
-	u8                          descriptor_type;
-	u8                          checksum;
-
-} asl_end_tag_desc;
+	u8                                  descriptor_type;
+	u8                                  checksum;
+};
 
 
 /* LARGE descriptors */
 
-typedef struct asl_memory_24_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          information;
-	u16                         address_min;
-	u16                         address_max;
-	u16                         alignment;
-	u16                         range_length;
-
-} asl_memory_24_desc;
-
-
-typedef struct asl_large_vendor_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          vendor_defined[1];
-
-} asl_large_vendor_desc;
-
-
-typedef struct asl_memory_32_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          information;
-	u32                         address_min;
-	u32                         address_max;
-	u32                         alignment;
-	u32                         range_length;
-
-} asl_memory_32_desc;
-
-
-typedef struct asl_fixed_memory_32_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          information;
-	u32                         base_address;
-	u32                         range_length;
-
-} asl_fixed_memory_32_desc;
-
-
-typedef struct asl_qword_address_desc
+struct asl_memory_24_desc
 {
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          resource_type;
-	u8                          flags;
-	u8                          specific_flags;
-	u64                         granularity;
-	u64                         address_min;
-	u64                         address_max;
-	u64                         translation_offset;
-	u64                         address_length;
-	u8                          optional_fields[2];
-
-} asl_qword_address_desc;
-
-
-typedef struct asl_dword_address_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          resource_type;
-	u8                          flags;
-	u8                          specific_flags;
-	u32                         granularity;
-	u32                         address_min;
-	u32                         address_max;
-	u32                         translation_offset;
-	u32                         address_length;
-	u8                          optional_fields[2];
-
-} asl_dword_address_desc;
-
-
-typedef struct asl_word_address_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          resource_type;
-	u8                          flags;
-	u8                          specific_flags;
-	u16                         granularity;
-	u16                         address_min;
-	u16                         address_max;
-	u16                         translation_offset;
-	u16                         address_length;
-	u8                          optional_fields[2];
-
-} asl_word_address_desc;
-
-
-typedef struct asl_extended_xrupt_desc
-{
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          flags;
-	u8                          table_length;
-	u32                         interrupt_number[1];
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  information;
+	u16                                 address_min;
+	u16                                 address_max;
+	u16                                 alignment;
+	u16                                 range_length;
+};
+
+
+struct asl_large_vendor_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  vendor_defined[1];
+};
+
+
+struct asl_memory_32_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  information;
+	u32                                 address_min;
+	u32                                 address_max;
+	u32                                 alignment;
+	u32                                 range_length;
+};
+
+
+struct asl_fixed_memory_32_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  information;
+	u32                                 base_address;
+	u32                                 range_length;
+};
+
+
+struct asl_qword_address_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  resource_type;
+	u8                                  flags;
+	u8                                  specific_flags;
+	u64                                 granularity;
+	u64                                 address_min;
+	u64                                 address_max;
+	u64                                 translation_offset;
+	u64                                 address_length;
+	u8                                  optional_fields[2];
+};
+
+
+struct asl_dword_address_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  resource_type;
+	u8                                  flags;
+	u8                                  specific_flags;
+	u32                                 granularity;
+	u32                                 address_min;
+	u32                                 address_max;
+	u32                                 translation_offset;
+	u32                                 address_length;
+	u8                                  optional_fields[2];
+};
+
+
+struct asl_word_address_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  resource_type;
+	u8                                  flags;
+	u8                                  specific_flags;
+	u16                                 granularity;
+	u16                                 address_min;
+	u16                                 address_max;
+	u16                                 translation_offset;
+	u16                                 address_length;
+	u8                                  optional_fields[2];
+};
+
+
+struct asl_extended_xrupt_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  flags;
+	u8                                  table_length;
+	u32                                 interrupt_number[1];
 	/* res_source_index, res_source optional fields follow */
-
-} asl_extended_xrupt_desc;
+};
 
 
-typedef struct asl_general_register_desc
+struct asl_general_register_desc
 {
-	u8                          descriptor_type;
-	u16                         length;
-	u8                          address_space_id;
-	u8                          bit_width;
-	u8                          bit_offset;
-	u8                          reserved;
-	u64                         address;
-
-} asl_general_register_desc;
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  address_space_id;
+	u8                                  bit_width;
+	u8                                  bit_offset;
+	u8                                  reserved;
+	u64                                 address;
+};
 
 /* restore default alignment */
 
@@ -300,31 +280,30 @@
 
 /* Union of all resource descriptors, sow we can allocate the worst case */
 
-typedef union asl_resource_desc
+union asl_resource_desc
 {
-	asl_irq_format_desc         irq;
-	asl_dma_format_desc         dma;
-	asl_start_dependent_desc    std;
-	asl_end_dependent_desc      end;
-	asl_io_port_desc            iop;
-	asl_fixed_io_port_desc      fio;
-	asl_small_vendor_desc       smv;
-	asl_end_tag_desc            et;
-
-	asl_memory_24_desc          M24;
-	asl_large_vendor_desc       lgv;
-	asl_memory_32_desc          M32;
-	asl_fixed_memory_32_desc    F32;
-	asl_qword_address_desc      qas;
-	asl_dword_address_desc      das;
-	asl_word_address_desc       was;
-	asl_extended_xrupt_desc     exx;
-	asl_general_register_desc   grg;
-	u32                         u32_item;
-	u16                         u16_item;
-	u8                          U8item;
-
-} asl_resource_desc;
+	struct asl_irq_format_desc          irq;
+	struct asl_dma_format_desc          dma;
+	struct asl_start_dependent_desc     std;
+	struct asl_end_dependent_desc       end;
+	struct asl_io_port_desc             iop;
+	struct asl_fixed_io_port_desc       fio;
+	struct asl_small_vendor_desc        smv;
+	struct asl_end_tag_desc             et;
+
+	struct asl_memory_24_desc           M24;
+	struct asl_large_vendor_desc        lgv;
+	struct asl_memory_32_desc           M32;
+	struct asl_fixed_memory_32_desc     F32;
+	struct asl_qword_address_desc       qas;
+	struct asl_dword_address_desc       das;
+	struct asl_word_address_desc        was;
+	struct asl_extended_xrupt_desc      exx;
+	struct asl_general_register_desc    grg;
+	u32                                 u32_item;
+	u16                                 u16_item;
+	u8                                  U8item;
+};
 
 
 #endif
diff -Nru a/drivers/acpi/include/platform/acenv.h b/drivers/acpi/include/platform/acenv.h
--- a/drivers/acpi/include/platform/acenv.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/platform/acenv.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/platform/acgcc.h b/drivers/acpi/include/platform/acgcc.h
--- a/drivers/acpi/include/platform/acgcc.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/platform/acgcc.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/include/platform/aclinux.h b/drivers/acpi/include/platform/aclinux.h
--- a/drivers/acpi/include/platform/aclinux.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/include/platform/aclinux.h	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -Nru a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
--- a/drivers/acpi/namespace/nsaccess.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsaccess.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,10 +50,10 @@
 acpi_status
 acpi_ns_root_initialize (void)
 {
-	acpi_status                 status;
-	const acpi_predefined_names *init_val = NULL;
-	acpi_namespace_node         *new_node;
-	acpi_operand_object         *obj_desc;
+	acpi_status                         status;
+	const struct acpi_predefined_names *init_val = NULL;
+	struct acpi_namespace_node          *new_node;
+	union acpi_operand_object           *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ns_root_initialize");
@@ -232,26 +232,26 @@
 
 acpi_status
 acpi_ns_lookup (
-	acpi_generic_state      *scope_info,
-	char                    *pathname,
-	acpi_object_type        type,
-	acpi_interpreter_mode   interpreter_mode,
-	u32                     flags,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     **return_node)
+	union acpi_generic_state        *scope_info,
+	char                            *pathname,
+	acpi_object_type                type,
+	acpi_interpreter_mode           interpreter_mode,
+	u32                             flags,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      **return_node)
 {
-	acpi_status             status;
-	char                    *path = pathname;
-	acpi_namespace_node     *prefix_node;
-	acpi_namespace_node     *current_node = NULL;
-	acpi_namespace_node     *this_node = NULL;
-	u32                     num_segments;
-	u32                     num_carats;
-	acpi_name               simple_name;
-	acpi_object_type        type_to_check_for;
-	acpi_object_type        this_search_type;
-	u32                     search_parent_flag = ACPI_NS_SEARCH_PARENT;
-	u32                     local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
+	acpi_status                     status;
+	char                            *path = pathname;
+	struct acpi_namespace_node      *prefix_node;
+	struct acpi_namespace_node      *current_node = NULL;
+	struct acpi_namespace_node      *this_node = NULL;
+	u32                             num_segments;
+	u32                             num_carats;
+	acpi_name                       simple_name;
+	acpi_object_type                type_to_check_for;
+	acpi_object_type                this_search_type;
+	u32                             search_parent_flag = ACPI_NS_SEARCH_PARENT;
+	u32                             local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
 			   ACPI_NS_SEARCH_PARENT);
 
 
diff -Nru a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c
--- a/drivers/acpi/namespace/nsalloc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsalloc.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -43,17 +43,17 @@
  *
  ******************************************************************************/
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_create_node (
-	u32                     name)
+	u32                             name)
 {
-	acpi_namespace_node     *node;
+	struct acpi_namespace_node      *node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_create_node");
 
 
-	node = ACPI_MEM_CALLOCATE (sizeof (acpi_namespace_node));
+	node = ACPI_MEM_CALLOCATE (sizeof (struct acpi_namespace_node));
 	if (!node) {
 		return_PTR (NULL);
 	}
@@ -82,11 +82,11 @@
 
 void
 acpi_ns_delete_node (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
-	acpi_namespace_node     *parent_node;
-	acpi_namespace_node     *prev_node;
-	acpi_namespace_node     *next_node;
+	struct acpi_namespace_node      *parent_node;
+	struct acpi_namespace_node      *prev_node;
+	struct acpi_namespace_node      *next_node;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ns_delete_node", node);
@@ -141,13 +141,13 @@
 
 int
 acpi_ns_compare_names (
-	char                    *name1,
-	char                    *name2)
+	char                            *name1,
+	char                            *name2)
 {
-	char                    reversed_name1[ACPI_NAME_SIZE];
-	char                    reversed_name2[ACPI_NAME_SIZE];
-	u32                     i;
-	u32                     j;
+	char                            reversed_name1[ACPI_NAME_SIZE];
+	char                            reversed_name2[ACPI_NAME_SIZE];
+	u32                             i;
+	u32                             j;
 
 
 	/*
@@ -198,16 +198,16 @@
 
 void
 acpi_ns_install_node (
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *parent_node,   /* Parent */
-	acpi_namespace_node     *node,          /* New Child*/
-	acpi_object_type        type)
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *parent_node,   /* Parent */
+	struct acpi_namespace_node      *node,          /* New Child*/
+	acpi_object_type                type)
 {
-	u16                     owner_id = TABLE_ID_DSDT;
-	acpi_namespace_node     *child_node;
+	u16                             owner_id = TABLE_ID_DSDT;
+	struct acpi_namespace_node      *child_node;
 #ifdef ACPI_ALPHABETIC_NAMESPACE
 
-	acpi_namespace_node     *previous_child_node;
+	struct acpi_namespace_node      *previous_child_node;
 #endif
 
 
@@ -332,11 +332,11 @@
 
 void
 acpi_ns_delete_children (
-	acpi_namespace_node     *parent_node)
+	struct acpi_namespace_node      *parent_node)
 {
-	acpi_namespace_node     *child_node;
-	acpi_namespace_node     *next_node;
-	u8                      flags;
+	struct acpi_namespace_node      *child_node;
+	struct acpi_namespace_node      *next_node;
+	u8                              flags;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ns_delete_children", parent_node);
@@ -412,10 +412,10 @@
 
 void
 acpi_ns_delete_namespace_subtree (
-	acpi_namespace_node     *parent_node)
+	struct acpi_namespace_node      *parent_node)
 {
-	acpi_namespace_node     *child_node = NULL;
-	u32                     level = 1;
+	struct acpi_namespace_node      *child_node = NULL;
+	u32                             level = 1;
 
 
 	ACPI_FUNCTION_TRACE ("ns_delete_namespace_subtree");
@@ -495,10 +495,10 @@
 
 static void
 acpi_ns_remove_reference (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
-	acpi_namespace_node     *parent_node;
-	acpi_namespace_node     *this_node;
+	struct acpi_namespace_node      *parent_node;
+	struct acpi_namespace_node      *this_node;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -548,12 +548,12 @@
 
 void
 acpi_ns_delete_namespace_by_owner (
-	u16                     owner_id)
+	u16                             owner_id)
 {
-	acpi_namespace_node     *child_node;
-	acpi_namespace_node     *deletion_node;
-	u32                     level;
-	acpi_namespace_node     *parent_node;
+	struct acpi_namespace_node      *child_node;
+	struct acpi_namespace_node      *deletion_node;
+	u32                             level;
+	struct acpi_namespace_node      *parent_node;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ns_delete_namespace_by_owner", owner_id);
diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
--- a/drivers/acpi/namespace/nsdump.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsdump.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,8 +47,8 @@
 
 void
 acpi_ns_print_pathname (
-	u32                     num_segments,
-	char                    *pathname)
+	u32                             num_segments,
+	char                            *pathname)
 {
 	ACPI_FUNCTION_NAME ("ns_print_pathname");
 
@@ -91,10 +91,10 @@
 
 void
 acpi_ns_dump_pathname (
-	acpi_handle             handle,
-	char                    *msg,
-	u32                     level,
-	u32                     component)
+	acpi_handle                     handle,
+	char                            *msg,
+	u32                             level,
+	u32                             component)
 {
 
 	ACPI_FUNCTION_TRACE ("ns_dump_pathname");
@@ -129,19 +129,19 @@
 
 acpi_status
 acpi_ns_dump_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_walk_info          *info = (acpi_walk_info *) context;
-	acpi_namespace_node     *this_node;
-	acpi_operand_object     *obj_desc = NULL;
-	acpi_object_type        obj_type;
-	acpi_object_type        type;
-	u32                     bytes_to_dump;
-	u32                     dbg_level;
-	u32                     i;
+	struct acpi_walk_info           *info = (struct acpi_walk_info *) context;
+	struct acpi_namespace_node      *this_node;
+	union acpi_operand_object       *obj_desc = NULL;
+	acpi_object_type                obj_type;
+	acpi_object_type                type;
+	u32                             bytes_to_dump;
+	u32                             dbg_level;
+	u32                             i;
 
 
 	ACPI_FUNCTION_NAME ("ns_dump_one_object");
@@ -335,7 +335,7 @@
 
 		case ACPI_TYPE_LOCAL_ALIAS:
 
-			acpi_os_printf ("Target %4.4s (%p)\n", ((acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
+			acpi_os_printf ("Target %4.4s (%p)\n", ((struct acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
 			break;
 
 		default:
@@ -444,7 +444,7 @@
 		case ACPI_DESC_TYPE_NAMED:
 
 			acpi_os_printf ("(Ptr to Node)\n");
-			bytes_to_dump = sizeof (acpi_namespace_node);
+			bytes_to_dump = sizeof (struct acpi_namespace_node);
 			break;
 
 
@@ -459,7 +459,7 @@
 			else {
 				acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n",
 						   acpi_ut_get_type_name (obj_type), obj_type);
-				bytes_to_dump = sizeof (acpi_operand_object);
+				bytes_to_dump = sizeof (union acpi_operand_object);
 			}
 			break;
 
@@ -492,7 +492,7 @@
 			break;
 
 		case ACPI_TYPE_BUFFER_FIELD:
-			obj_desc = (acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
+			obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
 			break;
 
 		case ACPI_TYPE_PACKAGE:
@@ -546,13 +546,13 @@
 
 void
 acpi_ns_dump_objects (
-	acpi_object_type        type,
-	u8                      display_type,
-	u32                     max_depth,
-	u32                     owner_id,
-	acpi_handle             start_handle)
+	acpi_object_type                type,
+	u8                              display_type,
+	u32                             max_depth,
+	u32                             owner_id,
+	acpi_handle                     start_handle)
 {
-	acpi_walk_info          info;
+	struct acpi_walk_info           info;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -584,10 +584,10 @@
 
 void
 acpi_ns_dump_tables (
-	acpi_handle             search_base,
-	u32                     max_depth)
+	acpi_handle                     search_base,
+	u32                             max_depth)
 {
-	acpi_handle             search_handle = search_base;
+	acpi_handle                     search_handle = search_base;
 
 
 	ACPI_FUNCTION_TRACE ("ns_dump_tables");
@@ -629,10 +629,10 @@
 
 void
 acpi_ns_dump_entry (
-	acpi_handle             handle,
-	u32                     debug_level)
+	acpi_handle                     handle,
+	u32                             debug_level)
 {
-	acpi_walk_info          info;
+	struct acpi_walk_info           info;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c
--- a/drivers/acpi/namespace/nsdumpdv.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/namespace/nsdumpdv.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,14 +48,14 @@
 
 acpi_status
 acpi_ns_dump_one_device (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_device_info        info;
-	acpi_status             status;
-	u32                     i;
+	struct acpi_device_info         info;
+	acpi_status                     status;
+	u32                             i;
 
 
 	ACPI_FUNCTION_NAME ("ns_dump_one_device");
@@ -92,8 +92,8 @@
 void
 acpi_ns_dump_root_devices (void)
 {
-	acpi_handle             sys_bus_handle;
-	acpi_status             status;
+	acpi_handle                     sys_bus_handle;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_NAME ("ns_dump_root_devices");
diff -Nru a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
--- a/drivers/acpi/namespace/nseval.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nseval.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -58,16 +58,16 @@
 
 acpi_status
 acpi_ns_evaluate_relative (
-	acpi_namespace_node     *handle,
-	char                    *pathname,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object)
+	struct acpi_namespace_node      *handle,
+	char                            *pathname,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object)
 {
-	acpi_namespace_node     *prefix_node;
-	acpi_status             status;
-	acpi_namespace_node     *node = NULL;
-	char                    *internal_path = NULL;
-	acpi_generic_state      scope_info;
+	struct acpi_namespace_node      *prefix_node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node = NULL;
+	char                            *internal_path = NULL;
+	union acpi_generic_state        scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("ns_evaluate_relative");
@@ -157,13 +157,13 @@
 
 acpi_status
 acpi_ns_evaluate_by_name (
-	char                    *pathname,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object)
+	char                            *pathname,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node = NULL;
-	char                    *internal_path = NULL;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node = NULL;
+	char                            *internal_path = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("ns_evaluate_by_name");
@@ -241,13 +241,13 @@
 
 acpi_status
 acpi_ns_evaluate_by_handle (
-	acpi_namespace_node     *handle,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_object)
+	struct acpi_namespace_node      *handle,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_object)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_operand_object     *local_return_object;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	union acpi_operand_object       *local_return_object;
 
 
 	ACPI_FUNCTION_TRACE ("ns_evaluate_by_handle");
@@ -361,12 +361,12 @@
 
 acpi_status
 acpi_ns_execute_control_method (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc)
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ns_execute_control_method");
@@ -433,11 +433,11 @@
 
 acpi_status
 acpi_ns_get_object_value (
-	acpi_namespace_node     *node,
-	acpi_operand_object     **return_obj_desc)
+	struct acpi_namespace_node      *node,
+	union acpi_operand_object       **return_obj_desc)
 {
-	acpi_status             status = AE_OK;
-	acpi_namespace_node     *resolved_node = node;
+	acpi_status                     status = AE_OK;
+	struct acpi_namespace_node      *resolved_node = node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_get_object_value");
@@ -483,7 +483,7 @@
 
 		if (ACPI_SUCCESS (status)) {
 			status = AE_CTRL_RETURN_VALUE;
-			*return_obj_desc = ACPI_CAST_PTR (acpi_operand_object, resolved_node);
+			*return_obj_desc = ACPI_CAST_PTR (union acpi_operand_object, resolved_node);
 			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returning object %p [%s]\n",
 				*return_obj_desc, acpi_ut_get_object_type_name (*return_obj_desc)));
 		}
diff -Nru a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c
--- a/drivers/acpi/namespace/nsinit.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsinit.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,8 +49,8 @@
 acpi_ns_initialize_objects (
 	void)
 {
-	acpi_status             status;
-	acpi_init_walk_info     info;
+	acpi_status                     status;
+	struct acpi_init_walk_info      info;
 
 
 	ACPI_FUNCTION_TRACE ("ns_initialize_objects");
@@ -62,7 +62,7 @@
 
 	/* Set all init info to zero */
 
-	ACPI_MEMSET (&info, 0, sizeof (acpi_init_walk_info));
+	ACPI_MEMSET (&info, 0, sizeof (struct acpi_init_walk_info));
 
 	/* Walk entire namespace from the supplied root */
 
@@ -110,8 +110,8 @@
 acpi_ns_initialize_devices (
 	void)
 {
-	acpi_status             status;
-	acpi_device_walk_info   info;
+	acpi_status                     status;
+	struct acpi_device_walk_info    info;
 
 
 	ACPI_FUNCTION_TRACE ("ns_initialize_devices");
@@ -165,16 +165,16 @@
 
 acpi_status
 acpi_ns_init_one_object (
-	acpi_handle             obj_handle,
-	u32                     level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_object_type        type;
-	acpi_status             status;
-	acpi_init_walk_info     *info = (acpi_init_walk_info *) context;
-	acpi_namespace_node     *node = (acpi_namespace_node *) obj_handle;
-	acpi_operand_object     *obj_desc;
+	acpi_object_type                type;
+	acpi_status                     status;
+	struct acpi_init_walk_info      *info = (struct acpi_init_walk_info *) context;
+	struct acpi_namespace_node      *node = (struct acpi_namespace_node *) obj_handle;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_NAME ("ns_init_one_object");
@@ -305,15 +305,15 @@
 
 acpi_status
 acpi_ns_init_one_device (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_status             status;
-	acpi_namespace_node    *node;
-	u32                     flags;
-	acpi_device_walk_info  *info = (acpi_device_walk_info *) context;
+	acpi_status                     status;
+	struct acpi_namespace_node     *node;
+	u32                             flags;
+	struct acpi_device_walk_info   *info = (struct acpi_device_walk_info *) context;
 
 
 	ACPI_FUNCTION_TRACE ("ns_init_one_device");
@@ -372,7 +372,7 @@
 			/* Ignore error and move on to next device */
 
 	#ifdef ACPI_DEBUG_OUTPUT
-			char        *scope_name = acpi_ns_get_external_pathname (obj_handle);
+			char                *scope_name = acpi_ns_get_external_pathname (obj_handle);
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
 					scope_name, acpi_format_exception (status)));
diff -Nru a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c
--- a/drivers/acpi/namespace/nsload.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsload.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,10 +49,10 @@
 
 acpi_status
 acpi_ns_load_table (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *node)
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *node)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ns_load_table");
@@ -137,11 +137,11 @@
 
 acpi_status
 acpi_ns_load_table_by_type (
-	acpi_table_type         table_type)
+	acpi_table_type                 table_type)
 {
-	u32                     i;
-	acpi_status             status;
-	acpi_table_desc         *table_desc;
+	u32                             i;
+	acpi_status                     status;
+	struct acpi_table_desc          *table_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ns_load_table_by_type");
@@ -266,7 +266,7 @@
 acpi_ns_load_namespace (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_load_name_space");
@@ -319,14 +319,14 @@
 
 acpi_status
 acpi_ns_delete_subtree (
-	acpi_handle             start_handle)
+	acpi_handle                     start_handle)
 {
-	acpi_status             status;
-	acpi_handle             child_handle;
-	acpi_handle             parent_handle;
-	acpi_handle             next_child_handle;
-	acpi_handle             dummy;
-	u32                     level;
+	acpi_status                     status;
+	acpi_handle                     child_handle;
+	acpi_handle                     parent_handle;
+	acpi_handle                     next_child_handle;
+	acpi_handle                     dummy;
+	u32                             level;
 
 
 	ACPI_FUNCTION_TRACE ("ns_delete_subtree");
@@ -407,9 +407,9 @@
 
 acpi_status
 acpi_ns_unload_namespace (
-	acpi_handle             handle)
+	acpi_handle                     handle)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ns_unload_name_space");
diff -Nru a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c
--- a/drivers/acpi/namespace/nsnames.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsnames.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,12 +49,12 @@
 
 void
 acpi_ns_build_external_path (
-	acpi_namespace_node     *node,
-	acpi_size               size,
-	char                    *name_buffer)
+	struct acpi_namespace_node      *node,
+	acpi_size                       size,
+	char                            *name_buffer)
 {
-	acpi_size               index;
-	acpi_namespace_node     *parent_node;
+	acpi_size                       index;
+	struct acpi_namespace_node      *parent_node;
 
 
 	ACPI_FUNCTION_NAME ("ns_build_external_path");
@@ -119,10 +119,10 @@
 
 char *
 acpi_ns_get_external_pathname (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
-	char                    *name_buffer;
-	acpi_size               size;
+	char                            *name_buffer;
+	acpi_size                       size;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ns_get_external_pathname", node);
@@ -162,10 +162,10 @@
 
 acpi_size
 acpi_ns_get_pathname_length (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
-	acpi_size               size;
-	acpi_namespace_node     *next_node;
+	acpi_size                       size;
+	struct acpi_namespace_node      *next_node;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -203,12 +203,12 @@
 
 acpi_status
 acpi_ns_handle_to_pathname (
-	acpi_handle             target_handle,
-	acpi_buffer             *buffer)
+	acpi_handle                     target_handle,
+	struct acpi_buffer              *buffer)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_size               required_size;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	acpi_size                       required_size;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ns_handle_to_pathname", target_handle);
diff -Nru a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c
--- a/drivers/acpi/namespace/nsobject.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsobject.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,13 +53,13 @@
 
 acpi_status
 acpi_ns_attach_object (
-	acpi_namespace_node     *node,
-	acpi_operand_object     *object,
-	acpi_object_type        type)
+	struct acpi_namespace_node      *node,
+	union acpi_operand_object       *object,
+	acpi_object_type                type)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *last_obj_desc;
-	acpi_object_type        object_type = ACPI_TYPE_ANY;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *last_obj_desc;
+	acpi_object_type                object_type = ACPI_TYPE_ANY;
 
 
 	ACPI_FUNCTION_TRACE ("ns_attach_object");
@@ -110,13 +110,13 @@
 	 * we will use that (attached) object
 	 */
 	else if ((ACPI_GET_DESCRIPTOR_TYPE (object) == ACPI_DESC_TYPE_NAMED) &&
-			((acpi_namespace_node *) object)->object) {
+			((struct acpi_namespace_node *) object)->object) {
 		/*
 		 * Value passed is a name handle and that name has a
 		 * non-null value.  Use that name's value and type.
 		 */
-		obj_desc   = ((acpi_namespace_node *) object)->object;
-		object_type = ((acpi_namespace_node *) object)->type;
+		obj_desc   = ((struct acpi_namespace_node *) object)->object;
+		object_type = ((struct acpi_namespace_node *) object)->type;
 	}
 
 	/*
@@ -124,7 +124,7 @@
 	 * it first
 	 */
 	else {
-		obj_desc = (acpi_operand_object *) object;
+		obj_desc = (union acpi_operand_object   *) object;
 
 		/* Use the given type */
 
@@ -184,9 +184,9 @@
 
 void
 acpi_ns_detach_object (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
-	acpi_operand_object     *obj_desc;
+	union acpi_operand_object       *obj_desc;
 
 
 	ACPI_FUNCTION_TRACE ("ns_detach_object");
@@ -237,9 +237,9 @@
  *
  ******************************************************************************/
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ns_get_attached_object (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
 	ACPI_FUNCTION_TRACE_PTR ("ns_get_attached_object", node);
 
@@ -273,9 +273,9 @@
  *
  ******************************************************************************/
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ns_get_secondary_object (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
 	ACPI_FUNCTION_TRACE_PTR ("ns_get_secondary_object", obj_desc);
 
@@ -307,13 +307,13 @@
 
 acpi_status
 acpi_ns_attach_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler,
-	void                    *data)
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler,
+	void                            *data)
 {
-	acpi_operand_object     *prev_obj_desc;
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *data_desc;
+	union acpi_operand_object       *prev_obj_desc;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *data_desc;
 
 
 	/* We only allow one attachment per handler */
@@ -369,11 +369,11 @@
 
 acpi_status
 acpi_ns_detach_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler)
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_operand_object     *prev_obj_desc;
+	union acpi_operand_object       *obj_desc;
+	union acpi_operand_object       *prev_obj_desc;
 
 
 	prev_obj_desc = NULL;
@@ -417,11 +417,11 @@
 
 acpi_status
 acpi_ns_get_attached_data (
-	acpi_namespace_node     *node,
-	acpi_object_handler     handler,
-	void                    **data)
+	struct acpi_namespace_node      *node,
+	acpi_object_handler             handler,
+	void                            **data)
 {
-	acpi_operand_object     *obj_desc;
+	union acpi_operand_object       *obj_desc;
 
 
 	obj_desc = node->object;
diff -Nru a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
--- a/drivers/acpi/namespace/nsparse.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/namespace/nsparse.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,12 +48,12 @@
 
 acpi_status
 acpi_ns_one_complete_parse (
-	u32                     pass_number,
-	acpi_table_desc         *table_desc)
+	u32                             pass_number,
+	struct acpi_table_desc          *table_desc)
 {
-	acpi_parse_object       *parse_root;
-	acpi_status             status;
-	acpi_walk_state         *walk_state;
+	union acpi_parse_object         *parse_root;
+	acpi_status                     status;
+	struct acpi_walk_state          *walk_state;
 
 
 	ACPI_FUNCTION_TRACE ("ns_one_complete_parse");
@@ -108,10 +108,10 @@
 
 acpi_status
 acpi_ns_parse_table (
-	acpi_table_desc         *table_desc,
-	acpi_namespace_node     *start_node)
+	struct acpi_table_desc          *table_desc,
+	struct acpi_namespace_node      *start_node)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ns_parse_table");
diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c
--- a/drivers/acpi/namespace/nssearch.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nssearch.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -60,12 +60,12 @@
 
 acpi_status
 acpi_ns_search_node (
-	u32                     target_name,
-	acpi_namespace_node     *node,
-	acpi_object_type        type,
-	acpi_namespace_node     **return_node)
+	u32                             target_name,
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type,
+	struct acpi_namespace_node      **return_node)
 {
-	acpi_namespace_node     *next_node;
+	struct acpi_namespace_node      *next_node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_search_node");
@@ -73,7 +73,7 @@
 
 #ifdef ACPI_DEBUG_OUTPUT
 	if (ACPI_LV_NAMES & acpi_dbg_level) {
-		char                *scope_name;
+		char                        *scope_name;
 
 		scope_name = acpi_ns_get_external_pathname (node);
 		if (scope_name) {
@@ -156,13 +156,13 @@
 
 static acpi_status
 acpi_ns_search_parent_tree (
-	u32                     target_name,
-	acpi_namespace_node     *node,
-	acpi_object_type        type,
-	acpi_namespace_node     **return_node)
+	u32                             target_name,
+	struct acpi_namespace_node      *node,
+	acpi_object_type                type,
+	struct acpi_namespace_node      **return_node)
 {
-	acpi_status             status;
-	acpi_namespace_node     *parent_node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *parent_node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_search_parent_tree");
@@ -247,16 +247,16 @@
 
 acpi_status
 acpi_ns_search_and_enter (
-	u32                     target_name,
-	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *node,
-	acpi_interpreter_mode   interpreter_mode,
-	acpi_object_type        type,
-	u32                     flags,
-	acpi_namespace_node     **return_node)
+	u32                             target_name,
+	struct acpi_walk_state          *walk_state,
+	struct acpi_namespace_node      *node,
+	acpi_interpreter_mode           interpreter_mode,
+	acpi_object_type                type,
+	u32                             flags,
+	struct acpi_namespace_node      **return_node)
 {
-	acpi_status             status;
-	acpi_namespace_node     *new_node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *new_node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_search_and_enter");
diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c
--- a/drivers/acpi/namespace/nsutils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsutils.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,14 +50,14 @@
 
 void
 acpi_ns_report_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	char                    *internal_name,
-	acpi_status             lookup_status)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	char                            *internal_name,
+	acpi_status                     lookup_status)
 {
-	acpi_status             status;
-	char                    *name;
+	acpi_status                     status;
+	char                            *name;
 
 
 	/* Convert path to external format */
@@ -102,16 +102,16 @@
 
 void
 acpi_ns_report_method_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	char                    *message,
-	acpi_namespace_node     *prefix_node,
-	char                    *path,
-	acpi_status             method_status)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	char                            *message,
+	struct acpi_namespace_node      *prefix_node,
+	char                            *path,
+	acpi_status                     method_status)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node = prefix_node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node = prefix_node;
 
 
 	if (path) {
@@ -142,11 +142,11 @@
 
 void
 acpi_ns_print_node_pathname (
-	acpi_namespace_node     *node,
-	char                    *msg)
+	struct acpi_namespace_node      *node,
+	char                            *msg)
 {
-	acpi_buffer             buffer;
-	acpi_status             status;
+	struct acpi_buffer              buffer;
+	acpi_status                     status;
 
 
 	/* Convert handle to a full pathname and print it (with supplied message) */
@@ -175,7 +175,7 @@
 
 u8
 acpi_ns_valid_root_prefix (
-	char                    prefix)
+	char                            prefix)
 {
 
 	return ((u8) (prefix == '\\'));
@@ -196,7 +196,7 @@
 
 u8
 acpi_ns_valid_path_separator (
-	char                    sep)
+	char                            sep)
 {
 
 	return ((u8) (sep == '.'));
@@ -215,7 +215,7 @@
 
 acpi_object_type
 acpi_ns_get_type (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
 	ACPI_FUNCTION_TRACE ("ns_get_type");
 
@@ -242,7 +242,7 @@
 
 u32
 acpi_ns_local (
-	acpi_object_type        type)
+	acpi_object_type                type)
 {
 	ACPI_FUNCTION_TRACE ("ns_local");
 
@@ -274,10 +274,10 @@
 
 void
 acpi_ns_get_internal_name_length (
-	acpi_namestring_info    *info)
+	struct acpi_namestring_info     *info)
 {
-	char                    *next_external_char;
-	u32                     i;
+	char                            *next_external_char;
+	u32                             i;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -348,13 +348,13 @@
 
 acpi_status
 acpi_ns_build_internal_name (
-	acpi_namestring_info    *info)
+	struct acpi_namestring_info     *info)
 {
-	u32                     num_segments = info->num_segments;
-	char                    *internal_name = info->internal_name;
-	char                    *external_name = info->next_external_char;
-	char                    *result = NULL;
-	acpi_native_uint        i;
+	u32                             num_segments = info->num_segments;
+	char                            *internal_name = info->internal_name;
+	char                            *external_name = info->next_external_char;
+	char                            *result = NULL;
+	acpi_native_uint                i;
 
 
 	ACPI_FUNCTION_TRACE ("ns_build_internal_name");
@@ -469,12 +469,12 @@
 
 acpi_status
 acpi_ns_internalize_name (
-	char                    *external_name,
-	char                    **converted_name)
+	char                            *external_name,
+	char                            **converted_name)
 {
-	char                    *internal_name;
-	acpi_namestring_info    info;
-	acpi_status             status;
+	char                            *internal_name;
+	struct acpi_namestring_info     info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ns_internalize_name");
@@ -529,17 +529,17 @@
 
 acpi_status
 acpi_ns_externalize_name (
-	u32                     internal_name_length,
-	char                    *internal_name,
-	u32                     *converted_name_length,
-	char                    **converted_name)
-{
-	acpi_native_uint        names_index = 0;
-	acpi_native_uint        num_segments = 0;
-	acpi_native_uint        required_length;
-	acpi_native_uint        prefix_length = 0;
-	acpi_native_uint        i = 0;
-	acpi_native_uint        j = 0;
+	u32                             internal_name_length,
+	char                            *internal_name,
+	u32                             *converted_name_length,
+	char                            **converted_name)
+{
+	acpi_native_uint                names_index = 0;
+	acpi_native_uint                num_segments = 0;
+	acpi_native_uint                required_length;
+	acpi_native_uint                prefix_length = 0;
+	acpi_native_uint                i = 0;
+	acpi_native_uint                j = 0;
 
 
 	ACPI_FUNCTION_TRACE ("ns_externalize_name");
@@ -686,9 +686,9 @@
  *
  ******************************************************************************/
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_map_handle_to_node (
-	acpi_handle             handle)
+	acpi_handle                     handle)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -711,7 +711,7 @@
 		return (NULL);
 	}
 
-	return ((acpi_namespace_node *) handle);
+	return ((struct acpi_namespace_node *) handle);
 }
 
 
@@ -729,7 +729,7 @@
 
 acpi_handle
 acpi_ns_convert_entry_to_handle (
-	acpi_namespace_node         *node)
+	struct acpi_namespace_node          *node)
 {
 
 
@@ -772,8 +772,8 @@
 void
 acpi_ns_terminate (void)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_namespace_node     *this_node;
+	union acpi_operand_object       *obj_desc;
+	struct acpi_namespace_node      *this_node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_terminate");
@@ -824,7 +824,7 @@
 
 u32
 acpi_ns_opens_scope (
-	acpi_object_type        type)
+	acpi_object_type                type)
 {
 	ACPI_FUNCTION_TRACE_STR ("ns_opens_scope", acpi_ut_get_type_name (type));
 
@@ -864,14 +864,14 @@
 
 acpi_status
 acpi_ns_get_node_by_path (
-	char                    *pathname,
-	acpi_namespace_node     *start_node,
-	u32                     flags,
-	acpi_namespace_node     **return_node)
-{
-	acpi_generic_state      scope_info;
-	acpi_status             status;
-	char                    *internal_path = NULL;
+	char                            *pathname,
+	struct acpi_namespace_node      *start_node,
+	u32                             flags,
+	struct acpi_namespace_node      **return_node)
+{
+	union acpi_generic_state        scope_info;
+	acpi_status                     status;
+	char                            *internal_path = NULL;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ns_get_node_by_path", pathname);
@@ -935,9 +935,9 @@
 
 acpi_name
 acpi_ns_find_parent_name (
-	acpi_namespace_node     *child_node)
+	struct acpi_namespace_node      *child_node)
 {
-	acpi_namespace_node     *parent_node;
+	struct acpi_namespace_node      *parent_node;
 
 
 	ACPI_FUNCTION_TRACE ("ns_find_parent_name");
@@ -978,9 +978,9 @@
  ******************************************************************************/
 
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_parent_node (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
 	ACPI_FUNCTION_ENTRY ();
 
@@ -1020,9 +1020,9 @@
  ******************************************************************************/
 
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_next_valid_node (
-	acpi_namespace_node     *node)
+	struct acpi_namespace_node      *node)
 {
 
 	/* If we are at the end of this peer list, return NULL */
diff -Nru a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c
--- a/drivers/acpi/namespace/nswalk.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nswalk.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@
  *              child_node          - Previous child that was found.
  *                                    The NEXT child will be returned
  *
- * RETURN:      acpi_namespace_node - Pointer to the NEXT child or NULL if
+ * RETURN:      struct acpi_namespace_node - Pointer to the NEXT child or NULL if
  *                                    none is found.
  *
  * DESCRIPTION: Return the next peer node within the namespace.  If Handle
@@ -50,13 +50,13 @@
  *
  ******************************************************************************/
 
-acpi_namespace_node *
+struct acpi_namespace_node *
 acpi_ns_get_next_node (
-	acpi_object_type        type,
-	acpi_namespace_node     *parent_node,
-	acpi_namespace_node     *child_node)
+	acpi_object_type                type,
+	struct acpi_namespace_node      *parent_node,
+	struct acpi_namespace_node      *child_node)
 {
-	acpi_namespace_node     *next_node = NULL;
+	struct acpi_namespace_node      *next_node = NULL;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -136,19 +136,19 @@
 
 acpi_status
 acpi_ns_walk_namespace (
-	acpi_object_type        type,
-	acpi_handle             start_node,
-	u32                     max_depth,
-	u8                      unlock_before_callback,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void                    **return_value)
+	acpi_object_type                type,
+	acpi_handle                     start_node,
+	u32                             max_depth,
+	u8                              unlock_before_callback,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_status             status;
-	acpi_namespace_node     *child_node;
-	acpi_namespace_node     *parent_node;
-	acpi_object_type        child_type;
-	u32                     level;
+	acpi_status                     status;
+	struct acpi_namespace_node      *child_node;
+	struct acpi_namespace_node      *parent_node;
+	acpi_object_type                child_type;
+	u32                             level;
 
 
 	ACPI_FUNCTION_TRACE ("ns_walk_namespace");
diff -Nru a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
--- a/drivers/acpi/namespace/nsxfeval.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsxfeval.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
 
 acpi_status
 acpi_evaluate_object_typed (
-	acpi_handle             handle,
-	acpi_string             pathname,
-	acpi_object_list        *external_params,
-	acpi_buffer             *return_buffer,
-	acpi_object_type        return_type)
+	acpi_handle                     handle,
+	acpi_string                     pathname,
+	struct acpi_object_list         *external_params,
+	struct acpi_buffer              *return_buffer,
+	acpi_object_type                return_type)
 {
-	acpi_status             status;
-	u8                      must_free = FALSE;
+	acpi_status                     status;
+	u8                              must_free = FALSE;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_evaluate_object_typed");
@@ -102,7 +102,7 @@
 
 	/* Examine the object type returned from evaluate_object */
 
-	if (((acpi_object *) return_buffer->pointer)->type == return_type) {
+	if (((union acpi_object *) return_buffer->pointer)->type == return_type) {
 		return_ACPI_STATUS (AE_OK);
 	}
 
@@ -110,7 +110,7 @@
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 		"Incorrect return type [%s] requested [%s]\n",
-		acpi_ut_get_type_name (((acpi_object *) return_buffer->pointer)->type),
+		acpi_ut_get_type_name (((union acpi_object *) return_buffer->pointer)->type),
 		acpi_ut_get_type_name (return_type)));
 
 	if (must_free) {
@@ -147,16 +147,16 @@
 
 acpi_status
 acpi_evaluate_object (
-	acpi_handle             handle,
-	acpi_string             pathname,
-	acpi_object_list        *external_params,
-	acpi_buffer             *return_buffer)
+	acpi_handle                     handle,
+	acpi_string                     pathname,
+	struct acpi_object_list         *external_params,
+	struct acpi_buffer              *return_buffer)
 {
-	acpi_status             status;
-	acpi_operand_object     **internal_params = NULL;
-	acpi_operand_object     *internal_return_obj = NULL;
-	acpi_size               buffer_space_needed;
-	u32                     i;
+	acpi_status                     status;
+	union acpi_operand_object       **internal_params = NULL;
+	union acpi_operand_object       *internal_return_obj = NULL;
+	acpi_size                       buffer_space_needed;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_evaluate_object");
@@ -357,14 +357,14 @@
 
 acpi_status
 acpi_walk_namespace (
-	acpi_object_type        type,
-	acpi_handle             start_object,
-	u32                     max_depth,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void                    **return_value)
+	acpi_object_type                type,
+	acpi_handle                     start_object,
+	u32                             max_depth,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_walk_namespace");
@@ -413,17 +413,17 @@
 
 static acpi_status
 acpi_ns_get_device_callback (
-	acpi_handle             obj_handle,
-	u32                     nesting_level,
-	void                    *context,
-	void                    **return_value)
+	acpi_handle                     obj_handle,
+	u32                             nesting_level,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	u32                     flags;
-	acpi_device_id          hid;
-	acpi_device_id          cid;
-	acpi_get_devices_info   *info;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	u32                             flags;
+	struct acpi_device_id           hid;
+	struct acpi_device_id           cid;
+	struct acpi_get_devices_info    *info;
 
 
 	info = context;
@@ -517,13 +517,13 @@
 
 acpi_status
 acpi_get_devices (
-	char                    *HID,
-	acpi_walk_callback      user_function,
-	void                    *context,
-	void                    **return_value)
+	char                            *HID,
+	acpi_walk_callback              user_function,
+	void                            *context,
+	void                            **return_value)
 {
-	acpi_status             status;
-	acpi_get_devices_info   info;
+	acpi_status                     status;
+	struct acpi_get_devices_info    info;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_devices");
@@ -581,12 +581,12 @@
 
 acpi_status
 acpi_attach_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler,
-	void                    *data)
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler,
+	void                            *data)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	/* Parameter validation */
@@ -633,11 +633,11 @@
 
 acpi_status
 acpi_detach_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler)
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	/* Parameter validation */
@@ -684,12 +684,12 @@
 
 acpi_status
 acpi_get_data (
-	acpi_handle             obj_handle,
-	acpi_object_handler     handler,
-	void                    **data)
+	acpi_handle                     obj_handle,
+	acpi_object_handler             handler,
+	void                            **data)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	/* Parameter validation */
diff -Nru a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c
--- a/drivers/acpi/namespace/nsxfname.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/namespace/nsxfname.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@
 
 acpi_status
 acpi_get_handle (
-	acpi_handle             parent,
-	acpi_string             pathname,
-	acpi_handle             *ret_handle)
+	acpi_handle                     parent,
+	acpi_string                     pathname,
+	acpi_handle                     *ret_handle)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node = NULL;
-	acpi_namespace_node     *prefix_node = NULL;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node = NULL;
+	struct acpi_namespace_node      *prefix_node = NULL;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -129,12 +129,12 @@
 
 acpi_status
 acpi_get_name (
-	acpi_handle             handle,
-	u32                     name_type,
-	acpi_buffer             *buffer)
+	acpi_handle                     handle,
+	u32                             name_type,
+	struct acpi_buffer              *buffer)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
 
 
 	/* Parameter validation */
@@ -209,15 +209,15 @@
 
 acpi_status
 acpi_get_object_info (
-	acpi_handle             handle,
-	acpi_device_info        *info)
+	acpi_handle                     handle,
+	struct acpi_device_info         *info)
 {
-	acpi_device_id          hid;
-	acpi_device_id          uid;
-	acpi_status             status;
-	u32                     device_status = 0;
-	acpi_integer            address = 0;
-	acpi_namespace_node     *node;
+	struct acpi_device_id           hid;
+	struct acpi_device_id           uid;
+	acpi_status                     status;
+	u32                             device_status = 0;
+	acpi_integer                    address = 0;
+	struct acpi_namespace_node      *node;
 
 
 	/* Parameter validation */
diff -Nru a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c
--- a/drivers/acpi/namespace/nsxfobj.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/namespace/nsxfobj.c	Fri Jan 10 12:12:37 2003
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
 
 acpi_status
 acpi_get_type (
-	acpi_handle             handle,
-	acpi_object_type        *ret_type)
+	acpi_handle                     handle,
+	acpi_object_type                *ret_type)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	/* Parameter Validation */
@@ -105,11 +105,11 @@
 
 acpi_status
 acpi_get_parent (
-	acpi_handle             handle,
-	acpi_handle             *ret_handle)
+	acpi_handle                     handle,
+	acpi_handle                     *ret_handle)
 {
-	acpi_namespace_node     *node;
-	acpi_status             status;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
 
 
 	if (!ret_handle) {
@@ -174,15 +174,15 @@
 
 acpi_status
 acpi_get_next_object (
-	acpi_object_type        type,
-	acpi_handle             parent,
-	acpi_handle             child,
-	acpi_handle             *ret_handle)
+	acpi_object_type                type,
+	acpi_handle                     parent,
+	acpi_handle                     child,
+	acpi_handle                     *ret_handle)
 {
-	acpi_status             status;
-	acpi_namespace_node     *node;
-	acpi_namespace_node     *parent_node = NULL;
-	acpi_namespace_node     *child_node = NULL;
+	acpi_status                     status;
+	struct acpi_namespace_node      *node;
+	struct acpi_namespace_node      *parent_node = NULL;
+	struct acpi_namespace_node      *child_node = NULL;
 
 
 	/* Parameter validation */
diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
--- a/drivers/acpi/osl.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/osl.c	Fri Jan 10 12:12:38 2003
@@ -50,11 +50,11 @@
 
 #define PREFIX		"ACPI: "
 
-typedef struct
+struct acpi_os_dpc
 {
     OSD_EXECUTION_CALLBACK  function;
     void		    *context;
-} ACPI_OS_DPC;
+};
 
 
 #ifdef ENABLE_DEBUGGER
@@ -138,7 +138,7 @@
 }
 
 acpi_status
-acpi_os_get_root_pointer(u32 flags, acpi_pointer *addr)
+acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
 {
 #ifdef CONFIG_ACPI_EFI
 	addr->pointer_type = ACPI_PHYSICAL_POINTER;
@@ -204,7 +204,8 @@
 }
 
 acpi_status
-acpi_os_table_override (acpi_table_header *existing_table, acpi_table_header **new_table)
+acpi_os_table_override (struct acpi_table_header *existing_table,
+			struct acpi_table_header **new_table)
 {
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;
@@ -418,10 +419,10 @@
 
 acpi_status
 acpi_os_read_pci_configuration (
-	acpi_pci_id             *pci_id,
-	u32                     reg,
-	void                    *value,
-	u32                     width)
+	struct acpi_pci_id	*pci_id,
+	u32			reg,
+	void			*value,
+	u32			width)
 {
 	int			result = 0;
 	int			size = 0;
@@ -454,10 +455,10 @@
 
 acpi_status
 acpi_os_write_pci_configuration (
-	acpi_pci_id             *pci_id,
-	u32                     reg,
-	acpi_integer            value,
-	u32                     width)
+	struct acpi_pci_id	*pci_id,
+	u32			reg,
+	acpi_integer		value,
+	u32			width)
 {
 	int			result = 0;
 	int			size = 0;
@@ -487,16 +488,16 @@
 /* TODO: Change code to take advantage of driver model more */
 void
 acpi_os_derive_pci_id (
-	acpi_handle     rhandle,        /* upper bound  */
-	acpi_handle     chandle,        /* current node */
-	acpi_pci_id     **id)
-{
-	acpi_handle     handle;
-	acpi_pci_id     *pci_id = *id;
-	acpi_status     status;
-	unsigned long   temp;
-	acpi_object_type type;
-	u8              tu8;
+	acpi_handle		rhandle,        /* upper bound  */
+	acpi_handle		chandle,        /* current node */
+	struct acpi_pci_id	**id)
+{
+	acpi_handle		handle;
+	struct acpi_pci_id	*pci_id = *id;
+	acpi_status		status;
+	unsigned long		temp;
+	acpi_object_type	type;
+	u8			tu8;
 
 	acpi_get_parent(chandle, &handle);
 	if (handle != rhandle) {
@@ -546,57 +547,25 @@
 
 #endif /*CONFIG_ACPI_PCI*/
 
-
-/*
- * See acpi_os_queue_for_execution()
- */
-static int
-acpi_os_queue_exec (
-	void *context)
-{
-	ACPI_OS_DPC		*dpc = (ACPI_OS_DPC*)context;
-
-	ACPI_FUNCTION_TRACE ("os_queue_exec");
-
-	daemonize();
-	strcpy(current->comm, "kacpidpc");
-
-	if (!dpc || !dpc->function)
-		return_ACPI_STATUS (AE_BAD_PARAMETER);
-
-	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Executing function [%p(%p)].\n", dpc->function, dpc->context));
-
-	dpc->function(dpc->context);
-
-	kfree(dpc);
-
-	return_ACPI_STATUS (AE_OK);
-}
-
 static void
-acpi_os_schedule_exec (
+acpi_os_execute_deferred (
 	void *context)
 {
-	ACPI_OS_DPC		*dpc = NULL;
-	int			thread_pid = -1;
+	struct acpi_os_dpc	*dpc = NULL;
 
-	ACPI_FUNCTION_TRACE ("os_schedule_exec");
+	ACPI_FUNCTION_TRACE ("os_execute_deferred");
 
-	dpc = (ACPI_OS_DPC*)context;
+	dpc = (struct acpi_os_dpc *) context;
 	if (!dpc) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid (NULL) context.\n"));
 		return_VOID;
 	}
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Creating new thread to run function [%p(%p)].\n", dpc->function, dpc->context));
+	dpc->function(dpc->context);
+
+	kfree(dpc);
 
-	thread_pid = kernel_thread(acpi_os_queue_exec, dpc,
-		(CLONE_FS | CLONE_FILES | SIGCHLD));
-	if (thread_pid < 0) {
-		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to kernel_thread() failed.\n"));
-		acpi_os_free(dpc);
-	}
-    return_VOID;
+	return_VOID;
 }
 
 acpi_status
@@ -606,7 +575,8 @@
 	void			*context)
 {
 	acpi_status 		status = AE_OK;
-	ACPI_OS_DPC 		*dpc = NULL;
+	struct acpi_os_dpc	*dpc;
+	struct work_struct	*task;
 
 	ACPI_FUNCTION_TRACE ("os_queue_for_execution");
 
@@ -616,61 +586,30 @@
 		return_ACPI_STATUS (AE_BAD_PARAMETER);
 
 	/*
-	 * Queue via DPC:
-	 * --------------
-	 * Note that we have to use two different processes for queuing DPCs:
-	 *	 Interrupt-Level: Use schedule_work; can't spawn a new thread.
-	 *	    Kernel-Level: Spawn a new kernel thread, as schedule_work has
-	 *			  its limitations (e.g. single-threaded model), and
-	 *			  all other task queues run at interrupt-level.
+	 * Allocate/initialize DPC structure.  Note that this memory will be
+	 * freed by the callee.  The kernel handles the tq_struct list  in a
+	 * way that allows us to also free its memory inside the callee.
+	 * Because we may want to schedule several tasks with different
+	 * parameters we can't use the approach some kernel code uses of
+	 * having a static tq_struct.
+	 * We can save time and code by allocating the DPC and tq_structs
+	 * from the same memory.
 	 */
-	switch (priority) {
-
-	case OSD_PRIORITY_GPE:
-	{
-		/*
-		 * Allocate/initialize DPC structure.  Note that this memory will be
-		 * freed by the callee.  The kernel handles the tq_struct list  in a
-		 * way that allows us to also free its memory inside the callee.
-		 * Because we may want to schedule several tasks with different
-		 * parameters we can't use the approach some kernel code uses of
-		 * having a static tq_struct.
-		 * We can save time and code by allocating the DPC and tq_structs
-		 * from the same memory.
-		 */
-		struct work_struct *task;
-
-		dpc = kmalloc(sizeof(ACPI_OS_DPC)+sizeof(struct work_struct), GFP_ATOMIC);
-		if (!dpc)
-			return_ACPI_STATUS (AE_NO_MEMORY);
-
-		dpc->function = function;
-		dpc->context = context;
-
-		task = (void *)(dpc+1);
-		INIT_WORK(task, acpi_os_schedule_exec, (void*)dpc);
-
-		if (!schedule_work(task)) {
-			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n"));
-			kfree(dpc);
-			status = AE_ERROR;
-		}
-	}
-	break;
-	default:
-		/*
-		 * Allocate/initialize DPC structure.  Note that this memory will be
-		 * freed by the callee.
-		 */
-		dpc = kmalloc(sizeof(ACPI_OS_DPC), GFP_KERNEL);
-		if (!dpc)
-			return_ACPI_STATUS (AE_NO_MEMORY);
 
-		dpc->function = function;
-		dpc->context = context;
-
-		acpi_os_schedule_exec(dpc);
-		break;
+	dpc = kmalloc(sizeof(struct acpi_os_dpc)+sizeof(struct work_struct), GFP_ATOMIC);
+	if (!dpc)
+		return_ACPI_STATUS (AE_NO_MEMORY);
+
+	dpc->function = function;
+	dpc->context = context;
+
+	task = (void *)(dpc+1);
+	INIT_WORK(task, acpi_os_execute_deferred, (void*)dpc);
+
+	if (!schedule_work(task)) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n"));
+		kfree(dpc);
+		status = AE_ERROR;
 	}
 
 	return_ACPI_STATUS (status);
diff -Nru a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
--- a/drivers/acpi/parser/psargs.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/psargs.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,10 +47,10 @@
 
 u32
 acpi_ps_get_next_package_length (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	u32                     encoded_length;
-	u32                     length = 0;
+	u32                             encoded_length;
+	u32                             length = 0;
 
 
 	ACPI_FUNCTION_TRACE ("ps_get_next_package_length");
@@ -118,10 +118,10 @@
 
 u8 *
 acpi_ps_get_next_package_end (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	u8                      *start = parser_state->aml;
-	acpi_native_uint        length;
+	u8                              *start = parser_state->aml;
+	acpi_native_uint                length;
 
 
 	ACPI_FUNCTION_TRACE ("ps_get_next_package_end");
@@ -152,10 +152,10 @@
 
 char *
 acpi_ps_get_next_namestring (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	u8                      *start = parser_state->aml;
-	u8                      *end = parser_state->aml;
+	u8                              *start = parser_state->aml;
+	u8                              *end = parser_state->aml;
 
 
 	ACPI_FUNCTION_TRACE ("ps_get_next_namestring");
@@ -232,17 +232,17 @@
 
 acpi_status
 acpi_ps_get_next_namepath (
-	acpi_walk_state         *walk_state,
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *arg,
-	u8                      method_call)
+	struct acpi_walk_state          *walk_state,
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *arg,
+	u8                              method_call)
 {
-	char                    *path;
-	acpi_parse_object       *name_op;
-	acpi_status             status = AE_OK;
-	acpi_operand_object     *method_desc;
-	acpi_namespace_node     *node;
-	acpi_generic_state      scope_info;
+	char                            *path;
+	union acpi_parse_object         *name_op;
+	acpi_status                     status = AE_OK;
+	union acpi_operand_object       *method_desc;
+	struct acpi_namespace_node      *node;
+	union acpi_generic_state        scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("ps_get_next_namepath");
@@ -370,9 +370,9 @@
 
 void
 acpi_ps_get_next_simple_arg (
-	acpi_parse_state        *parser_state,
-	u32                     arg_type,
-	acpi_parse_object       *arg)
+	struct acpi_parse_state         *parser_state,
+	u32                             arg_type,
+	union acpi_parse_object         *arg)
 {
 
 	ACPI_FUNCTION_TRACE_U32 ("ps_get_next_simple_arg", arg_type);
@@ -462,15 +462,15 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_next_field (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	u32                     aml_offset = ACPI_PTR_DIFF (parser_state->aml,
+	u32                             aml_offset = ACPI_PTR_DIFF (parser_state->aml,
 			 parser_state->aml_start);
-	acpi_parse_object       *field;
-	u16                     opcode;
-	u32                     name;
+	union acpi_parse_object         *field;
+	u16                             opcode;
+	u32                             name;
 
 
 	ACPI_FUNCTION_TRACE ("ps_get_next_field");
@@ -572,16 +572,16 @@
 
 acpi_status
 acpi_ps_get_next_arg (
-	acpi_walk_state         *walk_state,
-	acpi_parse_state        *parser_state,
-	u32                     arg_type,
-	acpi_parse_object       **return_arg)
+	struct acpi_walk_state          *walk_state,
+	struct acpi_parse_state         *parser_state,
+	u32                             arg_type,
+	union acpi_parse_object         **return_arg)
 {
-	acpi_parse_object       *arg = NULL;
-	acpi_parse_object       *prev = NULL;
-	acpi_parse_object       *field;
-	u32                     subop;
-	acpi_status             status = AE_OK;
+	union acpi_parse_object         *arg = NULL;
+	union acpi_parse_object         *prev = NULL;
+	union acpi_parse_object         *field;
+	u32                             subop;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_get_next_arg", parser_state);
diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
--- a/drivers/acpi/parser/psopcode.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/psopcode.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -447,7 +447,7 @@
  */
 
 
-const acpi_opcode_info    acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
+const struct acpi_opcode_info     acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
 {
 /*! [Begin] no source code translation */
 /* Index           Name                 Parser Args               Interpreter Args                ObjectType                    Class                      Type                  Flags */
@@ -675,9 +675,9 @@
  *
  ******************************************************************************/
 
-const acpi_opcode_info *
+const struct acpi_opcode_info *
 acpi_ps_get_opcode_info (
-	u16                     opcode)
+	u16                             opcode)
 {
 	ACPI_FUNCTION_NAME ("ps_get_opcode_info");
 
@@ -731,11 +731,11 @@
 
 char *
 acpi_ps_get_opcode_name (
-	u16                     opcode)
+	u16                             opcode)
 {
 #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
 
-	const acpi_opcode_info  *op;
+	const struct acpi_opcode_info   *op;
 
 
 	op = acpi_ps_get_opcode_info (opcode);
diff -Nru a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
--- a/drivers/acpi/parser/psparse.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/psparse.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@
 	 ACPI_MODULE_NAME    ("psparse")
 
 
-static u32                  acpi_gbl_depth = 0;
+static u32                          acpi_gbl_depth = 0;
 
 
 /*******************************************************************************
@@ -60,7 +60,7 @@
 
 u32
 acpi_ps_get_opcode_size (
-	u32                     opcode)
+	u32                             opcode)
 {
 
 	/* Extended (2-byte) opcode if > 255 */
@@ -89,10 +89,10 @@
 
 u16
 acpi_ps_peek_opcode (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	u8                      *aml;
-	u16                     opcode;
+	u8                              *aml;
+	u16                             opcode;
 
 
 	aml = parser_state->aml;
@@ -125,13 +125,13 @@
 
 void
 acpi_ps_complete_this_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op)
 {
-	acpi_parse_object       *prev;
-	acpi_parse_object       *next;
-	const acpi_opcode_info  *parent_info;
-	acpi_parse_object       *replacement_op = NULL;
+	union acpi_parse_object         *prev;
+	union acpi_parse_object         *next;
+	const struct acpi_opcode_info   *parent_info;
+	union acpi_parse_object         *replacement_op = NULL;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_complete_this_op", op);
@@ -281,12 +281,12 @@
 
 acpi_status
 acpi_ps_next_parse_state (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_status             callback_status)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	acpi_status                     callback_status)
 {
-	acpi_parse_state        *parser_state = &walk_state->parser_state;
-	acpi_status             status = AE_CTRL_PENDING;
+	struct acpi_parse_state         *parser_state = &walk_state->parser_state;
+	acpi_status                     status = AE_CTRL_PENDING;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_next_parse_state", op);
@@ -402,14 +402,14 @@
 
 acpi_status
 acpi_ps_parse_loop (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
-	acpi_parse_object       *op = NULL;     /* current op */
-	acpi_parse_object       *arg = NULL;
-	acpi_parse_object       pre_op;
-	acpi_parse_state        *parser_state;
-	u8                      *aml_op_start = NULL;
+	acpi_status                     status = AE_OK;
+	union acpi_parse_object         *op = NULL;     /* current op */
+	union acpi_parse_object         *arg = NULL;
+	union acpi_parse_object         pre_op;
+	struct acpi_parse_state         *parser_state;
+	u8                              *aml_op_start = NULL;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_parse_loop", walk_state);
@@ -1029,13 +1029,13 @@
 
 acpi_status
 acpi_ps_parse_aml (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status;
-	acpi_status             terminate_status;
-	acpi_thread_state       *thread;
-	acpi_thread_state       *prev_walk_list = acpi_gbl_current_walk_list;
-	acpi_walk_state         *previous_walk_state;
+	acpi_status                     status;
+	acpi_status                     terminate_status;
+	struct acpi_thread_state        *thread;
+	struct acpi_thread_state        *prev_walk_list = acpi_gbl_current_walk_list;
+	struct acpi_walk_state          *previous_walk_state;
 
 
 	ACPI_FUNCTION_TRACE ("ps_parse_aml");
@@ -1175,7 +1175,7 @@
 	/* Normal exit */
 
 	acpi_ex_release_all_mutexes (thread);
-	acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+	acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
 	acpi_gbl_current_walk_list = prev_walk_list;
 	return_ACPI_STATUS (status);
 }
diff -Nru a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c
--- a/drivers/acpi/parser/psscope.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/parser/psscope.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -42,9 +42,9 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_parent_scope (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
 	return (parser_state->scope->parse_scope.op);
 }
@@ -66,7 +66,7 @@
 
 u8
 acpi_ps_has_completed_scope (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
 	return ((u8) ((parser_state->aml >= parser_state->scope->parse_scope.arg_end ||
 			   !parser_state->scope->parse_scope.arg_count)));
@@ -88,10 +88,10 @@
 
 acpi_status
 acpi_ps_init_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *root_op)
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *root_op)
 {
-	acpi_generic_state      *scope;
+	union acpi_generic_state        *scope;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op);
@@ -132,12 +132,12 @@
 
 acpi_status
 acpi_ps_push_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       *op,
-	u32                     remaining_args,
-	u32                     arg_count)
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         *op,
+	u32                             remaining_args,
+	u32                             arg_count)
 {
-	acpi_generic_state      *scope;
+	union acpi_generic_state        *scope;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op);
@@ -194,12 +194,12 @@
 
 void
 acpi_ps_pop_scope (
-	acpi_parse_state        *parser_state,
-	acpi_parse_object       **op,
-	u32                     *arg_list,
-	u32                     *arg_count)
+	struct acpi_parse_state         *parser_state,
+	union acpi_parse_object         **op,
+	u32                             *arg_list,
+	u32                             *arg_count)
 {
-	acpi_generic_state      *scope = parser_state->scope;
+	union acpi_generic_state        *scope = parser_state->scope;
 
 
 	ACPI_FUNCTION_TRACE ("ps_pop_scope");
@@ -252,9 +252,9 @@
 
 void
 acpi_ps_cleanup_scope (
-	acpi_parse_state        *parser_state)
+	struct acpi_parse_state         *parser_state)
 {
-	acpi_generic_state      *scope;
+	union acpi_generic_state        *scope;
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state);
 
diff -Nru a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c
--- a/drivers/acpi/parser/pstree.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/pstree.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,13 +44,13 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_arg (
-	acpi_parse_object       *op,
-	u32                     argn)
+	union acpi_parse_object         *op,
+	u32                             argn)
 {
-	acpi_parse_object       *arg = NULL;
-	const acpi_opcode_info  *op_info;
+	union acpi_parse_object         *arg = NULL;
+	const struct acpi_opcode_info   *op_info;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -100,11 +100,11 @@
 
 void
 acpi_ps_append_arg (
-	acpi_parse_object       *op,
-	acpi_parse_object       *arg)
+	union acpi_parse_object         *op,
+	union acpi_parse_object         *arg)
 {
-	acpi_parse_object       *prev_arg;
-	const acpi_opcode_info  *op_info;
+	union acpi_parse_object         *prev_arg;
+	const struct acpi_opcode_info   *op_info;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -174,11 +174,11 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_child (
-	acpi_parse_object       *op)
+	union acpi_parse_object         *op)
 {
-	acpi_parse_object       *child = NULL;
+	union acpi_parse_object         *child = NULL;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -243,14 +243,14 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_get_depth_next (
-	acpi_parse_object       *origin,
-	acpi_parse_object       *op)
+	union acpi_parse_object         *origin,
+	union acpi_parse_object         *op)
 {
-	acpi_parse_object       *next = NULL;
-	acpi_parse_object       *parent;
-	acpi_parse_object       *arg;
+	union acpi_parse_object         *next = NULL;
+	union acpi_parse_object         *parent;
+	union acpi_parse_object         *arg;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c
--- a/drivers/acpi/parser/psutils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/psutils.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,11 +44,11 @@
  *
  ******************************************************************************/
 
-acpi_parse_object *
+union acpi_parse_object *
 acpi_ps_create_scope_op (
 	void)
 {
-	acpi_parse_object       *scope_op;
+	union acpi_parse_object         *scope_op;
 
 
 	scope_op = acpi_ps_alloc_op (AML_SCOPE_OP);
@@ -78,8 +78,8 @@
 
 void
 acpi_ps_init_op (
-	acpi_parse_object       *op,
-	u16                     opcode)
+	union acpi_parse_object         *op,
+	u16                             opcode)
 {
 	ACPI_FUNCTION_ENTRY ();
 
@@ -106,14 +106,14 @@
  *
  ******************************************************************************/
 
-acpi_parse_object*
+union acpi_parse_object*
 acpi_ps_alloc_op (
-	u16                     opcode)
+	u16                             opcode)
 {
-	acpi_parse_object       *op = NULL;
-	u32                     size;
-	u8                      flags;
-	const acpi_opcode_info  *op_info;
+	union acpi_parse_object         *op = NULL;
+	u32                             size;
+	u8                              flags;
+	const struct acpi_opcode_info   *op_info;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -124,23 +124,23 @@
 	/* Allocate the minimum required size object */
 
 	if (op_info->flags & AML_DEFER) {
-		size = sizeof (acpi_parse_obj_named);
+		size = sizeof (struct acpi_parse_obj_named);
 		flags = ACPI_PARSEOP_DEFERRED;
 	}
 	else if (op_info->flags & AML_NAMED) {
-		size = sizeof (acpi_parse_obj_named);
+		size = sizeof (struct acpi_parse_obj_named);
 		flags = ACPI_PARSEOP_NAMED;
 	}
 	else if (opcode == AML_INT_BYTELIST_OP) {
-		size = sizeof (acpi_parse_obj_named);
+		size = sizeof (struct acpi_parse_obj_named);
 		flags = ACPI_PARSEOP_BYTELIST;
 	}
 	else {
-		size = sizeof (acpi_parse_obj_common);
+		size = sizeof (struct acpi_parse_obj_common);
 		flags = ACPI_PARSEOP_GENERIC;
 	}
 
-	if (size == sizeof (acpi_parse_obj_common)) {
+	if (size == sizeof (struct acpi_parse_obj_common)) {
 		/*
 		 * The generic op is by far the most common (16 to 1)
 		 */
@@ -176,7 +176,7 @@
 
 void
 acpi_ps_free_op (
-	acpi_parse_object       *op)
+	union acpi_parse_object         *op)
 {
 	ACPI_FUNCTION_NAME ("ps_free_op");
 
@@ -233,7 +233,7 @@
  */
 u8
 acpi_ps_is_leading_char (
-	u32                     c)
+	u32                             c)
 {
 	return ((u8) (c == '_' || (c >= 'A' && c <= 'Z')));
 }
@@ -244,7 +244,7 @@
  */
 u8
 acpi_ps_is_prefix_char (
-	u32                     c)
+	u32                             c)
 {
 	return ((u8) (c == '\\' || c == '^'));
 }
@@ -255,7 +255,7 @@
  */
 u32
 acpi_ps_get_name (
-	acpi_parse_object       *op)
+	union acpi_parse_object         *op)
 {
 
 
@@ -276,8 +276,8 @@
  */
 void
 acpi_ps_set_name (
-	acpi_parse_object       *op,
-	u32                     name)
+	union acpi_parse_object         *op,
+	u32                             name)
 {
 
 	/* The "generic" object has no name associated with it */
diff -Nru a/drivers/acpi/parser/pswalk.c b/drivers/acpi/parser/pswalk.c
--- a/drivers/acpi/parser/pswalk.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/pswalk.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,14 +47,14 @@
 
 acpi_status
 acpi_ps_get_next_walk_op (
-	acpi_walk_state         *walk_state,
-	acpi_parse_object       *op,
-	acpi_parse_upwards      ascending_callback)
+	struct acpi_walk_state          *walk_state,
+	union acpi_parse_object         *op,
+	acpi_parse_upwards              ascending_callback)
 {
-	acpi_parse_object       *next;
-	acpi_parse_object       *parent;
-	acpi_parse_object       *grand_parent;
-	acpi_status             status;
+	union acpi_parse_object         *next;
+	union acpi_parse_object         *parent;
+	union acpi_parse_object         *grand_parent;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_get_next_walk_op", op);
@@ -208,7 +208,7 @@
 
 acpi_status
 acpi_ps_delete_completed_op (
-	acpi_walk_state         *walk_state)
+	struct acpi_walk_state          *walk_state)
 {
 
 	acpi_ps_free_op (walk_state->op);
@@ -230,11 +230,11 @@
 
 void
 acpi_ps_delete_parse_tree (
-	acpi_parse_object       *subtree_root)
+	union acpi_parse_object         *subtree_root)
 {
-	acpi_walk_state         *walk_state;
-	acpi_thread_state       *thread;
-	acpi_status             status;
+	struct acpi_walk_state          *walk_state;
+	struct acpi_thread_state        *thread;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ps_delete_parse_tree", subtree_root);
@@ -279,7 +279,7 @@
 
 	/* We are done with this walk */
 
-	acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+	acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
 	acpi_ds_delete_walk_state (walk_state);
 
 	return_VOID;
diff -Nru a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c
--- a/drivers/acpi/parser/psxface.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/parser/psxface.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -54,15 +54,15 @@
 
 acpi_status
 acpi_psx_execute (
-	acpi_namespace_node     *method_node,
-	acpi_operand_object     **params,
-	acpi_operand_object     **return_obj_desc)
+	struct acpi_namespace_node      *method_node,
+	union acpi_operand_object       **params,
+	union acpi_operand_object       **return_obj_desc)
 {
-	acpi_status             status;
-	acpi_operand_object     *obj_desc;
-	u32                     i;
-	acpi_parse_object       *op;
-	acpi_walk_state         *walk_state;
+	acpi_status                     status;
+	union acpi_operand_object       *obj_desc;
+	u32                             i;
+	union acpi_parse_object         *op;
+	struct acpi_walk_state          *walk_state;
 
 
 	ACPI_FUNCTION_TRACE ("psx_execute");
diff -Nru a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
--- a/drivers/acpi/pci_bind.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/pci_bind.c	Fri Jan 10 12:12:38 2003
@@ -40,7 +40,7 @@
 ACPI_MODULE_NAME		("pci_bind")
 
 struct acpi_pci_data {
-	acpi_pci_id		id;
+	struct acpi_pci_id	id;
 	struct pci_bus		*bus;
 	struct pci_dev		*dev;
 };
@@ -70,7 +70,7 @@
 acpi_status
 acpi_os_get_pci_id (
 	acpi_handle		handle,
-	acpi_pci_id		*id)
+	struct acpi_pci_id	*id)
 {
 	int			result = 0;
 	acpi_status		status = AE_OK;
@@ -125,7 +125,7 @@
 	struct acpi_pci_data	*data = NULL;
 	struct acpi_pci_data	*pdata = NULL;
 	char			pathname[ACPI_PATHNAME_MAX] = {0};
-	acpi_buffer		buffer = {ACPI_PATHNAME_MAX, pathname};
+	struct acpi_buffer	buffer = {ACPI_PATHNAME_MAX, pathname};
 	acpi_handle		handle = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_bind");
@@ -261,14 +261,14 @@
 int 
 acpi_pci_bind_root (
 	struct acpi_device	*device,
-	acpi_pci_id		*id,
+	struct acpi_pci_id	*id,
 	struct pci_bus		*bus) 
 {
 	int			result = 0;
 	acpi_status		status = AE_OK;
 	struct acpi_pci_data	*data = NULL;
 	char			pathname[ACPI_PATHNAME_MAX] = {0};
-	acpi_buffer		buffer = {ACPI_PATHNAME_MAX, pathname};
+	struct acpi_buffer	buffer = {ACPI_PATHNAME_MAX, pathname};
 
 	ACPI_FUNCTION_TRACE("acpi_pci_bind_root");
 
diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
--- a/drivers/acpi/pci_irq.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/pci_irq.c	Fri Jan 10 12:12:38 2003
@@ -88,10 +88,10 @@
 
 static int
 acpi_pci_irq_add_entry (
-	acpi_handle		handle,
-	int			segment,
-	int			bus,
-	acpi_pci_routing_table	*prt)
+	acpi_handle			handle,
+	int				segment,
+	int				bus,
+	struct acpi_pci_routing_table	*prt)
 {
 	struct acpi_prt_entry	*entry = NULL;
 
@@ -157,12 +157,12 @@
 	int			segment,
 	int			bus)
 {
-	acpi_status		status = AE_OK;
-	char			pathname[ACPI_PATHNAME_MAX] = {0};
-	acpi_buffer		buffer = {0, NULL};
-	acpi_pci_routing_table	*prt = NULL;
-	acpi_pci_routing_table	*entry = NULL;
-	static int		first_time = 1;
+	acpi_status			status = AE_OK;
+	char				pathname[ACPI_PATHNAME_MAX] = {0};
+	struct acpi_buffer		buffer = {0, NULL};
+	struct acpi_pci_routing_table	*prt = NULL;
+	struct acpi_pci_routing_table	*entry = NULL;
+	static int			first_time = 1;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
 
@@ -215,7 +215,7 @@
 
 	while (entry && (entry->length > 0)) {
 		acpi_pci_irq_add_entry(handle, segment, bus, entry);
-		entry = (acpi_pci_routing_table *)
+		entry = (struct acpi_pci_routing_table *)
 			((unsigned long) entry + entry->length);
 	}
 
diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
--- a/drivers/acpi/pci_link.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/pci_link.c	Fri Jan 10 12:12:37 2003
@@ -96,8 +96,8 @@
 {
 	int                     result = 0;
 	acpi_status		status = AE_OK;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_resource		*resource = NULL;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_resource	*resource = NULL;
 	int			i = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible");
@@ -112,7 +112,7 @@
 		goto end;
 	}
 
-	resource = (acpi_resource *) buffer.pointer;
+	resource = (struct acpi_resource *) buffer.pointer;
 
 	/* skip past dependent function resource (if present) */
 	if (resource->id == ACPI_RSTYPE_START_DPF)
@@ -121,7 +121,7 @@
 	switch (resource->id) {
 	case ACPI_RSTYPE_IRQ:
 	{
-		acpi_resource_irq *p = &resource->data.irq;
+		struct acpi_resource_irq *p = &resource->data.irq;
 		if (!p || !p->number_of_interrupts) {
 			ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank IRQ resource\n"));
 			result = -ENODEV;
@@ -139,7 +139,7 @@
 	}
 	case ACPI_RSTYPE_EXT_IRQ:
 	{
-		acpi_resource_ext_irq *p = &resource->data.extended_irq;
+		struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
 		if (!p || !p->number_of_interrupts) {
 			ACPI_DEBUG_PRINT((ACPI_DB_WARN, 
 				"Blank IRQ resource\n"));
@@ -180,8 +180,8 @@
 {
 	int			result = 0;
 	acpi_status		status = AE_OK;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_resource		*resource = NULL;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_resource	*resource = NULL;
 	int			irq = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_link_get_current");
@@ -212,12 +212,12 @@
 		result = -ENODEV;
 		goto end;
 	}
-	resource = (acpi_resource *) buffer.pointer;
+	resource = (struct acpi_resource *) buffer.pointer;
 
 	switch (resource->id) {
 	case ACPI_RSTYPE_IRQ:
 	{
-		acpi_resource_irq *p = &resource->data.irq;
+		struct acpi_resource_irq *p = &resource->data.irq;
 		if (!p || !p->number_of_interrupts) {
 			ACPI_DEBUG_PRINT((ACPI_DB_WARN, 
 				"Blank IRQ resource\n"));
@@ -229,7 +229,7 @@
 	}
 	case ACPI_RSTYPE_EXT_IRQ:
 	{
-		acpi_resource_ext_irq *p = &resource->data.extended_irq;
+		struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
 		if (!p || !p->number_of_interrupts) {
 			ACPI_DEBUG_PRINT((ACPI_DB_WARN,
 				"Blank IRQ resource\n"));
@@ -277,10 +277,10 @@
 	int			result = 0;
 	acpi_status		status = AE_OK;
 	struct {
-		acpi_resource	res;
-		acpi_resource   end;
+		struct acpi_resource	res;
+		struct acpi_resource	end;
 	}                       resource;
-	acpi_buffer		buffer = {sizeof(resource)+1, &resource};
+	struct acpi_buffer	buffer = {sizeof(resource)+1, &resource};
 	int			i = 0;
 	int			valid = 0;
 
@@ -307,7 +307,7 @@
 
 	/* NOTE: PCI interrupts are always level / active_low / shared. */
 	resource.res.id = ACPI_RSTYPE_IRQ;
-	resource.res.length = sizeof(acpi_resource);
+	resource.res.length = sizeof(struct acpi_resource);
 	resource.res.data.irq.edge_level = ACPI_LEVEL_SENSITIVE;
 	resource.res.data.irq.active_high_low = ACPI_ACTIVE_LOW;
 	resource.res.data.irq.shared_exclusive = ACPI_SHARED;
diff -Nru a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
--- a/drivers/acpi/pci_root.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/pci_root.c	Fri Jan 10 12:12:38 2003
@@ -62,7 +62,7 @@
  struct acpi_pci_root {
 	struct list_head	node;
  	acpi_handle		handle;
- 	acpi_pci_id		id;
+ 	struct acpi_pci_id	id;
  	struct pci_bus		*bus;
 	u64			mem_tra;
 	u64			io_tra;
@@ -73,7 +73,7 @@
 
 void
 acpi_pci_get_translations (
-	acpi_pci_id		*id,
+	struct acpi_pci_id	*id,
 	u64			*mem_tra,
 	u64			*io_tra)
 {
@@ -98,12 +98,12 @@
 
 static u64
 acpi_pci_root_bus_tra (
-       acpi_resource           *resource,
-       int                     type)
+       struct acpi_resource	*resource,
+       int			type)
 {
-	acpi_resource_address16 *address16;
-	acpi_resource_address32 *address32;
-	acpi_resource_address64 *address64;
+	struct acpi_resource_address16 *address16;
+	struct acpi_resource_address32 *address32;
+	struct acpi_resource_address64 *address64;
 
 	while (1) {
 		switch (resource->id) {
@@ -111,27 +111,27 @@
 			return 0;
 
 		case ACPI_RSTYPE_ADDRESS16:
-			address16 = (acpi_resource_address16 *) &resource->data;
+			address16 = (struct acpi_resource_address16 *) &resource->data;
 			if (type == address16->resource_type) {
 				return address16->address_translation_offset;
 			}
 			break;
 
 		case ACPI_RSTYPE_ADDRESS32:
-			address32 = (acpi_resource_address32 *) &resource->data;
+			address32 = (struct acpi_resource_address32 *) &resource->data;
 			if (type == address32->resource_type) {
 				return address32->address_translation_offset;
 			}
 			break;
 
 		case ACPI_RSTYPE_ADDRESS64:
-			address64 = (acpi_resource_address64 *) &resource->data;
+			address64 = (struct acpi_resource_address64 *) &resource->data;
 			if (type == address64->resource_type) {
 				return address64->address_translation_offset;
 			}
 			break;
 		}
-		resource = ACPI_PTR_ADD (acpi_resource,
+		resource = ACPI_PTR_ADD (struct acpi_resource,
 				resource, resource->length);
 	}
 
@@ -144,7 +144,7 @@
 	struct acpi_pci_root	*root)
 {
 	acpi_status		status;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 
 	ACPI_FUNCTION_TRACE("acpi_pci_evaluate_crs");
 
@@ -152,9 +152,9 @@
 	if (ACPI_FAILURE(status))
 		return_VALUE(-ENODEV);
 
-	root->io_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+	root->io_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
 			buffer.pointer, ACPI_IO_RANGE);
-	root->mem_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+	root->mem_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
 			buffer.pointer, ACPI_MEMORY_RANGE);
 
 	acpi_os_free(buffer.pointer);
diff -Nru a/drivers/acpi/power.c b/drivers/acpi/power.c
--- a/drivers/acpi/power.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/power.c	Fri Jan 10 12:12:38 2003
@@ -487,8 +487,8 @@
 	int			result = 0;
 	acpi_status		status = AE_OK;
 	struct acpi_power_resource *resource = NULL;
-	acpi_object		acpi_object;
-	acpi_buffer		buffer = {sizeof(acpi_object), &acpi_object};
+	union acpi_object	acpi_object;
+	struct acpi_buffer	buffer = {sizeof(acpi_object), &acpi_object};
 
 	ACPI_FUNCTION_TRACE("acpi_power_add");
 
diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c
--- a/drivers/acpi/processor.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/processor.c	Fri Jan 10 12:12:38 2003
@@ -915,9 +915,9 @@
 {
 	int			result = 0;
 	acpi_status		status = 0;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_object		*pct = NULL;
-	acpi_object		obj = {0};
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	union acpi_object	*pct = NULL;
+	union acpi_object	obj = {0};
 	struct acpi_pct_register *reg = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
@@ -928,7 +928,7 @@
 		return_VALUE(-ENODEV);
 	}
 
-	pct = (acpi_object *) buffer.pointer;
+	pct = (union acpi_object *) buffer.pointer;
 	if (!pct || (pct->type != ACPI_TYPE_PACKAGE) 
 		|| (pct->package.count != 2)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n"));
@@ -1008,10 +1008,10 @@
 {
 	int			result = 0;
 	acpi_status		status = AE_OK;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	acpi_buffer		format = {sizeof("NNNNNN"), "NNNNNN"};
-	acpi_buffer		state = {0, NULL};
-	acpi_object 		*pss = NULL;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	format = {sizeof("NNNNNN"), "NNNNNN"};
+	struct acpi_buffer	state = {0, NULL};
+	union acpi_object 	*pss = NULL;
 	int			i = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
@@ -1022,7 +1022,7 @@
 		return_VALUE(-ENODEV);
 	}
 
-	pss = (acpi_object *) buffer.pointer;
+	pss = (union acpi_object *) buffer.pointer;
 	if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
 		result = -EFAULT;
@@ -1658,7 +1658,6 @@
 acpi_cpufreq_setpolicy (
 	struct cpufreq_policy   *policy)
 {
-	unsigned int cpu = 0;
 	unsigned int i = 0;
 	struct acpi_processor *pr = NULL;
 	unsigned int next_state = 0;
@@ -1669,24 +1668,9 @@
 	if (!policy)
 		return_VALUE(-EINVAL);
 
-	/* get a present, initialized CPU */
-	if (policy->cpu == CPUFREQ_ALL_CPUS)
-	{
-		for (i=0; i<NR_CPUS; i++) {
-			if (processors[i] != NULL) {
-				cpu = i;
-				pr = processors[cpu];
-				break;
-			}
-		}
-	}
-	else
-	{
-		cpu = policy->cpu;
-		pr = processors[cpu];
-		if (!pr)
-			return_VALUE(-EINVAL);
-	}
+	pr = processors[policy->cpu];
+	if (!pr)
+		return_VALUE(-EINVAL);
 
 	/* select appropriate P-State */
 	if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
@@ -1715,19 +1699,9 @@
 	}
 
 	/* set one or all CPUs to the new state */
-	if (policy->cpu == CPUFREQ_ALL_CPUS) {
-		for (i=0; i<NR_CPUS; i++)
-		{
-			pr = processors[cpu];
-			if (!pr || !cpu_online(cpu))
-				continue;
-			result = acpi_processor_set_performance (pr, next_state);
-		}
-	} else {
-		result = acpi_processor_set_performance (pr, next_state);
-	}
+	result = acpi_processor_set_performance (pr, next_state);
 
-	return_VALUE(0);
+	return_VALUE(result);
 }
 
 
@@ -1735,7 +1709,6 @@
 acpi_cpufreq_verify (
 	struct cpufreq_policy   *policy)
 {
-	unsigned int cpu = 0;
 	unsigned int i = 0;
 	struct acpi_processor *pr = NULL;
 	unsigned int number_states = 0;
@@ -1746,24 +1719,9 @@
 	if (!policy)
 		return_VALUE(-EINVAL);
 
-	/* get a present, initialized CPU */
-	if (policy->cpu == CPUFREQ_ALL_CPUS)
-	{
-		for (i=0; i<NR_CPUS; i++) {
-			if (processors[i] != NULL) {
-				cpu = i;
-				pr = processors[cpu];
-				break;
-			}
-		}
-	}
-	else
-	{
-		cpu = policy->cpu;
-		pr = processors[cpu];
-		if (!pr)
-			return_VALUE(-EINVAL);
-	}
+	pr = processors[policy->cpu];
+	if (!pr)
+		return_VALUE(-EINVAL);
 
 	/* first check if min and max are within valid limits */
 	cpufreq_verify_within_limits(
@@ -1787,6 +1745,11 @@
 		policy->max = pr->performance.states[next_larger_state].core_frequency * 1000;
 	}
 
+	cpufreq_verify_within_limits(
+		policy, 
+		pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000,
+		pr->performance.states[pr->limit.state.px].core_frequency * 1000);
+
 	return_VALUE(0);
 }
 
@@ -2366,8 +2329,8 @@
 	struct acpi_processor	*pr)
 {
 	acpi_status		status = 0;
-	acpi_object		object = {0};
-	acpi_buffer		buffer = {sizeof(acpi_object), &object};
+	union acpi_object	object = {0};
+	struct acpi_buffer	buffer = {sizeof(union acpi_object), &object};
 	static int		cpu_count = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_processor_get_info");
diff -Nru a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c
--- a/drivers/acpi/resources/rsaddr.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsaddr.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,18 +53,18 @@
 
 acpi_status
 acpi_rs_address16_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u8                      *temp_ptr;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16);
-	u32                     index;
-	u16                     temp16;
-	u8                      temp8;
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u8                              *temp_ptr;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16);
+	u32                             index;
+	u16                             temp16;
+	u8                              temp8;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address16_resource");
@@ -265,15 +265,15 @@
 
 acpi_status
 acpi_rs_address16_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u8                      *length_field;
-	u8                      temp8;
-	char                    *temp_pointer = NULL;
-	acpi_size               actual_bytes;
+	u8                              *buffer = *output_buffer;
+	u8                              *length_field;
+	u8                              temp8;
+	char                            *temp_pointer = NULL;
+	acpi_size                       actual_bytes;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address16_stream");
@@ -431,25 +431,25 @@
 
 acpi_status
 acpi_rs_address32_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer;
-	acpi_resource           *output_struct= (void *) *output_buffer;
-	u16                     temp16;
-	u8                      temp8;
-	u8                      *temp_ptr;
-	acpi_size               struct_size;
-	u32                     index;
+	u8                              *buffer;
+	struct acpi_resource            *output_struct= (void *) *output_buffer;
+	u16                             temp16;
+	u8                              temp8;
+	u8                              *temp_ptr;
+	acpi_size                       struct_size;
+	u32                             index;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address32_resource");
 
 
 	buffer = byte_stream_buffer;
-	struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32);
+	struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32);
 
 	/*
 	 * Point past the Descriptor to get the number of bytes consumed
@@ -648,14 +648,14 @@
 
 acpi_status
 acpi_rs_address32_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer;
-	u16                     *length_field;
-	u8                      temp8;
-	char                    *temp_pointer;
+	u8                              *buffer;
+	u16                             *length_field;
+	u8                              temp8;
+	char                            *temp_pointer;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address32_stream");
@@ -813,25 +813,25 @@
 
 acpi_status
 acpi_rs_address64_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16;
-	u8                      temp8;
-	u8                      *temp_ptr;
-	acpi_size               struct_size;
-	u32                     index;
+	u8                              *buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16;
+	u8                              temp8;
+	u8                              *temp_ptr;
+	acpi_size                       struct_size;
+	u32                             index;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address64_resource");
 
 
 	buffer = byte_stream_buffer;
-	struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64);
+	struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64);
 
 	/*
 	 * Point past the Descriptor to get the number of bytes consumed
@@ -1034,14 +1034,14 @@
 
 acpi_status
 acpi_rs_address64_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer;
-	u16                     *length_field;
-	u8                      temp8;
-	char                    *temp_pointer;
+	u8                              *buffer;
+	u16                             *length_field;
+	u8                              temp8;
+	char                            *temp_pointer;
 
 
 	ACPI_FUNCTION_TRACE ("rs_address64_stream");
diff -Nru a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
--- a/drivers/acpi/resources/rscalc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rscalc.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,13 +50,13 @@
 
 acpi_status
 acpi_rs_get_byte_stream_length (
-	acpi_resource           *linked_list,
-	acpi_size               *size_needed)
+	struct acpi_resource            *linked_list,
+	acpi_size                       *size_needed)
 {
-	acpi_size               byte_stream_size_needed = 0;
-	acpi_size               segment_size;
-	acpi_resource_ext_irq   *ex_irq = NULL;
-	u8                      done = FALSE;
+	acpi_size                       byte_stream_size_needed = 0;
+	acpi_size                       segment_size;
+	struct acpi_resource_ext_irq    *ex_irq = NULL;
+	u8                              done = FALSE;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_byte_stream_length");
@@ -253,7 +253,7 @@
 		/*
 		 * Point to the next object
 		 */
-		linked_list = ACPI_PTR_ADD (acpi_resource,
+		linked_list = ACPI_PTR_ADD (struct acpi_resource,
 				  linked_list, linked_list->length);
 	}
 
@@ -285,22 +285,22 @@
 
 acpi_status
 acpi_rs_get_list_length (
-	u8                      *byte_stream_buffer,
-	u32                     byte_stream_buffer_length,
-	acpi_size               *size_needed)
+	u8                              *byte_stream_buffer,
+	u32                             byte_stream_buffer_length,
+	acpi_size                       *size_needed)
 {
-	u32                     buffer_size = 0;
-	u32                     bytes_parsed = 0;
-	u8                      number_of_interrupts = 0;
-	u8                      number_of_channels = 0;
-	u8                      resource_type;
-	u32                     structure_size;
-	u32                     bytes_consumed;
-	u8                      *buffer;
-	u8                      temp8;
-	u16                     temp16;
-	u8                      index;
-	u8                      additional_bytes;
+	u32                             buffer_size = 0;
+	u32                             bytes_parsed = 0;
+	u8                              number_of_interrupts = 0;
+	u8                              number_of_channels = 0;
+	u8                              resource_type;
+	u32                             structure_size;
+	u32                             bytes_consumed;
+	u8                              *buffer;
+	u8                              temp8;
+	u16                             temp16;
+	u8                              index;
+	u8                              additional_bytes;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_list_length");
@@ -319,7 +319,7 @@
 			 */
 			bytes_consumed = 12;
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
 			break;
 
 
@@ -338,7 +338,7 @@
 			 */
 			temp16 = (u16) ACPI_ROUND_UP_to_32_bITS (temp16);
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
 					   (temp16 * sizeof (u8));
 			break;
 
@@ -350,7 +350,7 @@
 
 			bytes_consumed = 20;
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
 			break;
 
 
@@ -360,7 +360,7 @@
 			 */
 			bytes_consumed = 12;
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
 			break;
 
 
@@ -397,7 +397,7 @@
 			 */
 			temp8 = (u8) ACPI_ROUND_UP_to_64_bITS (temp8);
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64) +
 					   (temp8 * sizeof (u8));
 			break;
 
@@ -435,7 +435,7 @@
 			 */
 			temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32) +
 					   (temp8 * sizeof (u8));
 			break;
 
@@ -473,7 +473,7 @@
 			 */
 			temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16) +
 					   (temp8 * sizeof (u8));
 			break;
 
@@ -525,7 +525,7 @@
 			 */
 			temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq) +
 					   (additional_bytes * sizeof (u8)) +
 					   (temp8 * sizeof (u8));
 			break;
@@ -564,7 +564,7 @@
 				temp16 >>= 1;
 			}
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io) +
 					   (number_of_interrupts * sizeof (u32));
 			break;
 
@@ -594,7 +594,7 @@
 				temp8 >>= 1;
 			}
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma) +
 					   (number_of_channels * sizeof (u32));
 			break;
 
@@ -614,7 +614,7 @@
 				bytes_consumed = 1;
 			}
 
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
 			break;
 
 
@@ -632,7 +632,7 @@
 			 * IO Port Resource
 			 */
 			bytes_consumed = 8;
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
 			break;
 
 
@@ -641,7 +641,7 @@
 			 * Fixed IO Port Resource
 			 */
 			bytes_consumed = 4;
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
 			break;
 
 
@@ -659,7 +659,7 @@
 			 * Ensure a 32-bit boundary for the structure
 			 */
 			temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
-			structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+			structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
 					   (temp8 * sizeof (u8));
 			break;
 
@@ -721,17 +721,17 @@
 
 acpi_status
 acpi_rs_get_pci_routing_table_length (
-	acpi_operand_object     *package_object,
-	acpi_size               *buffer_size_needed)
+	union acpi_operand_object       *package_object,
+	acpi_size                       *buffer_size_needed)
 {
-	u32                     number_of_elements;
-	acpi_size               temp_size_needed = 0;
-	acpi_operand_object     **top_object_list;
-	u32                     index;
-	acpi_operand_object     *package_element;
-	acpi_operand_object     **sub_object_list;
-	u8                      name_found;
-	u32                     table_index;
+	u32                             number_of_elements;
+	acpi_size                       temp_size_needed = 0;
+	union acpi_operand_object       **top_object_list;
+	u32                             index;
+	union acpi_operand_object       *package_element;
+	union acpi_operand_object       **sub_object_list;
+	u8                              name_found;
+	u32                             table_index;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_pci_routing_table_length");
@@ -782,7 +782,7 @@
 			}
 		}
 
-		temp_size_needed += (sizeof (acpi_pci_routing_table) - 4);
+		temp_size_needed += (sizeof (struct acpi_pci_routing_table) - 4);
 
 		/*
 		 * Was a String type found?
@@ -813,7 +813,7 @@
 		temp_size_needed = ACPI_ROUND_UP_to_64_bITS (temp_size_needed);
 
 		/*
-		 * Point to the next acpi_operand_object
+		 * Point to the next union acpi_operand_object
 		 */
 		top_object_list++;
 	}
@@ -821,6 +821,6 @@
 	/*
 	 * Adding an extra element to the end of the list, essentially a NULL terminator
 	 */
-	*buffer_size_needed = temp_size_needed + sizeof (acpi_pci_routing_table);
+	*buffer_size_needed = temp_size_needed + sizeof (struct acpi_pci_routing_table);
 	return_ACPI_STATUS (AE_OK);
 }
diff -Nru a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
--- a/drivers/acpi/resources/rscreate.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rscreate.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,14 +52,14 @@
 
 acpi_status
 acpi_rs_create_resource_list (
-	acpi_operand_object     *byte_stream_buffer,
-	acpi_buffer             *output_buffer)
+	union acpi_operand_object       *byte_stream_buffer,
+	struct acpi_buffer              *output_buffer)
 {
 
-	acpi_status             status;
-	u8                      *byte_stream_start;
-	acpi_size               list_size_needed = 0;
-	u32                     byte_stream_buffer_length;
+	acpi_status                     status;
+	u8                              *byte_stream_start;
+	acpi_size                       list_size_needed = 0;
+	u32                             byte_stream_buffer_length;
 
 
 	ACPI_FUNCTION_TRACE ("rs_create_resource_list");
@@ -112,7 +112,7 @@
  *
  * FUNCTION:    acpi_rs_create_pci_routing_table
  *
- * PARAMETERS:  package_object          - Pointer to an acpi_operand_object
+ * PARAMETERS:  package_object          - Pointer to an union acpi_operand_object
  *                                        package
  *              output_buffer           - Pointer to the user's buffer
  *
@@ -121,7 +121,7 @@
  *              AE_BUFFER_OVERFLOW and output_buffer->Length will point
  *              to the size buffer needed.
  *
- * DESCRIPTION: Takes the acpi_operand_object  package and creates a
+ * DESCRIPTION: Takes the union acpi_operand_object    package and creates a
  *              linked list of PCI interrupt descriptions
  *
  * NOTE: It is the caller's responsibility to ensure that the start of the
@@ -131,20 +131,20 @@
 
 acpi_status
 acpi_rs_create_pci_routing_table (
-	acpi_operand_object     *package_object,
-	acpi_buffer             *output_buffer)
+	union acpi_operand_object       *package_object,
+	struct acpi_buffer              *output_buffer)
 {
-	u8                      *buffer;
-	acpi_operand_object     **top_object_list;
-	acpi_operand_object     **sub_object_list;
-	acpi_operand_object     *obj_desc;
-	acpi_size               buffer_size_needed = 0;
-	u32                     number_of_elements;
-	u32                     index;
-	acpi_pci_routing_table  *user_prt;
-	acpi_namespace_node     *node;
-	acpi_status             status;
-	acpi_buffer             path_buffer;
+	u8                              *buffer;
+	union acpi_operand_object       **top_object_list;
+	union acpi_operand_object       **sub_object_list;
+	union acpi_operand_object       *obj_desc;
+	acpi_size                       buffer_size_needed = 0;
+	u32                             number_of_elements;
+	u32                             index;
+	struct acpi_pci_routing_table   *user_prt;
+	struct acpi_namespace_node      *node;
+	acpi_status                     status;
+	struct acpi_buffer              path_buffer;
 
 
 	ACPI_FUNCTION_TRACE ("rs_create_pci_routing_table");
@@ -179,7 +179,7 @@
 	top_object_list  = package_object->package.elements;
 	number_of_elements = package_object->package.count;
 	buffer           = output_buffer->pointer;
-	user_prt         = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+	user_prt         = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
 
 	for (index = 0; index < number_of_elements; index++) {
 		/*
@@ -189,14 +189,14 @@
 		 * be zero because we cleared the return buffer earlier
 		 */
 		buffer += user_prt->length;
-		user_prt = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+		user_prt = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
 
 		/*
 		 * Fill in the Length field with the information we have at this point.
 		 * The minus four is to subtract the size of the u8 Source[4] member
 		 * because it is added below.
 		 */
-		user_prt->length = (sizeof (acpi_pci_routing_table) - 4);
+		user_prt->length = (sizeof (struct acpi_pci_routing_table) - 4);
 
 		/*
 		 * Each element of the top-level package must also be a package
@@ -328,7 +328,7 @@
 			return_ACPI_STATUS (AE_BAD_DATA);
 		}
 
-		/* Point to the next acpi_operand_object in the top level package */
+		/* Point to the next union acpi_operand_object in the top level package */
 
 		top_object_list++;
 	}
@@ -359,11 +359,11 @@
 
 acpi_status
 acpi_rs_create_byte_stream (
-	acpi_resource           *linked_list_buffer,
-	acpi_buffer             *output_buffer)
+	struct acpi_resource            *linked_list_buffer,
+	struct acpi_buffer              *output_buffer)
 {
-	acpi_status             status;
-	acpi_size               byte_stream_size_needed = 0;
+	acpi_status                     status;
+	acpi_size                       byte_stream_size_needed = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_create_byte_stream");
diff -Nru a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
--- a/drivers/acpi/resources/rsdump.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsdump.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@
 
 void
 acpi_rs_dump_irq (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_irq       *irq_data = (acpi_resource_irq *) data;
-	u8                      index = 0;
+	struct acpi_resource_irq        *irq_data = (struct acpi_resource_irq *) data;
+	u8                              index = 0;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -91,10 +91,10 @@
 
 void
 acpi_rs_dump_dma (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_dma       *dma_data = (acpi_resource_dma *) data;
-	u8                      index = 0;
+	struct acpi_resource_dma        *dma_data = (struct acpi_resource_dma *) data;
+	u8                              index = 0;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -171,9 +171,9 @@
 
 void
 acpi_rs_dump_start_depend_fns (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_start_dpf *sdf_data = (acpi_resource_start_dpf *) data;
+	struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -236,9 +236,9 @@
 
 void
 acpi_rs_dump_io (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_io        *io_data = (acpi_resource_io *) data;
+	struct acpi_resource_io         *io_data = (struct acpi_resource_io *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -279,9 +279,9 @@
 
 void
 acpi_rs_dump_fixed_io (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_fixed_io  *fixed_io_data = (acpi_resource_fixed_io *) data;
+	struct acpi_resource_fixed_io   *fixed_io_data = (struct acpi_resource_fixed_io *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -312,10 +312,10 @@
 
 void
 acpi_rs_dump_vendor_specific (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_vendor    *vendor_data = (acpi_resource_vendor *) data;
-	u16                     index = 0;
+	struct acpi_resource_vendor     *vendor_data = (struct acpi_resource_vendor *) data;
+	u16                             index = 0;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -348,9 +348,9 @@
 
 void
 acpi_rs_dump_memory24 (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_mem24     *memory24_data = (acpi_resource_mem24 *) data;
+	struct acpi_resource_mem24      *memory24_data = (struct acpi_resource_mem24 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -393,9 +393,9 @@
 
 void
 acpi_rs_dump_memory32 (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_mem32     *memory32_data = (acpi_resource_mem32 *) data;
+	struct acpi_resource_mem32      *memory32_data = (struct acpi_resource_mem32 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -438,9 +438,9 @@
 
 void
 acpi_rs_dump_fixed_memory32 (
-	acpi_resource_data          *data)
+	union acpi_resource_data            *data)
 {
-	acpi_resource_fixed_mem32   *fixed_memory32_data = (acpi_resource_fixed_mem32 *) data;
+	struct acpi_resource_fixed_mem32    *fixed_memory32_data = (struct acpi_resource_fixed_mem32 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -477,9 +477,9 @@
 
 void
 acpi_rs_dump_address16 (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_address16 *address16_data = (acpi_resource_address16 *) data;
+	struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -620,9 +620,9 @@
 
 void
 acpi_rs_dump_address32 (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_address32 *address32_data = (acpi_resource_address32 *) data;
+	struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -762,9 +762,9 @@
 
 void
 acpi_rs_dump_address64 (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_address64 *address64_data = (acpi_resource_address64 *) data;
+	struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -909,10 +909,10 @@
 
 void
 acpi_rs_dump_extended_irq (
-	acpi_resource_data      *data)
+	union acpi_resource_data        *data)
 {
-	acpi_resource_ext_irq   *ext_irq_data = (acpi_resource_ext_irq *) data;
-	u8                      index = 0;
+	struct acpi_resource_ext_irq    *ext_irq_data = (struct acpi_resource_ext_irq *) data;
+	u8                              index = 0;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -970,10 +970,10 @@
 
 void
 acpi_rs_dump_resource_list (
-	acpi_resource       *resource)
+	struct acpi_resource        *resource)
 {
-	u8                  count = 0;
-	u8                  done = FALSE;
+	u8                          count = 0;
+	u8                          done = FALSE;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -1053,7 +1053,7 @@
 
 			}
 
-			resource = ACPI_PTR_ADD (acpi_resource, resource, resource->length);
+			resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
 		}
 	}
 
@@ -1074,19 +1074,19 @@
 
 void
 acpi_rs_dump_irq_list (
-	u8                      *route_table)
+	u8                              *route_table)
 {
-	u8                      *buffer = route_table;
-	u8                      count = 0;
-	u8                      done = FALSE;
-	acpi_pci_routing_table  *prt_element;
+	u8                              *buffer = route_table;
+	u8                              count = 0;
+	u8                              done = FALSE;
+	struct acpi_pci_routing_table   *prt_element;
 
 
 	ACPI_FUNCTION_ENTRY ();
 
 
 	if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
-		prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+		prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
 
 		while (!done) {
 			acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
@@ -1104,7 +1104,7 @@
 
 			buffer += prt_element->length;
 
-			prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+			prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
 
 			if(0 == prt_element->length) {
 				done = TRUE;
diff -Nru a/drivers/acpi/resources/rsio.c b/drivers/acpi/resources/rsio.c
--- a/drivers/acpi/resources/rsio.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/resources/rsio.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,16 +53,16 @@
 
 acpi_status
 acpi_rs_io_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
 
 
 	ACPI_FUNCTION_TRACE ("rs_io_resource");
@@ -151,16 +151,16 @@
 
 acpi_status
 acpi_rs_fixed_io_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
 
 
 	ACPI_FUNCTION_TRACE ("rs_fixed_io_resource");
@@ -220,13 +220,13 @@
 
 acpi_status
 acpi_rs_io_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_io_stream");
@@ -304,13 +304,13 @@
 
 acpi_status
 acpi_rs_fixed_io_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_fixed_io_stream");
@@ -370,17 +370,17 @@
 
 acpi_status
 acpi_rs_dma_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u8                      temp8 = 0;
-	u8                      index;
-	u8                      i;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u8                              temp8 = 0;
+	u8                              index;
+	u8                              i;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma);
 
 
 	ACPI_FUNCTION_TRACE ("rs_dma_resource");
@@ -474,14 +474,14 @@
 
 acpi_status
 acpi_rs_dma_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      index;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              index;
 
 
 	ACPI_FUNCTION_TRACE ("rs_dma_stream");
diff -Nru a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c
--- a/drivers/acpi/resources/rsirq.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsirq.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,18 +53,18 @@
 
 acpi_status
 acpi_rs_irq_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      index;
-	u8                      i;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_irq);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              index;
+	u8                              i;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_irq);
 
 
 	ACPI_FUNCTION_TRACE ("rs_irq_resource");
@@ -181,15 +181,15 @@
 
 acpi_status
 acpi_rs_irq_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      index;
-	u8                      IRqinfo_byte_needed;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              index;
+	u8                              IRqinfo_byte_needed;
 
 
 	ACPI_FUNCTION_TRACE ("rs_irq_stream");
@@ -277,18 +277,18 @@
 
 acpi_status
 acpi_rs_extended_irq_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      *temp_ptr;
-	u8                      index;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              *temp_ptr;
+	u8                              index;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq);
 
 
 	ACPI_FUNCTION_TRACE ("rs_extended_irq_resource");
@@ -451,15 +451,15 @@
 
 acpi_status
 acpi_rs_extended_irq_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     *length_field;
-	u8                      temp8 = 0;
-	u8                      index;
-	char                    *temp_pointer = NULL;
+	u8                              *buffer = *output_buffer;
+	u16                             *length_field;
+	u8                              temp8 = 0;
+	u8                              index;
+	char                            *temp_pointer = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("rs_extended_irq_stream");
diff -Nru a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c
--- a/drivers/acpi/resources/rslist.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rslist.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
 
 u8
 acpi_rs_get_resource_type (
-	u8                      resource_start_byte)
+	u8                              resource_start_byte)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -98,18 +98,18 @@
 
 acpi_status
 acpi_rs_byte_stream_to_list (
-	u8                      *byte_stream_buffer,
-	u32                     byte_stream_buffer_length,
-	u8                      *output_buffer)
+	u8                              *byte_stream_buffer,
+	u32                             byte_stream_buffer_length,
+	u8                              *output_buffer)
 {
-	acpi_status             status;
-	acpi_size               bytes_parsed = 0;
-	u8                      resource_type = 0;
-	acpi_size               bytes_consumed = 0;
-	u8                      *buffer = output_buffer;
-	acpi_size               structure_size = 0;
-	u8                      end_tag_processed = FALSE;
-	acpi_resource           *resource;
+	acpi_status                     status;
+	acpi_size                       bytes_parsed = 0;
+	u8                              resource_type = 0;
+	acpi_size                       bytes_consumed = 0;
+	u8                              *buffer = output_buffer;
+	acpi_size                       structure_size = 0;
+	u8                              end_tag_processed = FALSE;
+	struct acpi_resource            *resource;
 
 	ACPI_FUNCTION_TRACE ("rs_byte_stream_to_list");
 
@@ -292,7 +292,7 @@
 		/*
 		 * Set the Buffer to the next structure
 		 */
-		resource = ACPI_CAST_PTR (acpi_resource, buffer);
+		resource = ACPI_CAST_PTR (struct acpi_resource, buffer);
 		resource->length = ACPI_ALIGN_RESOURCE_SIZE(resource->length);
 		buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
 
@@ -332,14 +332,14 @@
 
 acpi_status
 acpi_rs_list_to_byte_stream (
-	acpi_resource           *linked_list,
-	acpi_size               byte_stream_size_needed,
-	u8                      *output_buffer)
+	struct acpi_resource            *linked_list,
+	acpi_size                       byte_stream_size_needed,
+	u8                              *output_buffer)
 {
-	acpi_status             status;
-	u8                      *buffer = output_buffer;
-	acpi_size               bytes_consumed = 0;
-	u8                      done = FALSE;
+	acpi_status                     status;
+	u8                              *buffer = output_buffer;
+	acpi_size                       bytes_consumed = 0;
+	u8                              done = FALSE;
 
 
 	ACPI_FUNCTION_TRACE ("rs_list_to_byte_stream");
@@ -489,7 +489,7 @@
 		/*
 		 * Point to the next object
 		 */
-		linked_list = ACPI_PTR_ADD (acpi_resource,
+		linked_list = ACPI_PTR_ADD (struct acpi_resource,
 				  linked_list, linked_list->length);
 	}
 
diff -Nru a/drivers/acpi/resources/rsmemory.c b/drivers/acpi/resources/rsmemory.c
--- a/drivers/acpi/resources/rsmemory.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsmemory.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,16 +53,16 @@
 
 acpi_status
 acpi_rs_memory24_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
 
 
 	ACPI_FUNCTION_TRACE ("rs_memory24_resource");
@@ -143,13 +143,13 @@
 
 acpi_status
 acpi_rs_memory24_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_memory24_stream");
@@ -230,16 +230,16 @@
 
 acpi_status
 acpi_rs_memory32_range_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
 
 
 	ACPI_FUNCTION_TRACE ("rs_memory32_range_resource");
@@ -335,16 +335,16 @@
 
 acpi_status
 acpi_rs_fixed_memory32_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
 
 
 	ACPI_FUNCTION_TRACE ("rs_fixed_memory32_resource");
@@ -412,13 +412,13 @@
 
 acpi_status
 acpi_rs_memory32_range_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_memory32_range_stream");
@@ -495,13 +495,13 @@
 
 acpi_status
 acpi_rs_fixed_memory32_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_fixed_memory32_stream");
diff -Nru a/drivers/acpi/resources/rsmisc.c b/drivers/acpi/resources/rsmisc.c
--- a/drivers/acpi/resources/rsmisc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsmisc.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,13 +53,13 @@
 
 acpi_status
 acpi_rs_end_tag_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	acpi_size               struct_size = ACPI_RESOURCE_LENGTH;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	acpi_size                       struct_size = ACPI_RESOURCE_LENGTH;
 
 
 	ACPI_FUNCTION_TRACE ("rs_end_tag_resource");
@@ -106,12 +106,12 @@
 
 acpi_status
 acpi_rs_end_tag_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_end_tag_stream");
@@ -163,17 +163,17 @@
 
 acpi_status
 acpi_rs_vendor_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      index;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              index;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor);
 
 
 	ACPI_FUNCTION_TRACE ("rs_vendor_resource");
@@ -263,14 +263,14 @@
 
 acpi_status
 acpi_rs_vendor_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u16                     temp16 = 0;
-	u8                      temp8 = 0;
-	u8                      index;
+	u8                              *buffer = *output_buffer;
+	u16                             temp16 = 0;
+	u8                              temp8 = 0;
+	u8                              index;
 
 
 	ACPI_FUNCTION_TRACE ("rs_vendor_stream");
@@ -343,15 +343,15 @@
 
 acpi_status
 acpi_rs_start_depend_fns_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	u8                      *buffer = byte_stream_buffer;
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	u8                      temp8 = 0;
-	acpi_size               struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+	u8                              *buffer = byte_stream_buffer;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	u8                              temp8 = 0;
+	acpi_size                       struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
 
 
 	ACPI_FUNCTION_TRACE ("rs_start_depend_fns_resource");
@@ -435,13 +435,13 @@
 
 acpi_status
 acpi_rs_end_depend_fns_resource (
-	u8                      *byte_stream_buffer,
-	acpi_size               *bytes_consumed,
-	u8                      **output_buffer,
-	acpi_size               *structure_size)
+	u8                              *byte_stream_buffer,
+	acpi_size                       *bytes_consumed,
+	u8                              **output_buffer,
+	acpi_size                       *structure_size)
 {
-	acpi_resource           *output_struct = (void *) *output_buffer;
-	acpi_size               struct_size = ACPI_RESOURCE_LENGTH;
+	struct acpi_resource            *output_struct = (void *) *output_buffer;
+	acpi_size                       struct_size = ACPI_RESOURCE_LENGTH;
 
 
 	ACPI_FUNCTION_TRACE ("rs_end_depend_fns_resource");
@@ -489,12 +489,12 @@
 
 acpi_status
 acpi_rs_start_depend_fns_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
-	u8                      temp8 = 0;
+	u8                              *buffer = *output_buffer;
+	u8                              temp8 = 0;
 
 
 	ACPI_FUNCTION_TRACE ("rs_start_depend_fns_stream");
@@ -553,11 +553,11 @@
 
 acpi_status
 acpi_rs_end_depend_fns_stream (
-	acpi_resource           *linked_list,
-	u8                      **output_buffer,
-	acpi_size               *bytes_consumed)
+	struct acpi_resource            *linked_list,
+	u8                              **output_buffer,
+	acpi_size                       *bytes_consumed)
 {
-	u8                      *buffer = *output_buffer;
+	u8                              *buffer = *output_buffer;
 
 
 	ACPI_FUNCTION_TRACE ("rs_end_depend_fns_stream");
diff -Nru a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c
--- a/drivers/acpi/resources/rsutils.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/resources/rsutils.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,11 +52,11 @@
 
 acpi_status
 acpi_rs_get_prt_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_prt_method_data");
@@ -105,11 +105,11 @@
 
 acpi_status
 acpi_rs_get_crs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_crs_method_data");
@@ -159,11 +159,11 @@
 
 acpi_status
 acpi_rs_get_prs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("rs_get_prs_method_data");
@@ -213,12 +213,12 @@
 
 acpi_status
 acpi_rs_set_srs_method_data (
-	acpi_handle             handle,
-	acpi_buffer             *in_buffer)
+	acpi_handle                     handle,
+	struct acpi_buffer              *in_buffer)
 {
-	acpi_operand_object     *params[2];
-	acpi_status             status;
-	acpi_buffer             buffer;
+	union acpi_operand_object       *params[2];
+	acpi_status                     status;
+	struct acpi_buffer              buffer;
 
 
 	ACPI_FUNCTION_TRACE ("rs_set_srs_method_data");
diff -Nru a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c
--- a/drivers/acpi/resources/rsxface.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/resources/rsxface.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -55,10 +55,10 @@
 
 acpi_status
 acpi_get_irq_routing_table (
-	acpi_handle             device_handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_irq_routing_table ");
@@ -110,10 +110,10 @@
 
 acpi_status
 acpi_get_current_resources (
-	acpi_handle             device_handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_current_resources");
@@ -162,10 +162,10 @@
 
 acpi_status
 acpi_get_possible_resources (
-	acpi_handle             device_handle,
-	acpi_buffer             *ret_buffer)
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_possible_resources");
@@ -211,10 +211,10 @@
 
 acpi_status
 acpi_set_current_resources (
-	acpi_handle             device_handle,
-	acpi_buffer             *in_buffer)
+	acpi_handle                     device_handle,
+	struct acpi_buffer              *in_buffer)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_set_current_resources");
diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c
--- a/drivers/acpi/scan.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/scan.c	Fri Jan 10 12:12:38 2003
@@ -194,23 +194,23 @@
 	struct acpi_driver	*driver)
 {
 	int error = 0;
-	acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 
 	if (device->flags.hardware_id)
 		if (strstr(driver->ids, device->pnp.hardware_id))
 			goto Done;
 
 	if (device->flags.compatible_ids) {
-		acpi_status	status = AE_OK;
-		acpi_object	*object = NULL;
-		char		cid[256] = {};
+		acpi_status		status = AE_OK;
+		union acpi_object	*object = NULL;
+		char			cid[256] = {};
 
 		status = acpi_evaluate_object(device->handle, "_CID", NULL, 
 			&buffer);
 		if (ACPI_FAILURE(status) || !buffer.pointer)
 			return -ENOENT;
 
-		object = (acpi_object *) buffer.pointer;
+		object = (union acpi_object *) buffer.pointer;
 
 		switch (object->type) {
 		case ACPI_TYPE_INTEGER:
@@ -487,7 +487,7 @@
 static void acpi_device_get_busid(struct acpi_device * device, acpi_handle handle, int type)
 {
 	char			bus_id[5] = {'?',0};
-	acpi_buffer		buffer = {sizeof(bus_id), bus_id};
+	struct acpi_buffer	buffer = {sizeof(bus_id), bus_id};
 	int			i = 0;
 
 	/*
@@ -523,7 +523,7 @@
 static void acpi_device_set_id(struct acpi_device * device, struct acpi_device * parent,
 			       acpi_handle handle, int type)
 {
-	acpi_device_info	info;
+	struct acpi_device_info	info;
 	char			*hid = NULL;
 	char			*uid = NULL;
 	acpi_status		status;
@@ -651,7 +651,7 @@
 		break;
 	}
 
-	pr_debug("Found %s %s [%p]\n", type_string, name, handle);
+	printk(KERN_DEBUG "Found %s %s [%p]\n", type_string, name, handle);
 #endif /*CONFIG_ACPI_DEBUG_OUTPUT*/
 }
 
diff -Nru a/drivers/acpi/system.c b/drivers/acpi/system.c
--- a/drivers/acpi/system.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/system.c	Fri Jan 10 12:12:38 2003
@@ -91,7 +91,7 @@
 	loff_t			*ppos)
 {
 	acpi_status		status = AE_OK;
-	acpi_buffer		dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
 	void			*data = 0;
 	size_t			size = 0;
 
@@ -134,7 +134,7 @@
 	loff_t			*ppos)
 {
 	acpi_status		status = AE_OK;
-	acpi_buffer		fadt = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	fadt = {ACPI_ALLOCATE_BUFFER, NULL};
 	void			*data = 0;
 	size_t			size = 0;
 
diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
--- a/drivers/acpi/tables/tbconvrt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbconvrt.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,10 +47,10 @@
 
 u32
 acpi_tb_get_table_count (
-	rsdp_descriptor         *RSDP,
-	acpi_table_header       *RSDT)
+	struct rsdp_descriptor          *RSDP,
+	struct acpi_table_header        *RSDT)
 {
-	u32                     pointer_size;
+	u32                             pointer_size;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -73,7 +73,7 @@
 	 * pointers contained within the RSDT/XSDT.  The size of the pointers
 	 * is architecture-dependent.
 	 */
-	return ((RSDT->length - sizeof (acpi_table_header)) / pointer_size);
+	return ((RSDT->length - sizeof (struct acpi_table_header)) / pointer_size);
 }
 
 
@@ -91,11 +91,11 @@
 
 acpi_status
 acpi_tb_convert_to_xsdt (
-	acpi_table_desc         *table_info)
+	struct acpi_table_desc          *table_info)
 {
-	acpi_size               table_size;
-	u32                     i;
-	xsdt_descriptor         *new_table;
+	acpi_size                       table_size;
+	u32                             i;
+	XSDT_DESCRIPTOR         *new_table;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -104,7 +104,7 @@
 	/* Compute size of the converted XSDT */
 
 	table_size = ((acpi_size) acpi_gbl_rsdt_table_count * sizeof (u64)) +
-			  sizeof (acpi_table_header);
+			  sizeof (struct acpi_table_header);
 
 	/* Allocate an XSDT */
 
@@ -115,7 +115,7 @@
 
 	/* Copy the header and set the length */
 
-	ACPI_MEMCPY (new_table, table_info->pointer, sizeof (acpi_table_header));
+	ACPI_MEMCPY (new_table, table_info->pointer, sizeof (struct acpi_table_header));
 	new_table->header.length = (u32) table_size;
 
 	/* Copy the table pointers */
@@ -123,11 +123,11 @@
 	for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
 		if (acpi_gbl_RSDP->revision < 2) {
 			ACPI_STORE_ADDRESS (new_table->table_offset_entry[i],
-				((RSDT_DESCRIPTOR_REV1 *) table_info->pointer)->table_offset_entry[i]);
+				((struct rsdt_descriptor_rev1 *) table_info->pointer)->table_offset_entry[i]);
 		}
 		else {
 			new_table->table_offset_entry[i] =
-				((xsdt_descriptor *) table_info->pointer)->table_offset_entry[i];
+				((XSDT_DESCRIPTOR *) table_info->pointer)->table_offset_entry[i];
 		}
 	}
 
@@ -137,7 +137,7 @@
 
 	/* Point the table descriptor to the new table */
 
-	table_info->pointer     = (acpi_table_header *) new_table;
+	table_info->pointer     = (struct acpi_table_header *) new_table;
 	table_info->length      = table_size;
 	table_info->allocation  = ACPI_MEM_ALLOCATED;
 
@@ -160,8 +160,8 @@
 
 static void
 acpi_tb_convert_fadt1 (
-	fadt_descriptor_rev2   *local_fadt,
-	fadt_descriptor_rev1   *original_fadt)
+	struct fadt_descriptor_rev2    *local_fadt,
+	struct fadt_descriptor_rev1    *original_fadt)
 {
 
 
@@ -174,7 +174,7 @@
 	 * The 2.0 table is an extension of the 1.0 table, so the entire 1.0
 	 * table can be copied first, then expand some fields to 64 bits.
 	 */
-	ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev1));
+	ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev1));
 
 	/* Convert table pointers to 64-bit fields */
 
@@ -242,13 +242,13 @@
 
 static void
 acpi_tb_convert_fadt2 (
-	fadt_descriptor_rev2   *local_fadt,
-	fadt_descriptor_rev2   *original_fadt)
+	struct fadt_descriptor_rev2    *local_fadt,
+	struct fadt_descriptor_rev2    *original_fadt)
 {
 
 	/* We have an ACPI 2.0 FADT but we must copy it to our local buffer */
 
-	ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev2));
+	ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev2));
 
 	/*
 	 * "X" fields are optional extensions to the original V1.0 fields, so
@@ -323,8 +323,8 @@
 acpi_status
 acpi_tb_convert_table_fadt (void)
 {
-	fadt_descriptor_rev2   *local_fadt;
-	acpi_table_desc        *table_desc;
+	struct fadt_descriptor_rev2    *local_fadt;
+	struct acpi_table_desc         *table_desc;
 
 
 	ACPI_FUNCTION_TRACE ("tb_convert_table_fadt");
@@ -334,7 +334,7 @@
 	 * acpi_gbl_FADT is valid
 	 * Allocate and zero the 2.0 FADT buffer
 	 */
-	local_fadt = ACPI_MEM_CALLOCATE (sizeof (fadt_descriptor_rev2));
+	local_fadt = ACPI_MEM_CALLOCATE (sizeof (struct fadt_descriptor_rev2));
 	if (local_fadt == NULL) {
 		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
@@ -343,13 +343,13 @@
 	 * FADT length and version validation.  The table must be at least as
 	 * long as the version 1.0 FADT
 	 */
-	if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev1)) {
+	if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev1)) {
 		ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->header.length));
 		return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
 	}
 
 	if (acpi_gbl_FADT->header.revision >= FADT2_REVISION_ID) {
-		if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev2)) {
+		if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev2)) {
 			/* Length is too short to be a V2.0 table */
 
 			ACPI_REPORT_WARNING (("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n",
@@ -382,9 +382,9 @@
 
 	/* Install the new table */
 
-	table_desc->pointer     = (acpi_table_header *) acpi_gbl_FADT;
+	table_desc->pointer     = (struct acpi_table_header *) acpi_gbl_FADT;
 	table_desc->allocation  = ACPI_MEM_ALLOCATED;
-	table_desc->length      = sizeof (fadt_descriptor_rev2);
+	table_desc->length      = sizeof (struct fadt_descriptor_rev2);
 
 	/* Dump the entire FADT */
 
@@ -412,7 +412,7 @@
 
 acpi_status
 acpi_tb_build_common_facs (
-	acpi_table_desc         *table_info)
+	struct acpi_table_desc          *table_info)
 {
 
 	ACPI_FUNCTION_TRACE ("tb_build_common_facs");
diff -Nru a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c
--- a/drivers/acpi/tables/tbget.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbget.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
 
 acpi_status
 acpi_tb_get_table (
-	acpi_pointer            *address,
-	acpi_table_desc         *table_info)
+	struct acpi_pointer             *address,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_status             status;
-	acpi_table_header       header;
+	acpi_status                     status;
+	struct acpi_table_header        header;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_table");
@@ -97,11 +97,11 @@
 
 acpi_status
 acpi_tb_get_table_header (
-	acpi_pointer            *address,
-	acpi_table_header       *return_header)
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *return_header)
 {
-	acpi_status             status = AE_OK;
-	acpi_table_header       *header = NULL;
+	acpi_status                     status = AE_OK;
+	struct acpi_table_header        *header = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_table_header");
@@ -117,7 +117,7 @@
 
 		/* Pointer matches processor mode, copy the header */
 
-		ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (acpi_table_header));
+		ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (struct acpi_table_header));
 		break;
 
 
@@ -125,20 +125,20 @@
 
 		/* Create a logical address for the physical pointer*/
 
-		status = acpi_os_map_memory (address->pointer.physical, sizeof (acpi_table_header),
+		status = acpi_os_map_memory (address->pointer.physical, sizeof (struct acpi_table_header),
 				  (void **) &header);
 		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
 				ACPI_HIDWORD (address->pointer.physical),
 				ACPI_LODWORD (address->pointer.physical),
-				sizeof (acpi_table_header)));
+				sizeof (struct acpi_table_header)));
 			return_ACPI_STATUS (status);
 		}
 
 		/* Copy header and delete mapping */
 
-		ACPI_MEMCPY (return_header, header, sizeof (acpi_table_header));
-		acpi_os_unmap_memory (header, sizeof (acpi_table_header));
+		ACPI_MEMCPY (return_header, header, sizeof (struct acpi_table_header));
+		acpi_os_unmap_memory (header, sizeof (struct acpi_table_header));
 		break;
 
 
@@ -175,11 +175,11 @@
 
 acpi_status
 acpi_tb_get_table_body (
-	acpi_pointer            *address,
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info)
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_table_body");
@@ -222,12 +222,12 @@
 
 acpi_status
 acpi_tb_table_override (
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info)
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_table_header       *new_table;
-	acpi_status             status;
-	acpi_pointer            address;
+	struct acpi_table_header        *new_table;
+	acpi_status                     status;
+	struct acpi_pointer             address;
 
 
 	ACPI_FUNCTION_TRACE ("tb_table_override");
@@ -296,13 +296,13 @@
 
 acpi_status
 acpi_tb_get_this_table (
-	acpi_pointer            *address,
-	acpi_table_header       *header,
-	acpi_table_desc         *table_info)
+	struct acpi_pointer             *address,
+	struct acpi_table_header        *header,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_table_header       *full_table = NULL;
-	u8                      allocation;
-	acpi_status             status = AE_OK;
+	struct acpi_table_header        *full_table = NULL;
+	u8                              allocation;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_this_table");
@@ -413,12 +413,12 @@
 
 acpi_status
 acpi_tb_get_table_ptr (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_table_header       **table_ptr_loc)
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_table_header        **table_ptr_loc)
 {
-	acpi_table_desc         *table_desc;
-	u32                     i;
+	struct acpi_table_desc          *table_desc;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_table_ptr");
diff -Nru a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
--- a/drivers/acpi/tables/tbgetall.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbgetall.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
 
 acpi_status
 acpi_tb_get_primary_table (
-	acpi_pointer            *address,
-	acpi_table_desc         *table_info)
+	struct acpi_pointer             *address,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_status             status;
-	acpi_table_header       header;
+	acpi_status                     status;
+	struct acpi_table_header        header;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_primary_table");
@@ -72,7 +72,7 @@
 
 	/* Clear the table_info */
 
-	ACPI_MEMSET (table_info, 0, sizeof (acpi_table_desc));
+	ACPI_MEMSET (table_info, 0, sizeof (struct acpi_table_desc));
 
 	/*
 	 * Check the table signature and make sure it is recognized.
@@ -113,12 +113,12 @@
 
 acpi_status
 acpi_tb_get_secondary_table (
-	acpi_pointer            *address,
-	acpi_string             signature,
-	acpi_table_desc         *table_info)
+	struct acpi_pointer             *address,
+	acpi_string                     signature,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_status             status;
-	acpi_table_header       header;
+	acpi_status                     status;
+	struct acpi_table_header        header;
 
 
 	ACPI_FUNCTION_TRACE_STR ("tb_get_secondary_table", signature);
@@ -186,10 +186,10 @@
 acpi_tb_get_required_tables (
 	void)
 {
-	acpi_status             status = AE_OK;
-	u32                     i;
-	acpi_table_desc         table_info;
-	acpi_pointer            address;
+	acpi_status                     status = AE_OK;
+	u32                             i;
+	struct acpi_table_desc          table_info;
+	struct acpi_pointer             address;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_required_tables");
diff -Nru a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
--- a/drivers/acpi/tables/tbinstal.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbinstal.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
 
 acpi_status
 acpi_tb_match_signature (
-	char                    *signature,
-	acpi_table_desc         *table_info,
-	u8                      search_type)
+	char                            *signature,
+	struct acpi_table_desc          *table_info,
+	u8                              search_type)
 {
-	acpi_native_uint        i;
+	acpi_native_uint                i;
 
 
 	ACPI_FUNCTION_TRACE ("tb_match_signature");
@@ -105,9 +105,9 @@
 
 acpi_status
 acpi_tb_install_table (
-	acpi_table_desc         *table_info)
+	struct acpi_table_desc          *table_info)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 	ACPI_FUNCTION_TRACE ("tb_install_table");
 
@@ -159,11 +159,11 @@
 
 acpi_status
 acpi_tb_recognize_table (
-	acpi_table_desc         *table_info,
-	u8                      search_type)
+	struct acpi_table_desc          *table_info,
+	u8                              search_type)
 {
-	acpi_table_header       *table_header;
-	acpi_status             status;
+	struct acpi_table_header        *table_header;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("tb_recognize_table");
@@ -171,7 +171,7 @@
 
 	/* Ensure that we have a valid table pointer */
 
-	table_header = (acpi_table_header *) table_info->pointer;
+	table_header = (struct acpi_table_header *) table_info->pointer;
 	if (!table_header) {
 		return_ACPI_STATUS (AE_BAD_PARAMETER);
 	}
@@ -217,11 +217,11 @@
 
 acpi_status
 acpi_tb_init_table_descriptor (
-	acpi_table_type         table_type,
-	acpi_table_desc         *table_info)
+	acpi_table_type                 table_type,
+	struct acpi_table_desc          *table_info)
 {
-	acpi_table_desc         *list_head;
-	acpi_table_desc         *table_desc;
+	struct acpi_table_desc          *list_head;
+	struct acpi_table_desc          *table_desc;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("tb_init_table_descriptor", table_type);
@@ -256,7 +256,7 @@
 		 * the new table in to the list of tables of this type.
 		 */
 		if (list_head->pointer) {
-			table_desc = ACPI_MEM_CALLOCATE (sizeof (acpi_table_desc));
+			table_desc = ACPI_MEM_CALLOCATE (sizeof (struct acpi_table_desc));
 			if (!table_desc) {
 				return_ACPI_STATUS (AE_NO_MEMORY);
 			}
@@ -289,7 +289,7 @@
 	table_desc->allocation          = table_info->allocation;
 	table_desc->aml_start           = (u8 *) (table_desc->pointer + 1),
 	table_desc->aml_length          = (u32) (table_desc->length -
-			 (u32) sizeof (acpi_table_header));
+			 (u32) sizeof (struct acpi_table_header));
 	table_desc->table_id            = acpi_ut_allocate_owner_id (ACPI_OWNER_TYPE_TABLE);
 	table_desc->loaded_into_namespace = FALSE;
 
@@ -325,7 +325,7 @@
 void
 acpi_tb_delete_acpi_tables (void)
 {
-	acpi_table_type             type;
+	acpi_table_type                     type;
 
 
 	/*
@@ -353,7 +353,7 @@
 
 void
 acpi_tb_delete_acpi_table (
-	acpi_table_type             type)
+	acpi_table_type                     type)
 {
 
 	ACPI_FUNCTION_TRACE_U32 ("tb_delete_acpi_table", type);
@@ -420,11 +420,11 @@
 
 void
 acpi_tb_free_acpi_tables_of_type (
-	acpi_table_desc         *list_head)
+	struct acpi_table_desc          *list_head)
 {
-	acpi_table_desc         *table_desc;
-	u32                     count;
-	u32                     i;
+	struct acpi_table_desc          *table_desc;
+	u32                             count;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("tb_free_acpi_tables_of_type", list_head);
@@ -462,7 +462,7 @@
 
 void
 acpi_tb_delete_single_table (
-	acpi_table_desc         *table_desc)
+	struct acpi_table_desc          *table_desc)
 {
 
 	if (!table_desc) {
@@ -507,11 +507,11 @@
  *
  ******************************************************************************/
 
-acpi_table_desc *
+struct acpi_table_desc *
 acpi_tb_uninstall_table (
-	acpi_table_desc         *table_desc)
+	struct acpi_table_desc          *table_desc)
 {
-	acpi_table_desc         *next_desc;
+	struct acpi_table_desc          *next_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("acpi_tb_uninstall_table", table_desc);
diff -Nru a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
--- a/drivers/acpi/tables/tbrsdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbrsdt.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,11 +45,11 @@
 
 acpi_status
 acpi_tb_verify_rsdp (
-	acpi_pointer            *address)
+	struct acpi_pointer             *address)
 {
-	acpi_table_desc         table_info;
-	acpi_status             status;
-	rsdp_descriptor         *rsdp;
+	struct acpi_table_desc          table_info;
+	acpi_status                     status;
+	struct rsdp_descriptor          *rsdp;
 
 
 	ACPI_FUNCTION_TRACE ("tb_verify_rsdp");
@@ -65,7 +65,7 @@
 		/*
 		 * Obtain access to the RSDP structure
 		 */
-		status = acpi_os_map_memory (address->pointer.physical, sizeof (rsdp_descriptor),
+		status = acpi_os_map_memory (address->pointer.physical, sizeof (struct rsdp_descriptor),
 				  (void **) &rsdp);
 		if (ACPI_FAILURE (status)) {
 			return_ACPI_STATUS (status);
@@ -104,8 +104,8 @@
 
 	/* The RSDP supplied is OK */
 
-	table_info.pointer     = ACPI_CAST_PTR (acpi_table_header, rsdp);
-	table_info.length      = sizeof (rsdp_descriptor);
+	table_info.pointer     = ACPI_CAST_PTR (struct acpi_table_header, rsdp);
+	table_info.length      = sizeof (struct rsdp_descriptor);
 	table_info.allocation  = ACPI_MEM_MAPPED;
 
 	/* Save the table pointers and allocation info */
@@ -117,7 +117,7 @@
 
 	/* Save the RSDP in a global for easy access */
 
-	acpi_gbl_RSDP = ACPI_CAST_PTR (rsdp_descriptor, table_info.pointer);
+	acpi_gbl_RSDP = ACPI_CAST_PTR (struct rsdp_descriptor, table_info.pointer);
 	return_ACPI_STATUS (status);
 
 
@@ -125,7 +125,7 @@
 cleanup:
 
 	if (acpi_gbl_table_flags & ACPI_PHYSICAL_POINTER) {
-		acpi_os_unmap_memory (rsdp, sizeof (rsdp_descriptor));
+		acpi_os_unmap_memory (rsdp, sizeof (struct rsdp_descriptor));
 	}
 	return_ACPI_STATUS (status);
 }
@@ -146,7 +146,7 @@
 
 void
 acpi_tb_get_rsdt_address (
-	acpi_pointer            *out_address)
+	struct acpi_pointer             *out_address)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -181,9 +181,9 @@
 
 acpi_status
 acpi_tb_validate_rsdt (
-	acpi_table_header       *table_ptr)
+	struct acpi_table_header        *table_ptr)
 {
-	int                     no_match;
+	int                             no_match;
 
 
 	ACPI_FUNCTION_NAME ("tb_validate_rsdt");
@@ -237,9 +237,9 @@
 acpi_tb_get_table_rsdt (
 	void)
 {
-	acpi_table_desc         table_info;
-	acpi_status             status;
-	acpi_pointer            address;
+	struct acpi_table_desc          table_info;
+	acpi_status                     status;
+	struct acpi_pointer             address;
 
 
 	ACPI_FUNCTION_TRACE ("tb_get_table_rsdt");
@@ -287,7 +287,7 @@
 		return_ACPI_STATUS (status);
 	}
 
-	acpi_gbl_XSDT = (xsdt_descriptor *) table_info.pointer;
+	acpi_gbl_XSDT = (XSDT_DESCRIPTOR *) table_info.pointer;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "XSDT located at %p\n", acpi_gbl_XSDT));
 	return_ACPI_STATUS (status);
diff -Nru a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
--- a/drivers/acpi/tables/tbutils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbutils.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
 
 acpi_status
 acpi_tb_handle_to_object (
-	u16                     table_id,
-	acpi_table_desc         **table_desc)
+	u16                             table_id,
+	struct acpi_table_desc          **table_desc)
 {
-	u32                     i;
-	acpi_table_desc         *list_head;
+	u32                             i;
+	struct acpi_table_desc          *list_head;
 
 
 	ACPI_FUNCTION_NAME ("tb_handle_to_object");
@@ -96,9 +96,9 @@
 
 acpi_status
 acpi_tb_validate_table_header (
-	acpi_table_header       *table_header)
+	struct acpi_table_header        *table_header)
 {
-	acpi_name               signature;
+	acpi_name                       signature;
 
 
 	ACPI_FUNCTION_NAME ("tb_validate_table_header");
@@ -106,7 +106,7 @@
 
 	/* Verify that this is a valid address */
 
-	if (!acpi_os_readable (table_header, sizeof (acpi_table_header))) {
+	if (!acpi_os_readable (table_header, sizeof (struct acpi_table_header))) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Cannot read table header at %p\n", table_header));
 		return (AE_BAD_ADDRESS);
@@ -122,20 +122,20 @@
 
 		ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n",
 			(char *) &signature));
-		ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+		ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
 		return (AE_BAD_SIGNATURE);
 	}
 
 	/* Validate the table length */
 
-	if (table_header->length < sizeof (acpi_table_header)) {
+	if (table_header->length < sizeof (struct acpi_table_header)) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
 			"Invalid length in table header %p name %4.4s\n",
 			table_header, (char *) &signature));
 
 		ACPI_REPORT_WARNING (("Invalid table header length (0x%X) found\n",
 			(u32) table_header->length));
-		ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+		ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
 		return (AE_BAD_HEADER);
 	}
 
@@ -158,10 +158,10 @@
 
 acpi_status
 acpi_tb_verify_table_checksum (
-	acpi_table_header       *table_header)
+	struct acpi_table_header        *table_header)
 {
-	u8                      checksum;
-	acpi_status             status = AE_OK;
+	u8                              checksum;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("tb_verify_table_checksum");
@@ -198,12 +198,12 @@
 
 u8
 acpi_tb_checksum (
-	void                    *buffer,
-	u32                     length)
+	void                            *buffer,
+	u32                             length)
 {
-	const u8                *limit;
-	const u8                *rover;
-	u8                      sum = 0;
+	const u8                        *limit;
+	const u8                        *rover;
+	u8                              sum = 0;
 
 
 	if (buffer && length) {
diff -Nru a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
--- a/drivers/acpi/tables/tbxface.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbxface.c	Fri Jan 10 12:12:38 2003
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,8 +49,8 @@
 acpi_status
 acpi_load_tables (void)
 {
-	acpi_pointer            rsdp_address;
-	acpi_status             status;
+	struct acpi_pointer             rsdp_address;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_load_tables");
@@ -136,11 +136,11 @@
 
 acpi_status
 acpi_load_table (
-	acpi_table_header       *table_ptr)
+	struct acpi_table_header        *table_ptr)
 {
-	acpi_status             status;
-	acpi_table_desc         table_info;
-	acpi_pointer            address;
+	acpi_status                     status;
+	struct acpi_table_desc          table_info;
+	struct acpi_pointer             address;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_load_table");
@@ -214,9 +214,9 @@
 
 acpi_status
 acpi_unload_table (
-	acpi_table_type         table_type)
+	acpi_table_type                 table_type)
 {
-	acpi_table_desc         *list_head;
+	struct acpi_table_desc          *list_head;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_unload_table");
@@ -259,11 +259,11 @@
  *              Instance        - the non zero instance of the table, allows
  *                                support for multiple tables of the same type
  *                                see acpi_gbl_acpi_table_flag
- *              out_table_header - pointer to the acpi_table_header if successful
+ *              out_table_header - pointer to the struct acpi_table_header if successful
  *
  * DESCRIPTION: This function is called to get an ACPI table header.  The caller
  *              supplies an pointer to a data area sufficient to contain an ACPI
- *              acpi_table_header structure.
+ *              struct acpi_table_header structure.
  *
  *              The header contains a length field that can be used to determine
  *              the size of the buffer needed to contain the entire table.  This
@@ -274,12 +274,12 @@
 
 acpi_status
 acpi_get_table_header (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_table_header       *out_table_header)
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_table_header        *out_table_header)
 {
-	acpi_table_header       *tbl_ptr;
-	acpi_status             status;
+	struct acpi_table_header        *tbl_ptr;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_table_header");
@@ -318,7 +318,7 @@
 	 * Copy the header to the caller's buffer
 	 */
 	ACPI_MEMCPY ((void *) out_table_header, (void *) tbl_ptr,
-			 sizeof (acpi_table_header));
+			 sizeof (struct acpi_table_header));
 
 	return_ACPI_STATUS (status);
 }
@@ -349,13 +349,13 @@
 
 acpi_status
 acpi_get_table (
-	acpi_table_type         table_type,
-	u32                     instance,
-	acpi_buffer             *ret_buffer)
+	acpi_table_type                 table_type,
+	u32                             instance,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_table_header       *tbl_ptr;
-	acpi_status             status;
-	acpi_size               table_length;
+	struct acpi_table_header        *tbl_ptr;
+	acpi_status                     status;
+	acpi_size                       table_length;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_table");
@@ -402,7 +402,7 @@
 		/*
 		 *  RSD PTR is the only "table" without a header
 		 */
-		table_length = sizeof (rsdp_descriptor);
+		table_length = sizeof (struct rsdp_descriptor);
 	}
 	else {
 		table_length = (acpi_size) tbl_ptr->length;
diff -Nru a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c
--- a/drivers/acpi/tables/tbxfroot.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/tables/tbxfroot.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,13 +48,13 @@
 
 acpi_status
 acpi_tb_find_table (
-	char                    *signature,
-	char                    *oem_id,
-	char                    *oem_table_id,
-	acpi_table_header       **table_ptr)
+	char                            *signature,
+	char                            *oem_id,
+	char                            *oem_table_id,
+	struct acpi_table_header        **table_ptr)
 {
-	acpi_status             status;
-	acpi_table_header       *table;
+	acpi_status                     status;
+	struct acpi_table_header        *table;
 
 
 	ACPI_FUNCTION_TRACE ("tb_find_table");
@@ -112,20 +112,20 @@
 
 acpi_status
 acpi_get_firmware_table (
-	acpi_string             signature,
-	u32                     instance,
-	u32                     flags,
-	acpi_table_header       **table_pointer)
+	acpi_string                     signature,
+	u32                             instance,
+	u32                             flags,
+	struct acpi_table_header        **table_pointer)
 {
-	acpi_pointer            rsdp_address;
-	acpi_pointer            address;
-	acpi_status             status;
-	acpi_table_header       header;
-	acpi_table_desc         table_info;
-	acpi_table_desc         rsdt_info;
-	u32                     table_count;
-	u32                     i;
-	u32                     j;
+	struct acpi_pointer             rsdp_address;
+	struct acpi_pointer             address;
+	acpi_status                     status;
+	struct acpi_table_header        header;
+	struct acpi_table_desc          table_info;
+	struct acpi_table_desc          rsdt_info;
+	u32                             table_count;
+	u32                             i;
+	u32                             j;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_firmware_table");
@@ -159,7 +159,7 @@
 		/* Map and validate the RSDP */
 
 		if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) {
-			status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (rsdp_descriptor),
+			status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (struct rsdp_descriptor),
 					  (void **) &acpi_gbl_RSDP);
 			if (ACPI_FAILURE (status)) {
 				return_ACPI_STATUS (status);
@@ -227,7 +227,7 @@
 		}
 		else {
 			address.pointer.value =
-				((xsdt_descriptor *) rsdt_info.pointer)->table_offset_entry[i];
+				((XSDT_DESCRIPTOR *) rsdt_info.pointer)->table_offset_entry[i];
 		}
 
 		/* Get the table header */
@@ -287,11 +287,11 @@
 
 acpi_status
 acpi_find_root_pointer (
-	u32                     flags,
-	acpi_pointer            *rsdp_address)
+	u32                             flags,
+	struct acpi_pointer             *rsdp_address)
 {
-	acpi_table_desc         table_info;
-	acpi_status             status;
+	struct acpi_table_desc          table_info;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_find_root_pointer");
@@ -327,11 +327,11 @@
 
 u8 *
 acpi_tb_scan_memory_for_rsdp (
-	u8                      *start_address,
-	u32                     length)
+	u8                              *start_address,
+	u32                             length)
 {
-	u32                     offset;
-	u8                      *mem_rover;
+	u32                             offset;
+	u8                              *mem_rover;
 
 
 	ACPI_FUNCTION_TRACE ("tb_scan_memory_for_rsdp");
@@ -384,13 +384,13 @@
 
 acpi_status
 acpi_tb_find_rsdp (
-	acpi_table_desc         *table_info,
-	u32                     flags)
+	struct acpi_table_desc          *table_info,
+	u32                             flags)
 {
-	u8                      *table_ptr;
-	u8                      *mem_rover;
-	u64                     phys_addr;
-	acpi_status             status = AE_OK;
+	u8                              *table_ptr;
+	u8                              *mem_rover;
+	u64                             phys_addr;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("tb_find_rsdp");
diff -Nru a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
--- a/drivers/acpi/thermal.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/thermal.c	Fri Jan 10 12:12:38 2003
@@ -270,8 +270,8 @@
 	int			mode)
 {
 	acpi_status		status = AE_OK;
-	acpi_object		arg0 = {ACPI_TYPE_INTEGER};
-	acpi_object_list	arg_list= {1, &arg0};
+	union acpi_object	arg0 = {ACPI_TYPE_INTEGER};
+	struct acpi_object_list	arg_list = {1, &arg0};
 	acpi_handle		handle = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode");
diff -Nru a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
--- a/drivers/acpi/toshiba_acpi.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/toshiba_acpi.c	Fri Jan 10 12:12:37 2003
@@ -174,8 +174,8 @@
 static int
 write_acpi_int(const char* methodName, int val)
 {
-	acpi_object_list params;
-	acpi_object in_objs[1];
+	struct acpi_object_list params;
+	union acpi_object in_objs[1];
 	acpi_status status;
 
 	params.count = sizeof(in_objs)/sizeof(in_objs[0]);
@@ -211,10 +211,10 @@
 static acpi_status
 hci_raw(const u32 in[HCI_WORDS], u32 out[HCI_WORDS])
 {
-	acpi_object_list params;
-	acpi_object in_objs[HCI_WORDS];
-	acpi_buffer results;
-	acpi_object out_objs[HCI_WORDS+1];
+	struct acpi_object_list params;
+	union acpi_object in_objs[HCI_WORDS];
+	struct acpi_buffer results;
+	union acpi_object out_objs[HCI_WORDS+1];
 	acpi_status status;
 	int i;
 
diff -Nru a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
--- a/drivers/acpi/utilities/utalloc.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utalloc.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,10 +45,10 @@
 
 void
 acpi_ut_release_to_cache (
-	u32                     list_id,
-	void                    *object)
+	u32                             list_id,
+	void                            *object)
 {
-	acpi_memory_list        *cache_info;
+	struct acpi_memory_list         *cache_info;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -101,10 +101,10 @@
 
 void *
 acpi_ut_acquire_from_cache (
-	u32                     list_id)
+	u32                             list_id)
 {
-	acpi_memory_list        *cache_info;
-	void                    *object;
+	struct acpi_memory_list         *cache_info;
+	void                            *object;
 
 
 	ACPI_FUNCTION_NAME ("ut_acquire_from_cache");
@@ -173,10 +173,10 @@
 
 void
 acpi_ut_delete_generic_cache (
-	u32                     list_id)
+	u32                             list_id)
 {
-	acpi_memory_list        *cache_info;
-	char                    *next;
+	struct acpi_memory_list         *cache_info;
+	char                            *next;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -203,13 +203,13 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Perform parameter validation checks on an acpi_buffer
+ * DESCRIPTION: Perform parameter validation checks on an struct acpi_buffer
  *
  ******************************************************************************/
 
 acpi_status
 acpi_ut_validate_buffer (
-	acpi_buffer             *buffer)
+	struct acpi_buffer              *buffer)
 {
 
 	/* Obviously, the structure pointer must be valid */
@@ -252,10 +252,10 @@
 
 acpi_status
 acpi_ut_initialize_buffer (
-	acpi_buffer             *buffer,
-	acpi_size               required_length)
+	struct acpi_buffer              *buffer,
+	acpi_size                       required_length)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	switch (buffer->length) {
@@ -329,12 +329,12 @@
 
 void *
 acpi_ut_allocate (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	void                    *allocation;
+	void                            *allocation;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ut_allocate", size);
@@ -379,12 +379,12 @@
 
 void *
 acpi_ut_callocate (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	void                    *allocation;
+	void                            *allocation;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ut_callocate", size);
@@ -444,16 +444,16 @@
 
 void *
 acpi_ut_allocate_and_track (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	acpi_debug_mem_block    *allocation;
-	acpi_status             status;
+	struct acpi_debug_mem_block     *allocation;
+	acpi_status                     status;
 
 
-	allocation = acpi_ut_allocate (size + sizeof (acpi_debug_mem_block), component,
+	allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_block), component,
 			  module, line);
 	if (!allocation) {
 		return (NULL);
@@ -490,16 +490,16 @@
 
 void *
 acpi_ut_callocate_and_track (
-	acpi_size               size,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	acpi_size                       size,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	acpi_debug_mem_block    *allocation;
-	acpi_status             status;
+	struct acpi_debug_mem_block     *allocation;
+	acpi_status                     status;
 
 
-	allocation = acpi_ut_callocate (size + sizeof (acpi_debug_mem_block), component,
+	allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_block), component,
 			  module, line);
 	if (!allocation) {
 		/* Report allocation error */
@@ -540,13 +540,13 @@
 
 void
 acpi_ut_free_and_track (
-	void                    *allocation,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	void                            *allocation,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	acpi_debug_mem_block    *debug_block;
-	acpi_status             status;
+	struct acpi_debug_mem_block     *debug_block;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_free", allocation);
@@ -559,8 +559,8 @@
 		return_VOID;
 	}
 
-	debug_block = ACPI_CAST_PTR (acpi_debug_mem_block,
-			  (((char *) allocation) - sizeof (acpi_debug_mem_header)));
+	debug_block = ACPI_CAST_PTR (struct acpi_debug_mem_block,
+			  (((char *) allocation) - sizeof (struct acpi_debug_mem_header)));
 
 	acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].total_freed++;
 	acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].current_total_size -= debug_block->size;
@@ -592,12 +592,12 @@
  *
  ******************************************************************************/
 
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
 acpi_ut_find_allocation (
-	u32                     list_id,
-	void                    *allocation)
+	u32                             list_id,
+	void                            *allocation)
 {
-	acpi_debug_mem_block    *element;
+	struct acpi_debug_mem_block     *element;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -642,17 +642,17 @@
 
 acpi_status
 acpi_ut_track_allocation (
-	u32                     list_id,
-	acpi_debug_mem_block    *allocation,
-	acpi_size               size,
-	u8                      alloc_type,
-	u32                     component,
-	char                    *module,
-	u32                     line)
-{
-	acpi_memory_list        *mem_list;
-	acpi_debug_mem_block    *element;
-	acpi_status             status = AE_OK;
+	u32                             list_id,
+	struct acpi_debug_mem_block     *allocation,
+	acpi_size                       size,
+	u8                              alloc_type,
+	u32                             component,
+	char                            *module,
+	u32                             line)
+{
+	struct acpi_memory_list         *mem_list;
+	struct acpi_debug_mem_block     *element;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_track_allocation", allocation);
@@ -695,7 +695,7 @@
 	/* Insert at list head */
 
 	if (mem_list->list_head) {
-		((acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
+		((struct acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
 	}
 
 	allocation->next = mem_list->list_head;
@@ -727,14 +727,14 @@
 
 acpi_status
 acpi_ut_remove_allocation (
-	u32                     list_id,
-	acpi_debug_mem_block    *allocation,
-	u32                     component,
-	char                    *module,
-	u32                     line)
+	u32                             list_id,
+	struct acpi_debug_mem_block     *allocation,
+	u32                             component,
+	char                            *module,
+	u32                             line)
 {
-	acpi_memory_list        *mem_list;
-	acpi_status             status;
+	struct acpi_memory_list         *mem_list;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_remove_allocation");
@@ -800,7 +800,7 @@
 	void)
 {
 /*
-	acpi_memory_list        *mem_list;
+	struct acpi_memory_list         *mem_list;
 */
 
 	ACPI_FUNCTION_TRACE ("ut_dump_allocation_info");
@@ -836,7 +836,7 @@
 	ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
 			  ("%30s: %4d (%3d Kb)\n", "Max Nodes",
 			  acpi_gbl_max_concurrent_node_count,
-			  ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (acpi_namespace_node)))));
+			  ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (struct acpi_namespace_node)))));
 */
 	return_VOID;
 }
@@ -857,12 +857,12 @@
 
 void
 acpi_ut_dump_allocations (
-	u32                     component,
-	char                    *module)
+	u32                             component,
+	char                            *module)
 {
-	acpi_debug_mem_block    *element;
-	acpi_descriptor         *descriptor;
-	u32                     num_outstanding = 0;
+	struct acpi_debug_mem_block     *element;
+	union acpi_descriptor           *descriptor;
+	u32                             num_outstanding = 0;
 
 
 	ACPI_FUNCTION_TRACE ("ut_dump_allocations");
@@ -881,7 +881,7 @@
 			((module == NULL) || (0 == ACPI_STRCMP (module, element->module)))) {
 			/* Ignore allocated objects that are in a cache */
 
-			descriptor = ACPI_CAST_PTR (acpi_descriptor, &element->user_space);
+			descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space);
 			if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) {
 				acpi_os_printf ("%p Len %04X %9.9s-%d ",
 						 descriptor, element->size, element->module,
diff -Nru a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
--- a/drivers/acpi/utilities/utcopy.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utcopy.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
 
 static acpi_status
 acpi_ut_copy_isimple_to_esimple (
-	acpi_operand_object     *internal_object,
-	acpi_object             *external_object,
-	u8                      *data_space,
-	acpi_size               *buffer_space_used)
+	union acpi_operand_object       *internal_object,
+	union acpi_object               *external_object,
+	u8                              *data_space,
+	acpi_size                       *buffer_space_used)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_isimple_to_esimple");
@@ -73,7 +73,7 @@
 
 	/* Always clear the external object */
 
-	ACPI_MEMSET (external_object, 0, sizeof (acpi_object));
+	ACPI_MEMSET (external_object, 0, sizeof (union acpi_object));
 
 	/*
 	 * In general, the external object will be the same type as
@@ -177,24 +177,24 @@
 
 acpi_status
 acpi_ut_copy_ielement_to_eelement (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context)
-{
-	acpi_status             status = AE_OK;
-	acpi_pkg_info           *info = (acpi_pkg_info *) context;
-	acpi_size               object_space;
-	u32                     this_index;
-	acpi_object             *target_object;
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context)
+{
+	acpi_status                     status = AE_OK;
+	struct acpi_pkg_info            *info = (struct acpi_pkg_info *) context;
+	acpi_size                       object_space;
+	u32                             this_index;
+	union acpi_object               *target_object;
 
 
 	ACPI_FUNCTION_ENTRY ();
 
 
 	this_index   = state->pkg.index;
-	target_object = (acpi_object *)
-			  &((acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
+	target_object = (union acpi_object *)
+			  &((union acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
 
 	switch (object_type) {
 	case ACPI_COPY_TYPE_SIMPLE:
@@ -217,7 +217,7 @@
 		 */
 		target_object->type             = ACPI_TYPE_PACKAGE;
 		target_object->package.count    = source_object->package.count;
-		target_object->package.elements = ACPI_CAST_PTR (acpi_object, info->free_space);
+		target_object->package.elements = ACPI_CAST_PTR (union acpi_object, info->free_space);
 
 		/*
 		 * Pass the new package object back to the package walk routine
@@ -229,7 +229,7 @@
 		 * update the buffer length counter
 		 */
 		object_space = ACPI_ROUND_UP_TO_NATIVE_WORD (
-				   (acpi_size) target_object->package.count * sizeof (acpi_object));
+				   (acpi_size) target_object->package.count * sizeof (union acpi_object));
 		break;
 
 
@@ -264,13 +264,13 @@
 
 static acpi_status
 acpi_ut_copy_ipackage_to_epackage (
-	acpi_operand_object     *internal_object,
-	u8                      *buffer,
-	acpi_size               *space_used)
-{
-	acpi_object             *external_object;
-	acpi_status             status;
-	acpi_pkg_info           info;
+	union acpi_operand_object       *internal_object,
+	u8                              *buffer,
+	acpi_size                       *space_used)
+{
+	union acpi_object               *external_object;
+	acpi_status                     status;
+	struct acpi_pkg_info            info;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_epackage");
@@ -279,28 +279,28 @@
 	/*
 	 * First package at head of the buffer
 	 */
-	external_object = ACPI_CAST_PTR (acpi_object, buffer);
+	external_object = ACPI_CAST_PTR (union acpi_object, buffer);
 
 	/*
 	 * Free space begins right after the first package
 	 */
-	info.length      = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
-	info.free_space  = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+	info.length      = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
+	info.free_space  = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
 	info.object_space = 0;
 	info.num_packages = 1;
 
 	external_object->type            = ACPI_GET_OBJECT_TYPE (internal_object);
 	external_object->package.count   = internal_object->package.count;
-	external_object->package.elements = ACPI_CAST_PTR (acpi_object, info.free_space);
+	external_object->package.elements = ACPI_CAST_PTR (union acpi_object, info.free_space);
 
 	/*
 	 * Leave room for an array of ACPI_OBJECTS in the buffer
 	 * and move the free space past it
 	 */
 	info.length    += (acpi_size) external_object->package.count *
-			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
 	info.free_space += external_object->package.count *
-			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
 
 	status = acpi_ut_walk_package_tree (internal_object, external_object,
 			 acpi_ut_copy_ielement_to_eelement, &info);
@@ -326,10 +326,10 @@
 
 acpi_status
 acpi_ut_copy_iobject_to_eobject (
-	acpi_operand_object     *internal_object,
-	acpi_buffer             *ret_buffer)
+	union acpi_operand_object       *internal_object,
+	struct acpi_buffer              *ret_buffer)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_eobject");
@@ -348,15 +348,15 @@
 		 * Build a simple object (no nested objects)
 		 */
 		status = acpi_ut_copy_isimple_to_esimple (internal_object,
-				  (acpi_object *) ret_buffer->pointer,
+				  (union acpi_object *) ret_buffer->pointer,
 				  ((u8 *) ret_buffer->pointer +
-				  ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object))),
+				  ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object))),
 				  &ret_buffer->length);
 		/*
 		 * build simple does not include the object size in the length
 		 * so we add it in here
 		 */
-		ret_buffer->length += sizeof (acpi_object);
+		ret_buffer->length += sizeof (union acpi_object);
 	}
 
 	return_ACPI_STATUS (status);
@@ -381,10 +381,10 @@
 
 acpi_status
 acpi_ut_copy_esimple_to_isimple (
-	acpi_object             *external_object,
-	acpi_operand_object     **ret_internal_object)
+	union acpi_object               *external_object,
+	union acpi_operand_object       **ret_internal_object)
 {
-	acpi_operand_object     *internal_object;
+	union acpi_operand_object       *internal_object;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_esimple_to_isimple");
@@ -488,17 +488,17 @@
 
 static acpi_status
 acpi_ut_copy_epackage_to_ipackage (
-	acpi_operand_object     *internal_object,
-	u8                      *buffer,
-	u32                     *space_used)
-{
-	u8                      *free_space;
-	acpi_object             *external_object;
-	u32                     length = 0;
-	u32                     this_index;
-	u32                     object_space = 0;
-	acpi_operand_object     *this_internal_obj;
-	acpi_object             *this_external_obj;
+	union acpi_operand_object       *internal_object,
+	u8                              *buffer,
+	u32                             *space_used)
+{
+	u8                              *free_space;
+	union acpi_object               *external_object;
+	u32                             length = 0;
+	u32                             this_index;
+	u32                             object_space = 0;
+	union acpi_operand_object       *this_internal_obj;
+	union acpi_object               *this_external_obj;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_epackage_to_ipackage");
@@ -507,23 +507,23 @@
 	/*
 	 * First package at head of the buffer
 	 */
-	external_object = (acpi_object *)buffer;
+	external_object = (union acpi_object *)buffer;
 
 	/*
 	 * Free space begins right after the first package
 	 */
-	free_space = buffer + sizeof(acpi_object);
+	free_space = buffer + sizeof(union acpi_object);
 
 
 	external_object->type              = ACPI_GET_OBJECT_TYPE (internal_object);
 	external_object->package.count     = internal_object->package.count;
-	external_object->package.elements  = (acpi_object *)free_space;
+	external_object->package.elements  = (union acpi_object *)free_space;
 
 	/*
 	 * Build an array of ACPI_OBJECTS in the buffer
 	 * and move the free space past it
 	 */
-	free_space += external_object->package.count * sizeof(acpi_object);
+	free_space += external_object->package.count * sizeof(union acpi_object);
 
 
 	/* Call walk_package */
@@ -548,10 +548,10 @@
 
 acpi_status
 acpi_ut_copy_eobject_to_iobject (
-	acpi_object             *external_object,
-	acpi_operand_object     **internal_object)
+	union acpi_object               *external_object,
+	union acpi_operand_object       **internal_object)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_eobject_to_iobject");
@@ -594,11 +594,11 @@
 
 acpi_status
 acpi_ut_copy_simple_object (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     *dest_desc)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       *dest_desc)
 {
-	u16                     reference_count;
-	acpi_operand_object     *next_object;
+	u16                             reference_count;
+	union acpi_operand_object       *next_object;
 
 
 	/* Save fields from destination that we don't want to overwrite */
@@ -609,7 +609,7 @@
 	/* Copy the entire source object over the destination object*/
 
 	ACPI_MEMCPY ((char *) dest_desc, (char *) source_desc,
-			  sizeof (acpi_operand_object));
+			  sizeof (union acpi_operand_object));
 
 	/* Restore the saved fields */
 
@@ -685,22 +685,22 @@
 
 acpi_status
 acpi_ut_copy_ielement_to_ielement (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context)
-{
-	acpi_status             status = AE_OK;
-	u32                     this_index;
-	acpi_operand_object     **this_target_ptr;
-	acpi_operand_object     *target_object;
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context)
+{
+	acpi_status                     status = AE_OK;
+	u32                             this_index;
+	union acpi_operand_object       **this_target_ptr;
+	union acpi_operand_object       *target_object;
 
 
 	ACPI_FUNCTION_ENTRY ();
 
 
 	this_index    = state->pkg.index;
-	this_target_ptr = (acpi_operand_object **)
+	this_target_ptr = (union acpi_operand_object **)
 			   &state->pkg.dest_object->package.elements[this_index];
 
 	switch (object_type) {
@@ -794,11 +794,11 @@
 
 acpi_status
 acpi_ut_copy_ipackage_to_ipackage (
-	acpi_operand_object     *source_obj,
-	acpi_operand_object     *dest_obj,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_obj,
+	union acpi_operand_object       *dest_obj,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_ipackage");
@@ -852,11 +852,11 @@
 
 acpi_status
 acpi_ut_copy_iobject_to_iobject (
-	acpi_operand_object     *source_desc,
-	acpi_operand_object     **dest_desc,
-	acpi_walk_state         *walk_state)
+	union acpi_operand_object       *source_desc,
+	union acpi_operand_object       **dest_desc,
+	struct acpi_walk_state          *walk_state)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_iobject");
diff -Nru a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
--- a/drivers/acpi/utilities/utdebug.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utdebug.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@
 acpi_ut_init_stack_ptr_trace (
 	void)
 {
-	u32                 current_sp;
+	u32                         current_sp;
 
 
 	acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF (&current_sp, NULL);
@@ -75,7 +75,7 @@
 acpi_ut_track_stack_ptr (
 	void)
 {
-	acpi_size           current_sp;
+	acpi_size                   current_sp;
 
 
 	current_sp = ACPI_PTR_DIFF (&current_sp, NULL);
@@ -112,13 +112,13 @@
 
 void  ACPI_INTERNAL_VAR_XFACE
 acpi_ut_debug_print (
-	u32                     requested_debug_level,
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *format,
+	u32                             requested_debug_level,
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *format,
 	...)
 {
-	u32                     thread_id;
+	u32                             thread_id;
 	va_list                 args;
 
 
@@ -183,10 +183,10 @@
 
 void  ACPI_INTERNAL_VAR_XFACE
 acpi_ut_debug_print_raw (
-	u32                     requested_debug_level,
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *format,
+	u32                             requested_debug_level,
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *format,
 	...)
 {
 	va_list                 args;
@@ -221,8 +221,8 @@
 
 void
 acpi_ut_trace (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info)
 {
 
 	acpi_gbl_nesting_level++;
@@ -253,9 +253,9 @@
 
 void
 acpi_ut_trace_ptr (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	void                    *pointer)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	void                            *pointer)
 {
 	acpi_gbl_nesting_level++;
 	acpi_ut_track_stack_ptr ();
@@ -285,9 +285,9 @@
 
 void
 acpi_ut_trace_str (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	char                    *string)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	char                            *string)
 {
 
 	acpi_gbl_nesting_level++;
@@ -318,9 +318,9 @@
 
 void
 acpi_ut_trace_u32 (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	u32                     integer)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	u32                             integer)
 {
 
 	acpi_gbl_nesting_level++;
@@ -350,8 +350,8 @@
 
 void
 acpi_ut_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info)
 {
 
 	acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -381,9 +381,9 @@
 
 void
 acpi_ut_status_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	acpi_status             status)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	acpi_status                     status)
 {
 
 	if (ACPI_SUCCESS (status)) {
@@ -421,9 +421,9 @@
 
 void
 acpi_ut_value_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	acpi_integer            value)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	acpi_integer                    value)
 {
 
 	acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -454,9 +454,9 @@
 
 void
 acpi_ut_ptr_exit (
-	u32                     line_number,
-	acpi_debug_print_info   *dbg_info,
-	u8                      *ptr)
+	u32                             line_number,
+	struct acpi_debug_print_info    *dbg_info,
+	u8                              *ptr)
 {
 
 	acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -485,15 +485,15 @@
 
 void
 acpi_ut_dump_buffer (
-	u8                      *buffer,
-	u32                     count,
-	u32                     display,
-	u32                     component_id)
-{
-	acpi_native_uint        i = 0;
-	acpi_native_uint        j;
-	u32                     temp32;
-	u8                      buf_char;
+	u8                              *buffer,
+	u32                             count,
+	u32                             display,
+	u32                             component_id)
+{
+	acpi_native_uint                i = 0;
+	acpi_native_uint                j;
+	u32                             temp32;
+	u8                              buf_char;
 
 
 	/* Only dump the buffer if tracing is enabled */
diff -Nru a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
--- a/drivers/acpi/utilities/utdelete.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utdelete.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
 
 void
 acpi_ut_delete_internal_obj (
-	acpi_operand_object     *object)
+	union acpi_operand_object       *object)
 {
-	void                    *obj_pointer = NULL;
-	acpi_operand_object     *handler_desc;
-	acpi_operand_object     *second_desc;
+	void                            *obj_pointer = NULL;
+	union acpi_operand_object       *handler_desc;
+	union acpi_operand_object       *second_desc;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_delete_internal_obj", object);
@@ -217,9 +217,9 @@
 
 void
 acpi_ut_delete_internal_object_list (
-	acpi_operand_object     **obj_list)
+	union acpi_operand_object       **obj_list)
 {
-	acpi_operand_object     **internal_obj;
+	union acpi_operand_object       **internal_obj;
 
 
 	ACPI_FUNCTION_TRACE ("ut_delete_internal_object_list");
@@ -253,11 +253,11 @@
 
 static void
 acpi_ut_update_ref_count (
-	acpi_operand_object     *object,
-	u32                     action)
+	union acpi_operand_object       *object,
+	u32                             action)
 {
-	u16                     count;
-	u16                     new_count;
+	u16                             count;
+	u16                             new_count;
 
 
 	ACPI_FUNCTION_NAME ("ut_update_ref_count");
@@ -369,15 +369,15 @@
 
 acpi_status
 acpi_ut_update_object_reference (
-	acpi_operand_object     *object,
-	u16                     action)
+	union acpi_operand_object       *object,
+	u16                             action)
 {
-	acpi_status             status;
-	u32                     i;
-	acpi_operand_object     *next;
-	acpi_operand_object     *new;
-	acpi_generic_state       *state_list = NULL;
-	acpi_generic_state       *state;
+	acpi_status                     status;
+	u32                             i;
+	union acpi_operand_object       *next;
+	union acpi_operand_object       *new;
+	union acpi_generic_state         *state_list = NULL;
+	union acpi_generic_state         *state;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);
@@ -556,7 +556,7 @@
 
 void
 acpi_ut_add_reference (
-	acpi_operand_object     *object)
+	union acpi_operand_object       *object)
 {
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_add_reference", object);
@@ -591,7 +591,7 @@
 
 void
 acpi_ut_remove_reference (
-	acpi_operand_object     *object)
+	union acpi_operand_object       *object)
 {
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_remove_reference", object);
diff -Nru a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
--- a/drivers/acpi/utilities/uteval.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/utilities/uteval.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,14 +53,14 @@
 
 acpi_status
 acpi_ut_evaluate_object (
-	acpi_namespace_node     *prefix_node,
-	char                    *path,
-	u32                     expected_return_btypes,
-	acpi_operand_object     **return_desc)
+	struct acpi_namespace_node      *prefix_node,
+	char                            *path,
+	u32                             expected_return_btypes,
+	union acpi_operand_object       **return_desc)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
-	u32                     return_btype;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
+	u32                             return_btype;
 
 
 	ACPI_FUNCTION_TRACE ("ut_evaluate_object");
@@ -161,12 +161,12 @@
 
 acpi_status
 acpi_ut_evaluate_numeric_object (
-	char                    *object_name,
-	acpi_namespace_node     *device_node,
-	acpi_integer            *address)
+	char                            *object_name,
+	struct acpi_namespace_node      *device_node,
+	acpi_integer                    *address)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_evaluate_numeric_object");
@@ -207,11 +207,11 @@
 
 acpi_status
 acpi_ut_execute_HID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *hid)
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *hid)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_execute_HID");
@@ -259,11 +259,11 @@
 
 acpi_status
 acpi_ut_execute_CID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *cid)
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *cid)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_execute_CID");
@@ -333,11 +333,11 @@
 
 acpi_status
 acpi_ut_execute_UID (
-	acpi_namespace_node     *device_node,
-	acpi_device_id          *uid)
+	struct acpi_namespace_node      *device_node,
+	struct acpi_device_id           *uid)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_execute_UID");
@@ -385,11 +385,11 @@
 
 acpi_status
 acpi_ut_execute_STA (
-	acpi_namespace_node     *device_node,
-	u32                     *flags)
+	struct acpi_namespace_node      *device_node,
+	u32                             *flags)
 {
-	acpi_operand_object     *obj_desc;
-	acpi_status             status;
+	union acpi_operand_object       *obj_desc;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_execute_STA");
diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
--- a/drivers/acpi/utilities/utglobal.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/utilities/utglobal.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,10 +45,10 @@
 
 const char *
 acpi_format_exception (
-	acpi_status             status)
+	acpi_status                     status)
 {
-	const char              *exception = "UNKNOWN_STATUS_CODE";
-	acpi_status             sub_status;
+	const char                      *exception = "UNKNOWN_STATUS_CODE";
+	acpi_status                     sub_status;
 
 
 	ACPI_FUNCTION_NAME ("format_exception");
@@ -125,34 +125,34 @@
 /* Debug switch - level and trace mask */
 
 #ifdef ACPI_DEBUG_OUTPUT
-u32                         acpi_dbg_level = ACPI_DEBUG_DEFAULT;
+u32                                 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
 #else
-u32                         acpi_dbg_level = ACPI_NORMAL_DEFAULT;
+u32                                 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
 #endif
 
 /* Debug switch - layer (component) mask */
 
-u32                         acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
-u32                         acpi_gbl_nesting_level = 0;
+u32                                 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
+u32                                 acpi_gbl_nesting_level = 0;
 
 
 /* Debugger globals */
 
-u8                          acpi_gbl_db_terminate_threads = FALSE;
-u8                          acpi_gbl_abort_method = FALSE;
-u8                          acpi_gbl_method_executing = FALSE;
+u8                                  acpi_gbl_db_terminate_threads = FALSE;
+u8                                  acpi_gbl_abort_method = FALSE;
+u8                                  acpi_gbl_method_executing = FALSE;
 
 /* System flags */
 
-u32                         acpi_gbl_startup_flags = 0;
+u32                                 acpi_gbl_startup_flags = 0;
 
 /* System starts uninitialized */
 
-u8                          acpi_gbl_shutdown = TRUE;
+u8                                  acpi_gbl_shutdown = TRUE;
 
-const u8                    acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
+const u8                            acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
 
-const char                  *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
+const char                          *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
 			  "\\_S0_",
 			  "\\_S1_",
 			  "\\_S2_",
@@ -179,7 +179,7 @@
  *    during the initialization sequence.
  */
 
-const acpi_predefined_names     acpi_gbl_pre_defined_names[] =
+const struct acpi_predefined_names      acpi_gbl_pre_defined_names[] =
 { {"_GPE",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
 	{"_PR_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
 	{"_SB_",    ACPI_TYPE_DEVICE,           NULL},
@@ -201,7 +201,7 @@
  * The table is indexed by values of acpi_object_type
  */
 
-const u8                        acpi_gbl_ns_properties[] =
+const u8                                acpi_gbl_ns_properties[] =
 {
 	ACPI_NS_NORMAL,                     /* 00 Any              */
 	ACPI_NS_NORMAL,                     /* 01 Number           */
@@ -238,7 +238,7 @@
 
 /* Hex to ASCII conversion table */
 
-static const char           acpi_gbl_hex_to_ascii[] =
+static const char                   acpi_gbl_hex_to_ascii[] =
 			  {'0','1','2','3','4','5','6','7',
 					 '8','9','A','B','C','D','E','F'};
 
@@ -258,8 +258,8 @@
 
 char
 acpi_ut_hex_to_ascii_char (
-	acpi_integer            integer,
-	u32                     position)
+	acpi_integer                    integer,
+	u32                             position)
 {
 
 	return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);
@@ -280,10 +280,10 @@
  ******************************************************************************/
 
 
-acpi_table_desc             acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+struct acpi_table_desc              acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
 
 
-ACPI_TABLE_SUPPORT          acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
+struct acpi_table_support           acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
 {
 	/***********    Name,   Signature, Global typed pointer     Signature size,      Type                  How many allowed?,    Contains valid AML? */
 
@@ -303,7 +303,7 @@
  *
  ******************************************************************************/
 
-acpi_bit_register_info      acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
+struct acpi_bit_register_info       acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
 {
 	/* Name                                     Parent Register             Register Bit Position                   Register Bit Mask       */
 
@@ -333,7 +333,7 @@
 };
 
 
-acpi_fixed_event_info       acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
+struct acpi_fixed_event_info        acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
 {
 	/* ACPI_EVENT_PMTIMER       */  {ACPI_BITREG_TIMER_STATUS,          ACPI_BITREG_TIMER_ENABLE,        ACPI_BITMASK_TIMER_STATUS,          ACPI_BITMASK_TIMER_ENABLE},
 	/* ACPI_EVENT_GLOBAL        */  {ACPI_BITREG_GLOBAL_LOCK_STATUS,    ACPI_BITREG_GLOBAL_LOCK_ENABLE,  ACPI_BITMASK_GLOBAL_LOCK_STATUS,    ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
@@ -356,7 +356,7 @@
 
 /* Region type decoding */
 
-const char        *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
+const char                *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
 {
 	"system_memory",
 	"system_iO",
@@ -371,7 +371,7 @@
 
 char *
 acpi_ut_get_region_name (
-	u8                      space_id)
+	u8                              space_id)
 {
 
 	if (space_id >= ACPI_USER_REGION_BEGIN)
@@ -402,7 +402,7 @@
 
 /* Event type decoding */
 
-static const char        *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
+static const char                *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
 {
 	"PM_Timer",
 	"global_lock",
@@ -414,7 +414,7 @@
 
 char *
 acpi_ut_get_event_name (
-	u32                     event_id)
+	u32                             event_id)
 {
 
 	if (event_id > ACPI_EVENT_MAX)
@@ -447,10 +447,10 @@
  * indicatewhat type is actually going to be stored for this entry.
  */
 
-static const char           acpi_gbl_bad_type[] = "UNDEFINED";
+static const char                   acpi_gbl_bad_type[] = "UNDEFINED";
 #define TYPE_NAME_LENGTH    12                           /* Maximum length of each string */
 
-static const char           *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
+static const char                   *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
 {
 	/* 00 */ "Untyped",
 	/* 01 */ "Integer",
@@ -487,7 +487,7 @@
 
 char *
 acpi_ut_get_type_name (
-	acpi_object_type        type)
+	acpi_object_type                type)
 {
 
 	if (type > ACPI_TYPE_INVALID)
@@ -501,7 +501,7 @@
 
 char *
 acpi_ut_get_object_type_name (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
 
 	if (!obj_desc)
@@ -534,7 +534,7 @@
 
 char *
 acpi_ut_get_mutex_name (
-	u32                     mutex_id)
+	u32                             mutex_id)
 {
 
 	if (mutex_id > MAX_MTX)
@@ -563,7 +563,7 @@
 
 u8
 acpi_ut_valid_object_type (
-	acpi_object_type        type)
+	acpi_object_type                type)
 {
 
 	if (type > ACPI_TYPE_LOCAL_MAX)
@@ -589,9 +589,9 @@
 
 acpi_owner_id
 acpi_ut_allocate_owner_id (
-	u32                     id_type)
+	u32                             id_type)
 {
-	acpi_owner_id           owner_id = 0xFFFF;
+	acpi_owner_id                   owner_id = 0xFFFF;
 
 
 	ACPI_FUNCTION_TRACE ("ut_allocate_owner_id");
@@ -651,27 +651,27 @@
 acpi_ut_init_globals (
 	void)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ut_init_globals");
 
 	/* Memory allocation and cache lists */
 
-	ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (acpi_memory_list) * ACPI_NUM_MEM_LISTS);
+	ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (struct acpi_memory_list) * ACPI_NUM_MEM_LISTS);
 
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset      = (u16) ACPI_PTR_DIFF (&(((acpi_generic_state *) NULL)->common.next), NULL);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset     = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset    = (u16) ACPI_PTR_DIFF (&(((acpi_operand_object *) NULL)->cache.next), NULL);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset       = (u16) ACPI_PTR_DIFF (&(((acpi_walk_state *) NULL)->next), NULL);
-
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size     = sizeof (acpi_namespace_node);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size      = sizeof (acpi_generic_state);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size     = sizeof (acpi_parse_obj_common);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse_obj_named);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size    = sizeof (acpi_operand_object);
-	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size       = sizeof (acpi_walk_state);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset      = (u16) ACPI_PTR_DIFF (&(((union acpi_generic_state *) NULL)->common.next), NULL);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset     = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset    = (u16) ACPI_PTR_DIFF (&(((union acpi_operand_object *) NULL)->cache.next), NULL);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset       = (u16) ACPI_PTR_DIFF (&(((struct acpi_walk_state *) NULL)->next), NULL);
+
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size     = sizeof (struct acpi_namespace_node);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size      = sizeof (union acpi_generic_state);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size     = sizeof (struct acpi_parse_obj_common);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (struct acpi_parse_obj_named);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size    = sizeof (union acpi_operand_object);
+	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size       = sizeof (struct acpi_walk_state);
 
 	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth  = ACPI_MAX_STATE_CACHE_DEPTH;
 	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = ACPI_MAX_PARSE_CACHE_DEPTH;
diff -Nru a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
--- a/drivers/acpi/utilities/utinit.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utinit.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,9 +48,9 @@
 
 static void
 acpi_ut_fadt_register_error (
-	char                    *register_name,
-	u32                     value,
-	acpi_size               offset)
+	char                            *register_name,
+	u32                             value,
+	acpi_size                       offset)
 {
 
 	ACPI_REPORT_WARNING (
diff -Nru a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c
--- a/drivers/acpi/utilities/utmath.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utmath.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
 
 acpi_status
 acpi_ut_short_divide (
-	acpi_integer            *in_dividend,
-	u32                     divisor,
-	acpi_integer            *out_quotient,
-	u32                     *out_remainder)
+	acpi_integer                    *in_dividend,
+	u32                             divisor,
+	acpi_integer                    *out_quotient,
+	u32                             *out_remainder)
 {
-	uint64_overlay          dividend;
-	uint64_overlay          quotient;
-	u32                     remainder32;
+	union uint64_overlay            dividend;
+	union uint64_overlay            quotient;
+	u32                             remainder32;
 
 
 	ACPI_FUNCTION_TRACE ("ut_short_divide");
@@ -115,20 +115,20 @@
 
 acpi_status
 acpi_ut_divide (
-	acpi_integer            *in_dividend,
-	acpi_integer            *in_divisor,
-	acpi_integer            *out_quotient,
-	acpi_integer            *out_remainder)
+	acpi_integer                    *in_dividend,
+	acpi_integer                    *in_divisor,
+	acpi_integer                    *out_quotient,
+	acpi_integer                    *out_remainder)
 {
-	uint64_overlay          dividend;
-	uint64_overlay          divisor;
-	uint64_overlay          quotient;
-	uint64_overlay          remainder;
-	uint64_overlay          normalized_dividend;
-	uint64_overlay          normalized_divisor;
-	u32                     partial1;
-	uint64_overlay          partial2;
-	uint64_overlay          partial3;
+	union uint64_overlay            dividend;
+	union uint64_overlay            divisor;
+	union uint64_overlay            quotient;
+	union uint64_overlay            remainder;
+	union uint64_overlay            normalized_dividend;
+	union uint64_overlay            normalized_divisor;
+	u32                             partial1;
+	union uint64_overlay            partial2;
+	union uint64_overlay            partial3;
 
 
 	ACPI_FUNCTION_TRACE ("ut_divide");
@@ -250,10 +250,10 @@
 
 acpi_status
 acpi_ut_short_divide (
-	acpi_integer            *in_dividend,
-	u32                     divisor,
-	acpi_integer            *out_quotient,
-	u32                     *out_remainder)
+	acpi_integer                    *in_dividend,
+	u32                             divisor,
+	acpi_integer                    *out_quotient,
+	u32                             *out_remainder)
 {
 
 	ACPI_FUNCTION_TRACE ("ut_short_divide");
@@ -280,10 +280,10 @@
 
 acpi_status
 acpi_ut_divide (
-	acpi_integer            *in_dividend,
-	acpi_integer            *in_divisor,
-	acpi_integer            *out_quotient,
-	acpi_integer            *out_remainder)
+	acpi_integer                    *in_dividend,
+	acpi_integer                    *in_divisor,
+	acpi_integer                    *out_quotient,
+	acpi_integer                    *out_remainder)
 {
 	ACPI_FUNCTION_TRACE ("ut_divide");
 
diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
--- a/drivers/acpi/utilities/utmisc.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/acpi/utilities/utmisc.c	Fri Jan 10 12:12:37 2003
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@
 
 void
 acpi_ut_print_string (
-	char                    *string,
-	u8                      max_length)
+	char                            *string,
+	u8                              max_length)
 {
-	u32                     i;
+	u32                             i;
 
 
 	if (!string) {
@@ -135,16 +135,16 @@
 
 u32
 acpi_ut_dword_byte_swap (
-	u32                     value)
+	u32                             value)
 {
 	union {
-		u32                 value;
-		u8                  bytes[4];
+		u32                         value;
+		u8                          bytes[4];
 	} out;
 
 	union {
-		u32                 value;
-		u8                  bytes[4];
+		u32                         value;
+		u8                          bytes[4];
 	} in;
 
 
@@ -179,7 +179,7 @@
 
 void
 acpi_ut_set_integer_width (
-	u8                      revision)
+	u8                              revision)
 {
 
 	if (revision <= 1) {
@@ -210,12 +210,12 @@
 
 void
 acpi_ut_display_init_pathname (
-	u8                      type,
-	acpi_namespace_node     *obj_handle,
-	char                    *path)
+	u8                              type,
+	struct acpi_namespace_node      *obj_handle,
+	char                            *path)
 {
-	acpi_status             status;
-	acpi_buffer             buffer;
+	acpi_status                     status;
+	struct acpi_buffer              buffer;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -280,10 +280,10 @@
 
 u8
 acpi_ut_valid_acpi_name (
-	u32                     name)
+	u32                             name)
 {
-	char                    *name_ptr = (char *) &name;
-	u32                     i;
+	char                            *name_ptr = (char *) &name;
+	u32                             i;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -315,7 +315,7 @@
 
 u8
 acpi_ut_valid_acpi_character (
-	char                    character)
+	char                            character)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -344,15 +344,15 @@
 
 acpi_status
 acpi_ut_strtoul64 (
-	char                    *string,
-	u32                     base,
-	acpi_integer            *ret_integer)
-{
-	u32                     index;
-	acpi_integer            return_value = 0;
-	acpi_status             status = AE_OK;
-	acpi_integer            dividend;
-	acpi_integer            quotient;
+	char                            *string,
+	u32                             base,
+	acpi_integer                    *ret_integer)
+{
+	u32                             index;
+	acpi_integer                    return_value = 0;
+	acpi_status                     status = AE_OK;
+	acpi_integer                    dividend;
+	acpi_integer                    quotient;
 
 
 	*ret_integer = 0;
@@ -486,9 +486,9 @@
 
 char *
 acpi_ut_strupr (
-	char                    *src_string)
+	char                            *src_string)
 {
-	char                    *string;
+	char                            *string;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -520,8 +520,8 @@
 acpi_ut_mutex_initialize (
 	void)
 {
-	u32                     i;
-	acpi_status             status;
+	u32                             i;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ut_mutex_initialize");
@@ -557,7 +557,7 @@
 acpi_ut_mutex_terminate (
 	void)
 {
-	u32                     i;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ut_mutex_terminate");
@@ -588,9 +588,9 @@
 
 acpi_status
 acpi_ut_create_mutex (
-	acpi_mutex_handle       mutex_id)
+	acpi_mutex_handle               mutex_id)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ut_create_mutex", mutex_id);
@@ -625,9 +625,9 @@
 
 acpi_status
 acpi_ut_delete_mutex (
-	acpi_mutex_handle       mutex_id)
+	acpi_mutex_handle               mutex_id)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ut_delete_mutex", mutex_id);
@@ -660,11 +660,11 @@
 
 acpi_status
 acpi_ut_acquire_mutex (
-	acpi_mutex_handle       mutex_id)
+	acpi_mutex_handle               mutex_id)
 {
-	acpi_status             status;
-	u32                     i;
-	u32                     this_thread_id;
+	acpi_status                     status;
+	u32                             i;
+	u32                             this_thread_id;
 
 
 	ACPI_FUNCTION_NAME ("ut_acquire_mutex");
@@ -738,11 +738,11 @@
 
 acpi_status
 acpi_ut_release_mutex (
-	acpi_mutex_handle       mutex_id)
+	acpi_mutex_handle               mutex_id)
 {
-	acpi_status             status;
-	u32                     i;
-	u32                     this_thread_id;
+	acpi_status                     status;
+	u32                             i;
+	u32                             this_thread_id;
 
 
 	ACPI_FUNCTION_NAME ("ut_release_mutex");
@@ -824,11 +824,11 @@
 
 acpi_status
 acpi_ut_create_update_state_and_push (
-	acpi_operand_object     *object,
-	u16                     action,
-	acpi_generic_state      **state_list)
+	union acpi_operand_object       *object,
+	u16                             action,
+	union acpi_generic_state        **state_list)
 {
-	acpi_generic_state       *state;
+	union acpi_generic_state         *state;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -866,12 +866,12 @@
 
 acpi_status
 acpi_ut_create_pkg_state_and_push (
-	void                    *internal_object,
-	void                    *external_object,
-	u16                     index,
-	acpi_generic_state      **state_list)
+	void                            *internal_object,
+	void                            *external_object,
+	u16                             index,
+	union acpi_generic_state        **state_list)
 {
-	acpi_generic_state       *state;
+	union acpi_generic_state         *state;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -902,8 +902,8 @@
 
 void
 acpi_ut_push_generic_state (
-	acpi_generic_state      **list_head,
-	acpi_generic_state      *state)
+	union acpi_generic_state        **list_head,
+	union acpi_generic_state        *state)
 {
 	ACPI_FUNCTION_TRACE ("ut_push_generic_state");
 
@@ -929,11 +929,11 @@
  *
  ******************************************************************************/
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_pop_generic_state (
-	acpi_generic_state      **list_head)
+	union acpi_generic_state        **list_head)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE ("ut_pop_generic_state");
@@ -965,10 +965,10 @@
  *
  ******************************************************************************/
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_generic_state (void)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -999,11 +999,11 @@
  *
  ******************************************************************************/
 
-acpi_thread_state *
+struct acpi_thread_state *
 acpi_ut_create_thread_state (
 	void)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE ("ut_create_thread_state");
@@ -1021,7 +1021,7 @@
 	state->common.data_type = ACPI_DESC_TYPE_STATE_THREAD;
 	state->thread.thread_id = acpi_os_get_thread_id ();
 
-	return_PTR ((acpi_thread_state *) state);
+	return_PTR ((struct acpi_thread_state *) state);
 }
 
 
@@ -1041,12 +1041,12 @@
  *
  ******************************************************************************/
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_update_state (
-	acpi_operand_object     *object,
-	u16                     action)
+	union acpi_operand_object       *object,
+	u16                             action)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_create_update_state", object);
@@ -1083,13 +1083,13 @@
  *
  ******************************************************************************/
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_pkg_state (
-	void                    *internal_object,
-	void                    *external_object,
-	u16                     index)
+	void                            *internal_object,
+	void                            *external_object,
+	u16                             index)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_create_pkg_state", internal_object);
@@ -1105,7 +1105,7 @@
 	/* Init fields specific to the update struct */
 
 	state->common.data_type = ACPI_DESC_TYPE_STATE_PACKAGE;
-	state->pkg.source_object = (acpi_operand_object *) internal_object;
+	state->pkg.source_object = (union acpi_operand_object *) internal_object;
 	state->pkg.dest_object  = external_object;
 	state->pkg.index        = index;
 	state->pkg.num_packages = 1;
@@ -1127,11 +1127,11 @@
  *
  ******************************************************************************/
 
-acpi_generic_state *
+union acpi_generic_state *
 acpi_ut_create_control_state (
 	void)
 {
-	acpi_generic_state      *state;
+	union acpi_generic_state        *state;
 
 
 	ACPI_FUNCTION_TRACE ("ut_create_control_state");
@@ -1168,7 +1168,7 @@
 
 void
 acpi_ut_delete_generic_state (
-	acpi_generic_state      *state)
+	union acpi_generic_state        *state)
 {
 	ACPI_FUNCTION_TRACE ("ut_delete_generic_state");
 
@@ -1217,16 +1217,16 @@
 
 acpi_status
 acpi_ut_walk_package_tree (
-	acpi_operand_object     *source_object,
-	void                    *target_object,
-	acpi_pkg_callback       walk_callback,
-	void                    *context)
-{
-	acpi_status             status = AE_OK;
-	acpi_generic_state      *state_list = NULL;
-	acpi_generic_state      *state;
-	u32                     this_index;
-	acpi_operand_object     *this_source_obj;
+	union acpi_operand_object       *source_object,
+	void                            *target_object,
+	acpi_pkg_callback               walk_callback,
+	void                            *context)
+{
+	acpi_status                     status = AE_OK;
+	union acpi_generic_state        *state_list = NULL;
+	union acpi_generic_state        *state;
+	u32                             this_index;
+	union acpi_operand_object       *this_source_obj;
 
 
 	ACPI_FUNCTION_TRACE ("ut_walk_package_tree");
@@ -1241,7 +1241,7 @@
 		/* Get one element of the package */
 
 		this_index    = state->pkg.index;
-		this_source_obj = (acpi_operand_object *)
+		this_source_obj = (union acpi_operand_object *)
 				  state->pkg.source_object->package.elements[this_index];
 
 		/*
@@ -1334,11 +1334,11 @@
 
 u8
 acpi_ut_generate_checksum (
-	u8                      *buffer,
-	u32                     length)
+	u8                              *buffer,
+	u32                             length)
 {
-	u32                     i;
-	signed char             sum = 0;
+	u32                             i;
+	signed char                     sum = 0;
 
 
 	for (i = 0; i < length; i++) {
@@ -1364,11 +1364,11 @@
 
 u8 *
 acpi_ut_get_resource_end_tag (
-	acpi_operand_object     *obj_desc)
+	union acpi_operand_object       *obj_desc)
 {
-	u8                      buffer_byte;
-	u8                      *buffer;
-	u8                      *end_buffer;
+	u8                              buffer_byte;
+	u8                              *buffer;
+	u8                              *end_buffer;
 
 
 	buffer    = obj_desc->buffer.pointer;
@@ -1419,9 +1419,9 @@
 
 void
 acpi_ut_report_error (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id)
 {
 
 
@@ -1446,9 +1446,9 @@
 
 void
 acpi_ut_report_warning (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id)
 {
 
 	acpi_os_printf ("%8s-%04d: *** Warning: ", module_name, line_number);
@@ -1472,9 +1472,9 @@
 
 void
 acpi_ut_report_info (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id)
 {
 
 	acpi_os_printf ("%8s-%04d: *** Info: ", module_name, line_number);
diff -Nru a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
--- a/drivers/acpi/utilities/utobject.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utobject.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,15 +53,15 @@
  *
  ******************************************************************************/
 
-acpi_operand_object  *
+union acpi_operand_object    *
 acpi_ut_create_internal_object_dbg (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id,
-	acpi_object_type        type)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id,
+	acpi_object_type                type)
 {
-	acpi_operand_object     *object;
-	acpi_operand_object     *second_object;
+	union acpi_operand_object       *object;
+	union acpi_operand_object       *second_object;
 
 
 	ACPI_FUNCTION_TRACE_STR ("ut_create_internal_object_dbg", acpi_ut_get_type_name (type));
@@ -125,12 +125,12 @@
  *
  ******************************************************************************/
 
-acpi_operand_object *
+union acpi_operand_object *
 acpi_ut_create_buffer_object (
-	acpi_size               buffer_size)
+	acpi_size                       buffer_size)
 {
-	acpi_operand_object     *buffer_desc;
-	u8                      *buffer;
+	union acpi_operand_object       *buffer_desc;
+	u8                              *buffer;
 
 
 	ACPI_FUNCTION_TRACE_U32 ("ut_create_buffer_object", buffer_size);
@@ -172,13 +172,13 @@
  *
  * PARAMETERS:  Object              - Object to be validated
  *
- * RETURN:      Validate a pointer to be an acpi_operand_object
+ * RETURN:      Validate a pointer to be an union acpi_operand_object
  *
  ******************************************************************************/
 
 u8
 acpi_ut_valid_internal_object (
-	void                    *object)
+	void                            *object)
 {
 
 	ACPI_FUNCTION_NAME ("ut_valid_internal_object");
@@ -196,7 +196,7 @@
 	switch (ACPI_GET_DESCRIPTOR_TYPE (object)) {
 	case ACPI_DESC_TYPE_OPERAND:
 
-		/* The object appears to be a valid acpi_operand_object  */
+		/* The object appears to be a valid union acpi_operand_object    */
 
 		return (TRUE);
 
@@ -247,11 +247,11 @@
 
 void *
 acpi_ut_allocate_object_desc_dbg (
-	char                    *module_name,
-	u32                     line_number,
-	u32                     component_id)
+	char                            *module_name,
+	u32                             line_number,
+	u32                             component_id)
 {
-	acpi_operand_object     *object;
+	union acpi_operand_object       *object;
 
 
 	ACPI_FUNCTION_TRACE ("ut_allocate_object_desc_dbg");
@@ -270,7 +270,7 @@
 	ACPI_SET_DESCRIPTOR_TYPE (object, ACPI_DESC_TYPE_OPERAND);
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
-			object, (u32) sizeof (acpi_operand_object)));
+			object, (u32) sizeof (union acpi_operand_object)));
 
 	return_PTR (object);
 }
@@ -290,12 +290,12 @@
 
 void
 acpi_ut_delete_object_desc (
-	acpi_operand_object     *object)
+	union acpi_operand_object       *object)
 {
 	ACPI_FUNCTION_TRACE_PTR ("ut_delete_object_desc", object);
 
 
-	/* Object must be an acpi_operand_object  */
+	/* Object must be an union acpi_operand_object    */
 
 	if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -353,11 +353,11 @@
 
 acpi_status
 acpi_ut_get_simple_object_size (
-	acpi_operand_object     *internal_object,
-	acpi_size               *obj_length)
+	union acpi_operand_object       *internal_object,
+	acpi_size                       *obj_length)
 {
-	acpi_size               length;
-	acpi_status             status = AE_OK;
+	acpi_size                       length;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_get_simple_object_size", internal_object);
@@ -372,7 +372,7 @@
 
 	/* Start with the length of the Acpi object */
 
-	length = sizeof (acpi_object);
+	length = sizeof (union acpi_object);
 
 	if (ACPI_GET_DESCRIPTOR_TYPE (internal_object) == ACPI_DESC_TYPE_NAMED) {
 		/* Object is a named object (reference), just return the length */
@@ -471,14 +471,14 @@
 
 acpi_status
 acpi_ut_get_element_length (
-	u8                      object_type,
-	acpi_operand_object     *source_object,
-	acpi_generic_state      *state,
-	void                    *context)
+	u8                              object_type,
+	union acpi_operand_object       *source_object,
+	union acpi_generic_state        *state,
+	void                            *context)
 {
-	acpi_status             status = AE_OK;
-	acpi_pkg_info           *info = (acpi_pkg_info *) context;
-	acpi_size               object_space;
+	acpi_status                     status = AE_OK;
+	struct acpi_pkg_info            *info = (struct acpi_pkg_info *) context;
+	acpi_size                       object_space;
 
 
 	switch (object_type) {
@@ -536,11 +536,11 @@
 
 acpi_status
 acpi_ut_get_package_object_size (
-	acpi_operand_object     *internal_object,
-	acpi_size               *obj_length)
+	union acpi_operand_object       *internal_object,
+	acpi_size                       *obj_length)
 {
-	acpi_status             status;
-	acpi_pkg_info           info;
+	acpi_status                     status;
+	struct acpi_pkg_info            info;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("ut_get_package_object_size", internal_object);
@@ -561,7 +561,7 @@
 	 * just add the length of the package objects themselves.
 	 * Round up to the next machine word.
 	 */
-	info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object)) *
+	info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object)) *
 			  (acpi_size) info.num_packages;
 
 	/* Return the total package length */
@@ -587,10 +587,10 @@
 
 acpi_status
 acpi_ut_get_object_size(
-	acpi_operand_object     *internal_object,
-	acpi_size               *obj_length)
+	union acpi_operand_object       *internal_object,
+	acpi_size                       *obj_length)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_ENTRY ();
diff -Nru a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c
--- a/drivers/acpi/utilities/utxface.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utilities/utxface.c	Fri Jan 10 12:12:38 2003
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 - 2002, R. Byron Moore
+ *  Copyright (C) 2000 - 2003, R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@
 acpi_initialize_subsystem (
 	void)
 {
-	acpi_status             status;
+	acpi_status                     status;
 
 	ACPI_FUNCTION_TRACE ("acpi_initialize_subsystem");
 
@@ -117,9 +117,9 @@
 
 acpi_status
 acpi_enable_subsystem (
-	u32                     flags)
+	u32                             flags)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_enable_subsystem");
@@ -211,9 +211,9 @@
 
 acpi_status
 acpi_initialize_objects (
-	u32                     flags)
+	u32                             flags)
 {
-	acpi_status             status = AE_OK;
+	acpi_status                     status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_initialize_objects");
@@ -272,7 +272,7 @@
 acpi_status
 acpi_terminate (void)
 {
-	acpi_status         status;
+	acpi_status                 status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_terminate");
@@ -353,11 +353,11 @@
 
 acpi_status
 acpi_get_system_info (
-	acpi_buffer             *out_buffer)
+	struct acpi_buffer              *out_buffer)
 {
-	acpi_system_info        *info_ptr;
-	u32                     i;
-	acpi_status             status;
+	struct acpi_system_info         *info_ptr;
+	u32                             i;
+	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("acpi_get_system_info");
@@ -372,7 +372,7 @@
 
 	/* Validate/Allocate/Clear caller buffer */
 
-	status = acpi_ut_initialize_buffer (out_buffer, sizeof (acpi_system_info));
+	status = acpi_ut_initialize_buffer (out_buffer, sizeof (struct acpi_system_info));
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
@@ -380,7 +380,7 @@
 	/*
 	 * Populate the return buffer
 	 */
-	info_ptr = (acpi_system_info *) out_buffer->pointer;
+	info_ptr = (struct acpi_system_info *) out_buffer->pointer;
 
 	info_ptr->acpi_ca_version   = ACPI_CA_VERSION;
 
@@ -437,8 +437,8 @@
 
 acpi_status
 acpi_install_initialization_handler (
-	acpi_init_handler       handler,
-	u32                     function)
+	acpi_init_handler               handler,
+	u32                             function)
 {
 
 	if (!handler) {
diff -Nru a/drivers/acpi/utils.c b/drivers/acpi/utils.c
--- a/drivers/acpi/utils.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/acpi/utils.c	Fri Jan 10 12:12:38 2003
@@ -42,7 +42,7 @@
 #ifdef ACPI_DEBUG_OUTPUT
 #define acpi_util_eval_error(h,p,s) {\
 	char prefix[80] = {'\0'};\
-	acpi_buffer buffer = {sizeof(prefix), prefix};\
+	struct acpi_buffer buffer = {sizeof(prefix), prefix};\
 	acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",\
 		(char *) prefix, p, acpi_format_exception(s))); }
@@ -53,9 +53,9 @@
 
 acpi_status
 acpi_extract_package (
-	acpi_object		*package,
-	acpi_buffer		*format,
-	acpi_buffer		*buffer)
+	union acpi_object	*package,
+	struct acpi_buffer	*format,
+	struct acpi_buffer	*buffer)
 {
 	u32			size_required = 0;
 	u32			tail_offset = 0;
@@ -95,7 +95,7 @@
 	 */
 	for (i=0; i<format_count; i++) {
 
-		acpi_object *element = &(package->package.elements[i]);
+		union acpi_object *element = &(package->package.elements[i]);
 
 		if (!element) {
 			return_ACPI_STATUS(AE_BAD_DATA);
@@ -167,7 +167,7 @@
 	for (i=0; i<format_count; i++) {
 
 		u8 **pointer = NULL;
-		acpi_object *element = &(package->package.elements[i]);
+		union acpi_object *element = &(package->package.elements[i]);
 
 		if (!element) {
 			return_ACPI_STATUS(AE_BAD_DATA);
@@ -239,12 +239,12 @@
 acpi_evaluate_integer (
 	acpi_handle		handle,
 	acpi_string		pathname,
-	acpi_object_list	*arguments,
+	struct acpi_object_list	*arguments,
 	unsigned long		*data)
 {
 	acpi_status             status = AE_OK;
-	acpi_object             element;
-	acpi_buffer		buffer = {sizeof(acpi_object), &element};
+	union acpi_object	element;
+	struct acpi_buffer	buffer = {sizeof(union acpi_object), &element};
 
 	ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
 
@@ -324,13 +324,13 @@
 acpi_evaluate_reference (
 	acpi_handle		handle,
 	acpi_string		pathname,
-	acpi_object_list	*arguments,
+	struct acpi_object_list	*arguments,
 	struct acpi_handle_list	*list)
 {
 	acpi_status		status = AE_OK;
-	acpi_object		*package = NULL;
-	acpi_object		*element = NULL;
-	acpi_buffer		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	union acpi_object	*package = NULL;
+	union acpi_object	*element = NULL;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 	u32			i = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_evaluate_reference");
@@ -345,7 +345,7 @@
 	if (ACPI_FAILURE(status))
 		goto end;
 
-	package = (acpi_object *) buffer.pointer;
+	package = (union acpi_object *) buffer.pointer;
 
 	if ((buffer.length == 0) || !package) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
diff -Nru a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
--- a/drivers/char/agp/amd-k7-agp.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/agp/amd-k7-agp.c	Fri Jan 10 12:12:38 2003
@@ -138,8 +138,8 @@
 		return retval;
 	}
 
-	agp_bridge.gatt_table_real = (unsigned long *)page_dir.real;
-	agp_bridge.gatt_table = (unsigned long *)page_dir.remapped;
+	agp_bridge.gatt_table_real = (u32 *)page_dir.real;
+	agp_bridge.gatt_table = (u32 *)page_dir.remapped;
 	agp_bridge.gatt_bus_addr = virt_to_phys(page_dir.real);
 
 	/* Get the address for the gart region.
diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
--- a/drivers/char/agp/sworks-agp.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/agp/sworks-agp.c	Fri Jan 10 12:12:38 2003
@@ -160,8 +160,8 @@
 		return retval;
 	}
 
-	agp_bridge.gatt_table_real = (unsigned long *)page_dir.real;
-	agp_bridge.gatt_table = (unsigned long *)page_dir.remapped;
+	agp_bridge.gatt_table_real = (u32 *)page_dir.real;
+	agp_bridge.gatt_table = (u32 *)page_dir.remapped;
 	agp_bridge.gatt_bus_addr = virt_to_phys(page_dir.real);
 
 	/* Get the address for the gart region.
diff -Nru a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig
--- a/drivers/char/watchdog/Kconfig	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/Kconfig	Fri Jan 10 12:12:38 2003
@@ -283,4 +283,24 @@
 	  The module is called machzwd.o.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+config W83877F_WDT
+	tristate "W83877F Computer Watchdog"
+	depends on WATCHDOG
+
+config SC520_WDT
+	tristate "AMD Elan SC520 processor Watchdog"
+	depends on WATCHDOG
+
+config ALIM7101_WDT
+	tristate "ALi M7101 PMU Computer Watchdog"
+	depends on WATCHDOG
+
+config SC1200_WDT
+	tristate "National Semiconductor PC87307/PC97307 (ala SC1200) Watchdog"
+	depends on WATCHDOG
+
+config WAFER_WDT
+	tristate "ICP Wafer 5823 Single Board Computer Watchdog"
+	depends on WATCHDOG
+
 endmenu
diff -Nru a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile
--- a/drivers/char/watchdog/Makefile	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/Makefile	Fri Jan 10 12:12:38 2003
@@ -23,3 +23,8 @@
 obj-$(CONFIG_SH_WDT) += shwdt.o
 obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
 obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
+obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o
+obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
+obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
+obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
+obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
diff -Nru a/drivers/char/watchdog/acquirewdt.c b/drivers/char/watchdog/acquirewdt.c
--- a/drivers/char/watchdog/acquirewdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/acquirewdt.c	Fri Jan 10 12:12:38 2003
@@ -45,6 +45,7 @@
 
 static int acq_is_open;
 static spinlock_t acq_lock;
+static int expect_close = 0;
 
 /*
  *	You must set these - there is no sane way to probe for this board.
@@ -79,8 +80,20 @@
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
 
-	if(count)
-	{
+	if(count) {
+		if (!nowayout) {
+			size_t i;
+
+			expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+				if (get_user(c, buf + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		acq_ping();
 		return 1;
 	}
@@ -97,9 +110,11 @@
 static int acq_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
-	static struct watchdog_info ident=
+	static struct watchdog_info ident =
 	{
-		WDIOF_KEEPALIVEPING, 1, "Acquire WDT"
+		.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "Acquire WDT"
 	};
 	
 	switch(cmd)
@@ -126,39 +141,35 @@
 
 static int acq_open(struct inode *inode, struct file *file)
 {
-	switch(minor(inode->i_rdev))
-	{
-		case WATCHDOG_MINOR:
-			spin_lock(&acq_lock);
-			if(acq_is_open)
-			{
-				spin_unlock(&acq_lock);
-				return -EBUSY;
-			}
-			if (nowayout) {
-				MOD_INC_USE_COUNT;
-			}
-			/*
-			 *	Activate 
-			 */
-
-			acq_is_open=1;
-			inb_p(WDT_START);      
+	if ((minor(inode->i_rdev) == WATCHDOG_MINOR)) {
+		spin_lock(&acq_lock);
+		if(acq_is_open) {
 			spin_unlock(&acq_lock);
-			return 0;
-		default:
-			return -ENODEV;
+			return -EBUSY;
+		}
+		if (nowayout)
+			MOD_INC_USE_COUNT;
+
+		/* Activate */
+		acq_is_open=1;
+		inb_p(WDT_START);      
+		spin_unlock(&acq_lock);
+		return 0;
+
+	} else {
+		return -ENODEV;
 	}
 }
 
 static int acq_close(struct inode *inode, struct file *file)
 {
-	if(minor(inode->i_rdev)==WATCHDOG_MINOR)
-	{
+	if(minor(inode->i_rdev)==WATCHDOG_MINOR) {
 		spin_lock(&acq_lock);
-		if (!nowayout) {
+		if (expect_close)
 			inb_p(WDT_STOP);
-		}
+		else
+			printk(KERN_CRIT "WDT closed unexpectedly.  WDT will not stop!\n");
+
 		acq_is_open=0;
 		spin_unlock(&acq_lock);
 	}
@@ -173,10 +184,9 @@
 	void *unused)
 {
 	if(code==SYS_DOWN || code==SYS_HALT)
-	{
 		/* Turn the card off */
 		inb_p(WDT_STOP);
-	}
+
 	return NOTIFY_DONE;
 }
  
@@ -196,9 +206,9 @@
 
 static struct miscdevice acq_miscdev=
 {
-	WATCHDOG_MINOR,
-	"watchdog",
-	&acq_fops
+	.minor = WATCHDOG_MINOR,
+	.name = "watchdog",
+	.fops = &acq_fops
 };
 
 
@@ -207,11 +217,11 @@
  *	turn the timebomb registers off. 
  */
  
-static struct notifier_block acq_notifier=
+static struct notifier_block acq_notifier =
 {
-	acq_notify_sys,
-	NULL,
-	0
+	.notifier_call = acq_notify_sys,
+	.next = NULL,
+	.priority = 0
 };
 
 static int __init acq_init(void)
@@ -221,17 +231,15 @@
 	spin_lock_init(&acq_lock);
 	if (misc_register(&acq_miscdev))
 		return -ENODEV;
-	if (!request_region(WDT_STOP, 1, "Acquire WDT"))
-		{
+	if (!request_region(WDT_STOP, 1, "Acquire WDT")) {
 		misc_deregister(&acq_miscdev);
 		return -EIO;
-		}
-	if (!request_region(WDT_START, 1, "Acquire WDT"))
-		{
+	}
+	if (!request_region(WDT_START, 1, "Acquire WDT")) {
 		release_region(WDT_STOP, 1);
 		misc_deregister(&acq_miscdev);
 		return -EIO;
-		}
+	}
 
 	register_reboot_notifier(&acq_notifier);
 	return 0;
diff -Nru a/drivers/char/watchdog/advantechwdt.c b/drivers/char/watchdog/advantechwdt.c
--- a/drivers/char/watchdog/advantechwdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/advantechwdt.c	Fri Jan 10 12:12:38 2003
@@ -47,6 +47,7 @@
 #include <linux/smp_lock.h>
 
 static int advwdt_is_open;
+static char adv_expect_close;
 static spinlock_t advwdt_lock;
 
 /*
@@ -99,10 +100,22 @@
 		return -ESPIPE;
 
 	if (count) {
+		if (!nowayout) {
+			size_t i;
+
+			adv_expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+				if (get_user(c, buf+i))
+					return -EFAULT;
+				if (c == 'V')
+					adv_expect_close = 42;
+			}
+		}
 		advwdt_ping();
-		return 1;
 	}
-	return 0;
+	return count;
 }
 
 static ssize_t
@@ -116,9 +129,11 @@
 	  unsigned long arg)
 {
 	static struct watchdog_info ident = {
-		WDIOF_KEEPALIVEPING, 1, "Advantech WDT"
+		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "Advantech WDT"
 	};
-	
+
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
 	  if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
@@ -143,26 +158,23 @@
 static int
 advwdt_open(struct inode *inode, struct file *file)
 {
-	switch (minor(inode->i_rdev)) {
-		case WATCHDOG_MINOR:
-			spin_lock(&advwdt_lock);
-			if (advwdt_is_open) {
-				spin_unlock(&advwdt_lock);
-				return -EBUSY;
-			}
-			if (nowayout) {
-				MOD_INC_USE_COUNT;
-			}
-			/*
-			 *	Activate 
-			 */
-	 
-			advwdt_is_open = 1;
-			advwdt_ping();
+	if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
+		spin_lock(&advwdt_lock);
+		if (advwdt_is_open) {
 			spin_unlock(&advwdt_lock);
-			return 0;
-		default:
-			return -ENODEV;
+			return -EBUSY;
+		}
+
+		if (nowayout)
+			MOD_INC_USE_COUNT;
+
+		/* Activate */
+		advwdt_is_open = 1;
+		advwdt_ping();
+		spin_unlock(&advwdt_lock);
+		return 0;
+	} else {
+		return -ENODEV;
 	}
 }
 
@@ -171,9 +183,9 @@
 {
 	if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
 		spin_lock(&advwdt_lock);
-		if (!nowayout) {
+		if (!nowayout)
 			inb_p(WDT_STOP);
-		}
+
 		advwdt_is_open = 0;
 		spin_unlock(&advwdt_lock);
 	}
@@ -188,10 +200,10 @@
 advwdt_notify_sys(struct notifier_block *this, unsigned long code,
 	void *unused)
 {
-	if (code == SYS_DOWN || code == SYS_HALT) {
+	if (code == SYS_DOWN || code == SYS_HALT)
 		/* Turn the WDT off */
 		inb_p(WDT_STOP);
-	}
+
 	return NOTIFY_DONE;
 }
  
@@ -209,9 +221,9 @@
 };
 
 static struct miscdevice advwdt_miscdev = {
-	WATCHDOG_MINOR,
-	"watchdog",
-	&advwdt_fops
+	.minor = WATCHDOG_MINOR,
+	.name = "watchdog",
+	.fops = &advwdt_fops
 };
 
 /*
@@ -220,9 +232,9 @@
  */
  
 static struct notifier_block advwdt_notifier = {
-	advwdt_notify_sys,
-	NULL,
-	0
+	.notifier_call = advwdt_notify_sys,
+	.next = NULL,
+	.priority = 0
 };
 
 static void __init
@@ -275,6 +287,4 @@
 module_exit(advwdt_exit);
 
 MODULE_LICENSE("GPL");
-
-/* end of advantechwdt.c */
 
diff -Nru a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/watchdog/alim7101_wdt.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,345 @@
+/*
+ *	ALi M7101 PMU Computer Watchdog Timer driver for Linux 2.4.x
+ *
+ *	Based on w83877f_wdt.c by Scott Jennings <management@oro.net>
+ *	and the Cobalt kernel WDT timer driver by Tim Hockin
+ *	                                      <thockin@cobaltnet.com>
+ *
+ *	(c)2002 Steve Hill <steve@navaho.co.uk>
+ * 
+ *  Theory of operation:
+ *  A Watchdog Timer (WDT) is a hardware circuit that can 
+ *  reset the computer system in case of a software fault.
+ *  You probably knew that already.
+ *
+ *  Usually a userspace daemon will notify the kernel WDT driver
+ *  via the /proc/watchdog special device file that userspace is
+ *  still alive, at regular intervals.  When such a notification
+ *  occurs, the driver will usually tell the hardware watchdog
+ *  that everything is in order, and that the watchdog should wait
+ *  for yet another little while to reset the system.
+ *  If userspace fails (RAM error, kernel bug, whatever), the
+ *  notifications cease to occur, and the hardware watchdog will
+ *  reset the system (causing a reboot) after the timeout occurs.
+ *
+ *  This WDT driver is different from most other Linux WDT
+ *  drivers in that the driver will ping the watchdog by itself,
+ *  because this particular WDT has a very short timeout (1.6
+ *  seconds) and it would be insane to count on any userspace
+ *  daemon always getting scheduled within that time frame.
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/smp_lock.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+
+#define OUR_NAME "alim7101_wdt"
+
+#define WDT_ENABLE 0x9C
+#define WDT_DISABLE 0x8C
+
+#define ALI_7101_WDT    0x92
+#define ALI_WDT_ARM     0x01
+
+/*
+ * We're going to use a 1 second timeout.
+ * If we reset the watchdog every ~250ms we should be safe.  */
+
+#define WDT_INTERVAL (HZ/4+1)
+
+/*
+ * We must not require too good response from the userspace daemon.
+ * Here we require the userspace daemon to send us a heartbeat
+ * char to /dev/watchdog every 30 seconds.
+ */
+
+#define WDT_HEARTBEAT (HZ * 30)
+
+static void wdt_timer_ping(unsigned long);
+static struct timer_list timer;
+static unsigned long next_heartbeat;
+static unsigned long wdt_is_open;
+static int wdt_expect_close;
+static struct pci_dev *alim7101_pmu;
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+ 
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+/*
+ *	Whack the dog
+ */
+
+static void wdt_timer_ping(unsigned long data)
+{
+	/* If we got a heartbeat pulse within the WDT_US_INTERVAL
+	 * we agree to ping the WDT 
+	 */
+	char	tmp;
+
+	if(time_before(jiffies, next_heartbeat)) 
+	{
+		/* Ping the WDT (this is actually a disarm/arm sequence) */
+		pci_read_config_byte(alim7101_pmu, 0x92, &tmp);
+		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp & ~ALI_WDT_ARM));
+		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp | ALI_WDT_ARM));
+	} else {
+		printk(OUR_NAME ": Heartbeat lost! Will not ping the watchdog\n");
+	}
+	/* Re-set the timer interval */
+	timer.expires = jiffies + WDT_INTERVAL;
+	add_timer(&timer);
+}
+
+/* 
+ * Utility routines
+ */
+
+static void wdt_change(int writeval)
+{
+	char	tmp;
+
+	pci_read_config_byte(alim7101_pmu, 0x92, &tmp);
+	if (writeval == WDT_ENABLE)
+		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp | ALI_WDT_ARM));
+	else
+		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp & ~ALI_WDT_ARM));
+}
+
+static void wdt_startup(void)
+{
+	next_heartbeat = jiffies + WDT_HEARTBEAT;
+
+	/* We must enable before we kick off the timer in case the timer
+	   occurs as we ping it */
+
+	wdt_change(WDT_ENABLE);
+
+	/* Start the timer */
+	timer.expires = jiffies + WDT_INTERVAL;	
+	add_timer(&timer);
+
+
+	printk(OUR_NAME ": Watchdog timer is now enabled.\n");  
+}
+
+static void wdt_turnoff(void)
+{
+	/* Stop the timer */
+	del_timer_sync(&timer);
+	wdt_change(WDT_DISABLE);
+	printk(OUR_NAME ": Watchdog timer is now disabled...\n");
+}
+
+/*
+ * /dev/watchdog handling
+ */
+
+static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+{
+	/* We can't seek */
+	if(ppos != &file->f_pos)
+		return -ESPIPE;
+
+	/* See if we got the magic character */
+	if(count) {
+		if (!nowayout) {
+			size_t ofs;
+
+			/* note: just in case someone wrote the magic character
+			 * five months ago... */
+			wdt_expect_close = 0;
+
+			/* now scan */
+			for (ofs = 0; ofs != count; ofs++) {
+				char c;
+				if (get_user(c, buf+ofs))
+					return -EFAULT;
+				if (c == 'V')
+					wdt_expect_close = 1;
+			}
+		}
+		/* someone wrote to us, we should restart timer */
+		next_heartbeat = jiffies + WDT_HEARTBEAT;
+		return 1;
+	};
+	return 0;
+}
+
+static ssize_t fop_read(struct file * file, char * buf, size_t count, loff_t * ppos)
+{
+	/* No can do */
+	return -EINVAL;
+}
+
+static int fop_open(struct inode * inode, struct file * file)
+{
+	/* Just in case we're already talking to someone... */
+	if(test_and_set_bit(0, &wdt_is_open))
+		return -EBUSY;
+	/* Good, fire up the show */
+	wdt_startup();
+	return 0;
+}
+
+static int fop_close(struct inode * inode, struct file * file)
+{
+	if(wdt_expect_close)
+		wdt_turnoff();
+	else
+		printk(OUR_NAME ": device file closed unexpectedly. Will not stop the WDT!\n");
+
+	clear_bit(0, &wdt_is_open);
+	return 0;
+}
+
+static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+	static struct watchdog_info ident =
+	{
+		.options = WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "ALiM7101"
+	};
+	
+	switch(cmd)
+	{
+		case WDIOC_GETSUPPORT:
+			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+		case WDIOC_KEEPALIVE:
+			next_heartbeat = jiffies + WDT_HEARTBEAT;
+			return 0;
+		default:
+			return -ENOTTY;
+	}
+}
+
+static struct file_operations wdt_fops = {
+	.owner=		THIS_MODULE,
+	.llseek=	no_llseek,
+	.read=		fop_read,
+	.write=		fop_write,
+	.open=		fop_open,
+	.release=	fop_close,
+	.ioctl=		fop_ioctl
+};
+
+static struct miscdevice wdt_miscdev = {
+	.minor=WATCHDOG_MINOR,
+	.name="watchdog",
+	.fops=&wdt_fops
+};
+
+/*
+ *	Notifier for system down
+ */
+
+static int wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
+{
+	if (code==SYS_DOWN || code==SYS_HALT)
+		wdt_turnoff();
+
+	if (code==SYS_RESTART) {
+		/*
+		 * Cobalt devices have no way of rebooting themselves other than
+		 * getting the watchdog to pull reset, so we restart the watchdog on
+		 * reboot with no heartbeat
+		 */
+		wdt_change(WDT_ENABLE);
+		printk(OUR_NAME ": Watchdog timer is now enabled with no heartbeat - should reboot in ~1 second.\n");
+	}
+	return NOTIFY_DONE;
+}
+ 
+/*
+ *	The WDT needs to learn about soft shutdowns in order to
+ *	turn the timebomb registers off. 
+ */
+ 
+static struct notifier_block wdt_notifier=
+{
+	.notifier_call = wdt_notify_sys,
+	.next = 0,
+	.priority = 0
+};
+
+static void __exit alim7101_wdt_unload(void)
+{
+	wdt_turnoff();
+	/* Deregister */
+	misc_deregister(&wdt_miscdev);
+	unregister_reboot_notifier(&wdt_notifier);
+}
+
+static int __init alim7101_wdt_init(void)
+{
+	int rc = -EBUSY;
+	struct pci_dev *ali1543_south;
+	char tmp;
+
+	printk(KERN_INFO OUR_NAME ": Steve Hill <steve@navaho.co.uk>.\n");
+	alim7101_pmu = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,NULL);
+	if (!alim7101_pmu) {
+		printk(KERN_INFO OUR_NAME ": ALi M7101 PMU not present - WDT not set\n");
+		return -EBUSY;
+	}
+
+	/* Set the WDT in the PMU to 1 second */
+	pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, 0x02);
+
+	ali1543_south = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
+	if (!ali1543_south) {
+		printk(KERN_INFO OUR_NAME ": ALi 1543 South-Bridge not present - WDT not set\n");
+		return -EBUSY;
+	}
+	pci_read_config_byte(ali1543_south, 0x5e, &tmp);
+	if ((tmp & 0x1e) != 0x12) {
+		printk(KERN_INFO OUR_NAME ": ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n");
+		return -EBUSY;
+	}
+
+	init_timer(&timer);
+	timer.function = wdt_timer_ping;
+	timer.data = 1;
+
+	rc = misc_register(&wdt_miscdev);
+	if (rc)
+		return rc;
+
+	rc = register_reboot_notifier(&wdt_notifier);
+	if (rc) {
+		misc_deregister(&wdt_miscdev);
+		return rc;
+	}
+
+	printk(KERN_INFO OUR_NAME ": WDT driver for ALi M7101 initialised.\n");
+	return 0;
+}
+
+module_init(alim7101_wdt_init);
+module_exit(alim7101_wdt_unload);
+
+MODULE_AUTHOR("Steve Hill");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c
--- a/drivers/char/watchdog/eurotechwdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/eurotechwdt.c	Fri Jan 10 12:12:38 2003
@@ -7,23 +7,23 @@
  *	Based on wdt.c.
  *	Original copyright messages:
  *
- *      (c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                              http://www.redhat.com
+ *	(c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
+ *	http://www.redhat.com
  *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- *
- *      Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- *      warranty for any of this software. This material is provided
- *      "AS-IS" and at no charge.
- *
- *      (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>*
- *
- *      14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
- *          Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
- *          Added timeout module option to override default
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License
+ *	as published by the Free Software Foundation; either version
+ *	2 of the License, or (at your option) any later version.
+ *
+ *	Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
+ *	warranty for any of this software. This material is provided
+ *	"AS-IS" and at no charge.
+ *
+ *	(c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
+ *
+ *	14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
+ *	  Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
+ *	  Added timeout module option to override default
  */
 
 #include <linux/config.h>
@@ -49,17 +49,18 @@
 
 static int eurwdt_is_open;
 static spinlock_t eurwdt_lock;
+static char eur_expect_close;
  
 /*
- *      You must set these - there is no sane way to probe for this board.
- *      You can use wdt=x,y to set these now.
+ * You must set these - there is no sane way to probe for this board.
+ * You can use wdt=x,y to set these now.
  */
  
 static int io = 0x3f0;
 static int irq = 10;
 static char *ev = "int";
  
-#define WDT_TIMEOUT		60                /* 1 minute */
+#define WDT_TIMEOUT		60	/* 1 minute */
 static int timeout = WDT_TIMEOUT;
 
 MODULE_PARM(timeout,"i");
@@ -80,10 +81,10 @@
 
 #define WDT_CTRL_REG		0x30
 #define WDT_OUTPIN_CFG		0xe2
-   #define WDT_EVENT_INT	   0x00
-   #define WDT_EVENT_REBOOT	   0x08
+#define WDT_EVENT_INT		0x00
+#define WDT_EVENT_REBOOT	0x08
 #define WDT_UNIT_SEL		0xf1
-   #define WDT_UNIT_SECS	   0x80
+#define WDT_UNIT_SECS		0x80
 #define WDT_TIMEOUT_VAL		0xf2
 #define WDT_TIMER_CFG		0xf3
  
@@ -91,27 +92,27 @@
 #ifndef MODULE
 
 /**
- *      eurwdt_setup:
- *      @str: command line string
+ * eurwdt_setup:
+ * @str: command line string
  *
- *      Setup options. The board isn't really probe-able so we have to
- *      get the user to tell us the configuration. Sane people build it
- *      modular but the others come here.
+ * Setup options. The board isn't really probe-able so we have to
+ * get the user to tell us the configuration. Sane people build it
+ * modular but the others come here.
  */
  
 static int __init eurwdt_setup(char *str)
 {
-   int ints[4];
+	int ints[4];
  
-   str = get_options (str, ARRAY_SIZE(ints), ints);
+str = get_options (str, ARRAY_SIZE(ints), ints);
  
-   if (ints[0] > 0) {
-      io = ints[1];
-      if (ints[0] > 1)
-         irq = ints[2];
-   }
+	if (ints[0] > 0) {
+		io = ints[1];
+		if (ints[0] > 1)
+			irq = ints[2];
+	}
  
-   return 1;
+	return 1;
 }
  
 __setup("wdt=", eurwdt_setup);
@@ -127,7 +128,7 @@
 
 
 /*
- *      Programming support
+ * Programming support
  */
 
 static void __init eurwdt_validate_timeout(void)
@@ -135,265 +136,276 @@
 	if (timeout < 0 || timeout > 255) {
 		timeout = WDT_TIMEOUT;
 		printk(KERN_INFO "eurwdt: timeout must be 0 < x < 255, using %d\n",
-		       timeout);
+			timeout);
 	}
 }
 
 static inline void eurwdt_write_reg(u8 index, u8 data)
 {
-   outb(index, io);
-   outb(data, io+1);
+	outb(index, io);
+	outb(data, io+1);
 }
 
 static inline void eurwdt_lock_chip(void)
 {
-   outb(0xaa, io);
+	outb(0xaa, io);
 }
 
 static inline void eurwdt_unlock_chip(void)
 {
-   outb(0x55, io);
-   eurwdt_write_reg(0x07, 0x08);   /* set the logical device */
+	outb(0x55, io);
+	eurwdt_write_reg(0x07, 0x08);	/* set the logical device */
 }
 
 static inline void eurwdt_set_timeout(int timeout)
 {
-   eurwdt_write_reg(WDT_TIMEOUT_VAL, (u8) timeout);
+	eurwdt_write_reg(WDT_TIMEOUT_VAL, (u8) timeout);
 }
 
 static inline void eurwdt_disable_timer(void)
 {
-   eurwdt_set_timeout(0);
+	eurwdt_set_timeout(0);
 }
  
 static void eurwdt_activate_timer(void)
 {
-   eurwdt_disable_timer();
-   eurwdt_write_reg(WDT_CTRL_REG, 0x01);      /* activate the WDT */
-   eurwdt_write_reg(WDT_OUTPIN_CFG, !strcmp("int", ev) ?
-                                    WDT_EVENT_INT : WDT_EVENT_REBOOT);
-   /* Setting interrupt line */
-   if (irq == 2 || irq > 15 || irq < 0) {
-      printk(KERN_ERR ": invalid irq number\n");
-      irq = 0;   /* if invalid we disable interrupt */
-   }
-   if (irq == 0)
-      printk(KERN_INFO ": interrupt disabled\n");
-   eurwdt_write_reg(WDT_TIMER_CFG, irq<<4);
+	eurwdt_disable_timer();
+	eurwdt_write_reg(WDT_CTRL_REG, 0x01);	/* activate the WDT */
+	eurwdt_write_reg(WDT_OUTPIN_CFG, !strcmp("int", ev) ? WDT_EVENT_INT : WDT_EVENT_REBOOT);
+
+	/* Setting interrupt line */
+	if (irq == 2 || irq > 15 || irq < 0) {
+		printk(KERN_ERR ": invalid irq number\n");
+		irq = 0;	/* if invalid we disable interrupt */
+	}
+	if (irq == 0)
+		printk(KERN_INFO ": interrupt disabled\n");
 
-   eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS);   /* we use seconds */
-   eurwdt_set_timeout(0);                           /* the default timeout */ 
+	eurwdt_write_reg(WDT_TIMER_CFG, irq<<4);
+
+	eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS);	/* we use seconds */
+	eurwdt_set_timeout(0);	/* the default timeout */ 
 }
 
 
 /*
- *      Kernel methods.
+ * Kernel methods.
  */
  
 void eurwdt_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-   printk(KERN_CRIT "timeout WDT timeout\n");
+	printk(KERN_CRIT "timeout WDT timeout\n");
  
 #ifdef ONLY_TESTING
-   printk(KERN_CRIT "Would Reboot.\n");
+	printk(KERN_CRIT "Would Reboot.\n");
 #else
-   printk(KERN_CRIT "Initiating system reboot.\n");
-   machine_restart(NULL);
+	printk(KERN_CRIT "Initiating system reboot.\n");
+	machine_restart(NULL);
 #endif
 }
 
 
 /**
- *      eurwdt_ping:
+ * eurwdt_ping:
  *
- *      Reload counter one with the watchdog timeout.
+ * Reload counter one with the watchdog timeout.
  */
  
 static void eurwdt_ping(void)
 {
-   /* Write the watchdog default value */
-   eurwdt_set_timeout(timeout);
+	/* Write the watchdog default value */
+	eurwdt_set_timeout(timeout);
 }
  
 /**
- *      eurwdt_write:
- *      @file: file handle to the watchdog
- *      @buf: buffer to write (unused as data does not matter here
- *      @count: count of bytes
- *      @ppos: pointer to the position to write. No seeks allowed
+ * eurwdt_write:
+ * @file: file handle to the watchdog
+ * @buf: buffer to write (unused as data does not matter here
+ * @count: count of bytes
+ * @ppos: pointer to the position to write. No seeks allowed
  *
- *      A write to a watchdog device is defined as a keepalive signal. Any
- *      write of data will do, as we we don't define content meaning.
+ * A write to a watchdog device is defined as a keepalive signal. Any
+ * write of data will do, as we we don't define content meaning.
  */
  
 static ssize_t eurwdt_write(struct file *file, const char *buf, size_t count,
 loff_t *ppos)
 {
-   /*  Can't seek (pwrite) on this device  */
-   if (ppos != &file->f_pos)
-      return -ESPIPE;
- 
-   if (count) {
-      eurwdt_ping();   /* the default timeout */
-      return 1;
-   }
+	/*  Can't seek (pwrite) on this device  */
+	if (ppos != &file->f_pos)
+	return -ESPIPE;
+ 
+	if (count) 	{
+		if (!nowayout) {
+			size_t i;
+
+			eur_expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+				if(get_user(c, buf+i))
+					return -EFAULT;
+				if (c == 'V')
+					eur_expect_close = 42;
+			}
+		}
+		eurwdt_ping();	/* the default timeout */
+		return 1;
+	}
 
-   return 0;
+	return 0;
 }
 
 /**
- *      eurwdt_ioctl:
- *      @inode: inode of the device
- *      @file: file handle to the device
- *      @cmd: watchdog command
- *      @arg: argument pointer
+ * eurwdt_ioctl:
+ * @inode: inode of the device
+ * @file: file handle to the device
+ * @cmd: watchdog command
+ * @arg: argument pointer
  *
- *      The watchdog API defines a common set of functions for all watchdogs
- *      according to their available features.
+ * The watchdog API defines a common set of functions for all watchdogs
+ * according to their available features.
  */
  
 static int eurwdt_ioctl(struct inode *inode, struct file *file,
-        unsigned int cmd, unsigned long arg)
+	unsigned int cmd, unsigned long arg)
 {
-   static struct watchdog_info ident = {
-	.options	  = WDIOF_CARDRESET,
-	.firmware_version = 1,
-	.identity	  = "WDT Eurotech CPU-1220/1410",
-   };
-
-   int time;
- 
-   switch(cmd) {
-      default:
-         return -ENOTTY;
-
-      case WDIOC_GETSUPPORT:
-         return copy_to_user((struct watchdog_info *)arg, &ident,
-               sizeof(ident)) ? -EFAULT : 0;
- 
-      case WDIOC_GETBOOTSTATUS:
-         return put_user(0, (int *) arg);
-
-      case WDIOC_KEEPALIVE:
-         eurwdt_ping();
-         return 0;
-
-      case WDIOC_SETTIMEOUT:
-         if (copy_from_user(&time, (int *) arg, sizeof(int)))
-            return -EFAULT;
-
-         /* Sanity check */
-         if (time < 0 || time > 255)
-            return -EINVAL;
-
-         timeout = time; 
-         eurwdt_set_timeout(time); 
-         return 0;
-   }
+	static struct watchdog_info ident = {
+		.options	  = WDIOF_CARDRESET,
+		.firmware_version = 1,
+		.identity	  = "WDT Eurotech CPU-1220/1410",
+	};
+
+	int time;
+ 
+	switch(cmd) {
+	default:
+		return -ENOTTY;
+
+	case WDIOC_GETSUPPORT:
+		return copy_to_user((struct watchdog_info *)arg, &ident,
+			sizeof(ident)) ? -EFAULT : 0;
+ 
+	case WDIOC_GETBOOTSTATUS:
+		return put_user(0, (int *) arg);
+
+	case WDIOC_KEEPALIVE:
+		eurwdt_ping();
+		return 0;
+
+	case WDIOC_SETTIMEOUT:
+		if (copy_from_user(&time, (int *) arg, sizeof(int)))
+			return -EFAULT;
+
+		/* Sanity check */
+		if (time < 0 || time > 255)
+			return -EINVAL;
+
+		timeout = time; 
+		eurwdt_set_timeout(time); 
+		return 0;
+	}
 }
 
 /**
- *      eurwdt_open:
- *      @inode: inode of device
- *      @file: file handle to device
+ * eurwdt_open:
+ * @inode: inode of device
+ * @file: file handle to device
  *
- *      The misc device has been opened. The watchdog device is single
- *      open and on opening we load the counter.
+ * The misc device has been opened. The watchdog device is single
+ * open and on opening we load the counter.
  */
  
 static int eurwdt_open(struct inode *inode, struct file *file)
 {
-   switch (minor(inode->i_rdev)) {
-      case WATCHDOG_MINOR:
-         spin_lock(&eurwdt_lock);
-         if (eurwdt_is_open) {
-            spin_unlock(&eurwdt_lock);
-            return -EBUSY;
-         }
-	 if (nowayout) {
-		 MOD_INC_USE_COUNT;
-	 }
-
-         eurwdt_is_open = 1;
-
-         /* Activate the WDT */
-         eurwdt_activate_timer(); 
-            
-         spin_unlock(&eurwdt_lock);
-
-         MOD_INC_USE_COUNT;
-
-         return 0;
-
-         case TEMP_MINOR:
-            return 0;
-
-         default:
-            return -ENODEV;
-   }
+	switch (minor(inode->i_rdev)) {
+	case WATCHDOG_MINOR:
+		spin_lock(&eurwdt_lock);
+		if (eurwdt_is_open) {
+			spin_unlock(&eurwdt_lock);
+			return -EBUSY;
+		}
+		 if (nowayout)
+			 MOD_INC_USE_COUNT;
+
+		eurwdt_is_open = 1;
+
+		/* Activate the WDT */
+		eurwdt_activate_timer(); 
+
+		spin_unlock(&eurwdt_lock);
+
+		MOD_INC_USE_COUNT;
+		return 0;
+
+	case TEMP_MINOR:
+		return 0;
+
+	default:
+		return -ENODEV;
+	}
 }
  
 /**
- *      eurwdt_release:
- *      @inode: inode to board
- *      @file: file handle to board
- *
- *      The watchdog has a configurable API. There is a religious dispute
- *      between people who want their watchdog to be able to shut down and
- *      those who want to be sure if the watchdog manager dies the machine
- *      reboots. In the former case we disable the counters, in the latter
- *      case you have to open it again very soon.
+ * eurwdt_release:
+ * @inode: inode to board
+ * @file: file handle to board
+ *
+ * The watchdog has a configurable API. There is a religious dispute
+ * between people who want their watchdog to be able to shut down and
+ * those who want to be sure if the watchdog manager dies the machine
+ * reboots. In the former case we disable the counters, in the latter
+ * case you have to open it again very soon.
  */
  
 static int eurwdt_release(struct inode *inode, struct file *file)
 {
-   if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
-	   if (!nowayout) {
-		   eurwdt_disable_timer();
-	   }
-	   eurwdt_is_open = 0;
+	if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
+		if (!nowayout)
+			eurwdt_disable_timer();
 
-	   MOD_DEC_USE_COUNT;
-   }
+		eurwdt_is_open = 0;
+		MOD_DEC_USE_COUNT;
+	}
 
-   return 0;
+	return 0;
 }
  
 /**
- *      eurwdt_notify_sys:
- *      @this: our notifier block
- *      @code: the event being reported
- *      @unused: unused
- *
- *      Our notifier is called on system shutdowns. We want to turn the card
- *      off at reboot otherwise the machine will reboot again during memory
- *      test or worse yet during the following fsck. This would suck, in fact
- *      trust me - if it happens it does suck.
+ * eurwdt_notify_sys:
+ * @this: our notifier block
+ * @code: the event being reported
+ * @unused: unused
+ *
+ * Our notifier is called on system shutdowns. We want to turn the card
+ * off at reboot otherwise the machine will reboot again during memory
+ * test or worse yet during the following fsck. This would suck, in fact
+ * trust me - if it happens it does suck.
  */
  
 static int eurwdt_notify_sys(struct notifier_block *this, unsigned long code,
-        void *unused)
+	void *unused)
 {
-   if (code == SYS_DOWN || code == SYS_HALT) {
-      /* Turn the card off */
-      eurwdt_disable_timer();
-   }
+	if (code == SYS_DOWN || code == SYS_HALT) {
+		/* Turn the card off */
+		eurwdt_disable_timer();
+	}
 
-   return NOTIFY_DONE;
+	return NOTIFY_DONE;
 }
  
 /*
- *      Kernel Interfaces
+ * Kernel Interfaces
  */
  
  
 static struct file_operations eurwdt_fops = {
-        .owner          = THIS_MODULE,
-        .llseek         = no_llseek,
-        .write          = eurwdt_write,
-        .ioctl          = eurwdt_ioctl,
-        .open           = eurwdt_open,
-        .release        = eurwdt_release,
+	.owner	= THIS_MODULE,
+	.llseek	= no_llseek,
+	.write	= eurwdt_write,
+	.ioctl	= eurwdt_ioctl,
+	.open	= eurwdt_open,
+	.release	= eurwdt_release,
 };
 
 static struct miscdevice eurwdt_miscdev = {
@@ -403,8 +415,8 @@
 };
  
 /*
- *      The WDT card needs to learn about soft shutdowns in order to
- *      turn the timebomb registers off.
+ * The WDT card needs to learn about soft shutdowns in order to
+ * turn the timebomb registers off.
  */
  
 static struct notifier_block eurwdt_notifier = {
@@ -412,85 +424,85 @@
 };
  
 /**
- *      cleanup_module:
+ * cleanup_module:
  *
- *      Unload the watchdog. You cannot do this with any file handles open.
- *      If your watchdog is set to continue ticking on close and you unload
- *      it, well it keeps ticking. We won't get the interrupt but the board
- *      will not touch PC memory so all is fine. You just have to load a new
- *      module in 60 seconds or reboot.
+ * Unload the watchdog. You cannot do this with any file handles open.
+ * If your watchdog is set to continue ticking on close and you unload
+ * it, well it keeps ticking. We won't get the interrupt but the board
+ * will not touch PC memory so all is fine. You just have to load a new
+ * module in 60 seconds or reboot.
  */
  
 static void __exit eurwdt_exit(void)
 {
-   eurwdt_lock_chip();
+	eurwdt_lock_chip();
 
-   misc_deregister(&eurwdt_miscdev);
+	misc_deregister(&eurwdt_miscdev);
 
-   unregister_reboot_notifier(&eurwdt_notifier);
-   release_region(io, 2);
-   free_irq(irq, NULL);
+	unregister_reboot_notifier(&eurwdt_notifier);
+	release_region(io, 2);
+	free_irq(irq, NULL);
 }
  
 /**
- *      eurwdt_init:
+ * eurwdt_init:
  *
- *      Set up the WDT watchdog board. After grabbing the resources 
- *      we require we need also to unlock the device.
- *      The open() function will actually kick the board off.
+ * Set up the WDT watchdog board. After grabbing the resources 
+ * we require we need also to unlock the device.
+ * The open() function will actually kick the board off.
  */
  
 static int __init eurwdt_init(void)
 {
-   int ret;
+	int ret;
+
+	eurwdt_validate_timeout();
+	ret = misc_register(&eurwdt_miscdev);
+	if (ret) {
+		printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n",
+		WATCHDOG_MINOR);
+		goto out;
+	}
+
+	ret = request_irq(irq, eurwdt_interrupt, SA_INTERRUPT, "eurwdt", NULL);
+	if(ret) {
+		printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq);
+		goto outmisc;
+	}
+
+	if (!request_region(io, 2, "eurwdt")) {
+		printk(KERN_ERR "eurwdt: IO %X is not free.\n", io);
+		ret = -EBUSY;
+		goto outirq;
+	}
+
+	ret = register_reboot_notifier(&eurwdt_notifier);
+	if (ret) {
+		printk(KERN_ERR "eurwdt: can't register reboot notifier (err=%d)\n", ret);
+		goto outreg;
+	}
+
+	eurwdt_unlock_chip();
+ 
+	ret = 0;
+	printk(KERN_INFO "Eurotech WDT driver 0.01 at %X (Interrupt %d)"
+		" - timeout event: %s\n", 
+		io, irq, (!strcmp("int", ev) ? "int" : "reboot"));
+
+	spin_lock_init(&eurwdt_lock);
+
+out:
+	return ret;
+ 
+outreg:
+	release_region(io, 2);
+
+outirq:
+	free_irq(irq, NULL);
 
-   eurwdt_validate_timeout();
-   ret = misc_register(&eurwdt_miscdev);
-   if (ret) {
-      printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n",
-            WATCHDOG_MINOR);
-      goto out;
-   }
-
-   ret = request_irq(irq, eurwdt_interrupt, SA_INTERRUPT, "eurwdt", NULL);
-   if(ret) {
-      printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq);
-      goto outmisc;
-   }
-
-   if (!request_region(io, 2, "eurwdt")) {
-       printk(KERN_ERR "eurwdt: IO %X is not free.\n", io);
-       ret = -EBUSY;
-       goto outirq;
-   }
-
-   ret = register_reboot_notifier(&eurwdt_notifier);
-   if (ret) {
-      printk(KERN_ERR "eurwdt: can't register reboot notifier (err=%d)\n", ret);
-      goto outreg;
-   }
-
-   eurwdt_unlock_chip();
- 
-   ret = 0;
-   printk(KERN_INFO "Eurotech WDT driver 0.01 at %X (Interrupt %d)"
-                    " - timeout event: %s\n", 
-         io, irq, (!strcmp("int", ev) ? "int" : "reboot"));
-
-   spin_lock_init(&eurwdt_lock);
-
-   out:
-      return ret;
- 
-   outreg:
-      release_region(io, 2);
-
-   outirq:
-      free_irq(irq, NULL);
-
-   outmisc:
-      misc_deregister(&eurwdt_miscdev);
-      goto out;
+outmisc:
+	misc_deregister(&eurwdt_miscdev);
+	goto out;
 }
  
 module_init(eurwdt_init);
diff -Nru a/drivers/char/watchdog/i810-tco.c b/drivers/char/watchdog/i810-tco.c
--- a/drivers/char/watchdog/i810-tco.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/char/watchdog/i810-tco.c	Fri Jan 10 12:12:37 2003
@@ -244,7 +244,9 @@
 	int options, retval = -EINVAL;
 
 	static struct watchdog_info ident = {
-		.options =		WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
+		.options =		WDIOF_SETTIMEOUT |
+					WDIOF_KEEPALIVEPING |
+					WDIOF_MAGICCLOSE,
 		.firmware_version =	0,
 		.identity =		"i810 TCO timer",
 	};
diff -Nru a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c
--- a/drivers/char/watchdog/ib700wdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/ib700wdt.c	Fri Jan 10 12:12:38 2003
@@ -54,6 +54,7 @@
 
 static int ibwdt_is_open;
 static spinlock_t ibwdt_lock;
+static int expect_close = 0;
 
 /*
  *
@@ -136,6 +137,21 @@
 		return -ESPIPE;
 
 	if (count) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+
+				if (get_user(c, buf + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		ibwdt_ping();
 		return 1;
 	}
@@ -153,7 +169,9 @@
 	  unsigned long arg)
 {
 	static struct watchdog_info ident = {
-		WDIOF_KEEPALIVEPING, 1, "IB700 WDT"
+		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "IB700 WDT"
 	};
 
 	switch (cmd) {
@@ -180,42 +198,38 @@
 static int
 ibwdt_open(struct inode *inode, struct file *file)
 {
-	switch (minor(inode->i_rdev)) {
-		case WATCHDOG_MINOR:
-			spin_lock(&ibwdt_lock);
-			if (ibwdt_is_open) {
-				spin_unlock(&ibwdt_lock);
-				return -EBUSY;
-			}
-			if (nowayout) {
-				MOD_INC_USE_COUNT;
-			}
-			/*
-			 *	Activate
-			 */
-
-			ibwdt_is_open = 1;
-			ibwdt_ping();
+	if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
+		spin_lock(&ibwdt_lock);
+		if (ibwdt_is_open) {
 			spin_unlock(&ibwdt_lock);
-			return 0;
-		default:
-			return -ENODEV;
+			return -EBUSY;
+		}
+		if (nowayout)
+			MOD_INC_USE_COUNT;
+
+		/* Activate */
+		ibwdt_is_open = 1;
+		ibwdt_ping();
+		spin_unlock(&ibwdt_lock);
+		return 0;
+	} else {	
+		return -ENODEV;
 	}
 }
 
 static int
 ibwdt_close(struct inode *inode, struct file *file)
 {
-	lock_kernel();
 	if (minor(inode->i_rdev) == WATCHDOG_MINOR) {
 		spin_lock(&ibwdt_lock);
-		if (!nowayout) {
+		if (expect_close)
 			outb_p(timeout_val, WDT_STOP);
-		}
+		else
+			printk(KERN_CRIT "WDT device closed unexpectedly.  WDT will not stop!\n");
+
 		ibwdt_is_open = 0;
 		spin_unlock(&ibwdt_lock);
 	}
-	unlock_kernel();
 	return 0;
 }
 
@@ -248,9 +262,9 @@
 };
 
 static struct miscdevice ibwdt_miscdev = {
-	WATCHDOG_MINOR,
-	"watchdog",
-	&ibwdt_fops
+	.minor = WATCHDOG_MINOR,
+	.name = "watchdog",
+	.fops = &ibwdt_fops
 };
 
 /*
@@ -259,9 +273,9 @@
  */
 
 static struct notifier_block ibwdt_notifier = {
-	ibwdt_notify_sys,
-	NULL,
-	0
+	.notifier_call = ibwdt_notify_sys,
+	.next = NULL,
+	.priority = 0
 };
 
 static int __init
diff -Nru a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/watchdog/indydog.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,182 @@
+/*
+ *	IndyDog	0.2	A Hardware Watchdog Device for SGI IP22
+ *
+ *	(c) Copyright 2002 Guido Guenther <agx@sigxcpu.org>, All Rights Reserved.
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License
+ *	as published by the Free Software Foundation; either version
+ *	2 of the License, or (at your option) any later version.
+ *	
+ *	based on softdog.c by Alan Cox <alan@redhat.com>
+ */
+ 
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <asm/sgi/sgimc.h>
+
+static unsigned long indydog_alive;
+static struct sgimc_misc_ctrl *mcmisc_regs; 
+static int expect_close = 0;
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+static void indydog_ping()
+{
+	mcmisc_regs->watchdogt = 0;
+}
+
+
+/*
+ *	Allow only one person to hold it open
+ */
+
+static int indydog_open(struct inode *inode, struct file *file)
+{
+	u32 mc_ctrl0;
+	
+	if( test_and_set_bit(0,&indydog_alive) )
+		return -EBUSY;
+
+	if (nowayout)
+		MOD_INC_USE_COUNT;
+
+	/*
+	 *	Activate timer
+	 */
+	mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000);
+
+	mc_ctrl0 = mcmisc_regs->cpuctrl0 | SGIMC_CCTRL0_WDOG;
+	mcmisc_regs->cpuctrl0 = mc_ctrl0;
+	indydog_ping();
+			
+	printk("Started watchdog timer.\n");
+	return 0;
+}
+
+static int indydog_release(struct inode *inode, struct file *file)
+{
+	/*
+	 *	Shut off the timer.
+	 * 	Lock it in if it's a module and we set nowayout
+	 */
+
+	if (expect_close) {
+		u32 mc_ctrl0 = mcmisc_regs->cpuctrl0; 
+		mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
+		mcmisc_regs->cpuctrl0 = mc_ctrl0;
+		printk("Stopped watchdog timer.\n");
+	} else {
+		printk(KERN_CRIT "WDT device closed unexpectedly.  WDT will not stop!\n");
+	}
+	clear_bit(0,&indydog_alive);
+	return 0;
+}
+
+static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
+{
+	/*  Can't seek (pwrite) on this device  */
+	if (ppos != &file->f_pos)
+		return -ESPIPE;
+
+	/* Refresh the timer. */
+	if (len) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+
+				if (get_user(c, data + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
+		indydog_ping();
+		return 1;
+	}
+	return 0;
+}
+
+static int indydog_ioctl(struct inode *inode, struct file *file,
+	unsigned int cmd, unsigned long arg)
+{
+	static struct watchdog_info ident = {
+		.options = WDIOF_MAGICCLOSE,
+		.identity = "Hardware Watchdog for SGI IP22",
+	};
+
+	switch (cmd) {
+		default:
+			return -ENOIOCTLCMD;
+		case WDIOC_GETSUPPORT:
+			if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+				return -EFAULT;
+			return 0;
+		case WDIOC_GETSTATUS:
+		case WDIOC_GETBOOTSTATUS:
+			return put_user(0,(int *)arg);
+		case WDIOC_KEEPALIVE:
+			indydog_ping();
+			return 0;
+	}
+}
+
+static struct file_operations indydog_fops = {
+	.owner	= THIS_MODULE,
+	.write	= indydog_write,
+	.ioctl	= indydog_ioctl,
+	.open	= indydog_open,
+	.release= indydog_release,
+};
+
+static struct miscdevice indydog_miscdev = {
+	.minor	= WATCHDOG_MINOR,
+	.name	= "watchdog",
+	.fops	= &indydog_fops,
+};
+
+static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.2\n";
+
+static int __init watchdog_init(void)
+{
+	int ret;
+
+	ret = misc_register(&indydog_miscdev);
+
+	if (ret)
+		return ret;
+
+	printk(banner);
+
+	return 0;
+}
+
+static void __exit watchdog_exit(void)
+{
+	misc_deregister(&indydog_miscdev);
+}
+
+module_init(watchdog_init);
+module_exit(watchdog_exit);
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
--- a/drivers/char/watchdog/machzwd.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/machzwd.c	Fri Jan 10 12:12:38 2003
@@ -117,7 +117,7 @@
 #define PFX "machzwd"
 
 static struct watchdog_info zf_info = {
-	.options		= WDIOF_KEEPALIVEPING, 
+	.options		= WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE, 
 	.firmware_version	= 1, 
 	.identity		= "ZF-Logic watchdog"
 };
@@ -314,10 +314,10 @@
 	/* See if we got the magic character */
 	if(count){
 
-/*
- * no need to check for close confirmation
- * no way to disable watchdog ;)
- */
+		/*
+		 * no need to check for close confirmation
+		 * no way to disable watchdog ;)
+		 */
 		if (!nowayout) {
 			size_t ofs;
 			
@@ -328,7 +328,7 @@
 			zf_expect_close = 0;
 			
 			/* now scan */
-			for(ofs = 0; ofs != count; ofs++){
+			for (ofs = 0; ofs != count; ofs++){
 				char c;
 				if (get_user(c, buf + ofs))
 					return -EFAULT;
@@ -338,6 +338,7 @@
 				}
 			}
 		}
+
 		/*
 		 * Well, anyhow someone wrote to us,
 		 * we should return that favour
@@ -395,9 +396,9 @@
 				return -EBUSY;
 			}
 
-			if (nowayout) {
+			if (nowayout)
 				MOD_INC_USE_COUNT;
-			}
+
 			zf_is_open = 1;
 
 			spin_unlock(&zf_lock);
diff -Nru a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c
--- a/drivers/char/watchdog/mixcomwd.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/mixcomwd.c	Fri Jan 10 12:12:38 2003
@@ -62,6 +62,7 @@
 static int watchdog_port;
 static int mixcomwd_timer_alive;
 static struct timer_list mixcomwd_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static int expect_close = 0;
 
 #ifdef CONFIG_WATCHDOG_NOWAYOUT
 static int nowayout = 1;
@@ -109,8 +110,7 @@
 
 static int mixcomwd_release(struct inode *inode, struct file *file)
 {
-
-	if (!nowayout) {
+	if (expect_close) {
 		if(mixcomwd_timer_alive) {
 			printk(KERN_ERR "mixcomwd: release called while internal timer alive");
 			return -EBUSY;
@@ -121,7 +121,10 @@
 		mixcomwd_timer.data=0;
 		mixcomwd_timer_alive=1;
 		add_timer(&mixcomwd_timer);
+	} else {
+		printk(KERN_CRIT "mixcomwd: WDT device closed unexpectedly.  WDT will not stop!\n");
 	}
+
 	clear_bit(0,&mixcomwd_opened);
 	return 0;
 }
@@ -135,6 +138,20 @@
 
 	if(len)
 	{
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+				if (get_user(c, data + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		mixcomwd_ping();
 		return 1;
 	}
@@ -145,8 +162,10 @@
 	unsigned int cmd, unsigned long arg)
 {
 	int status;
-        static struct watchdog_info ident = {
-		WDIOF_KEEPALIVEPING, 1, "MixCOM watchdog"
+	static struct watchdog_info ident = {
+		.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "MixCOM watchdog"
 	};
                                         
 	switch(cmd)
diff -Nru a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c
--- a/drivers/char/watchdog/pcwd.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/char/watchdog/pcwd.c	Fri Jan 10 12:12:37 2003
@@ -40,6 +40,8 @@
  *		fairly useless proc entry.
  * 990610	removed said useless proc code for the merge <alan>
  * 000403	Removed last traces of proc code. <davej>
+ * 011214	Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT <Matt_Domsch@dell.com>
+ *              Added timeout module option to override default
  */
 
 #include <linux/module.h>
@@ -76,7 +78,7 @@
  */
 static int pcwd_ioports[] = { 0x270, 0x350, 0x370, 0x000 };
 
-#define WD_VER                  "1.10 (06/05/99)"
+#define WD_VER                  "1.12 (12/14/2001)"
 
 /*
  * It should be noted that PCWD_REVISION_B was removed because A and B
@@ -88,7 +90,23 @@
 #define	PCWD_REVISION_A		1
 #define	PCWD_REVISION_C		2
 
-#define	WD_TIMEOUT		3	/* 1 1/2 seconds for a timeout */
+#define	WD_TIMEOUT		4	/* 2 seconds for a timeout */
+static int timeout_val = WD_TIMEOUT;
+static int timeout = 2;
+static int expect_close = 0;
+
+MODULE_PARM(timeout,"i");
+MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=2)"); 
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
 
 /*
  * These are the defines for the PC Watchdog card, revision A.
@@ -121,7 +139,7 @@
 	if (prev_card_dat == 0xFF)
 		return 0;
 
-	while(count < WD_TIMEOUT) {
+	while(count < timeout_val) {
 
 	/* Read the raw card data from the port, and strip off the
 	   first 4 bits */
@@ -256,7 +274,7 @@
 		else
 			cdat = inb(current_readport + 1 );
 		spin_unlock(&io_lock);
-		rv = 0;
+		rv = WDIOF_MAGICCLOSE;
 
 		if (revision == PCWD_REVISION_A) 
 		{
@@ -385,8 +403,22 @@
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
 
-	if (len)
-	{
+	if (len) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+
+				if (get_user(c, buf + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		pcwd_send_heartbeat();
 		return 1;
 	}
@@ -395,28 +427,26 @@
 
 static int pcwd_open(struct inode *ino, struct file *filep)
 {
-        switch (minor(ino->i_rdev))
-        {
-                case WATCHDOG_MINOR:
-                    if ( !atomic_dec_and_test(&open_allowed) )
-		    {
+	switch (minor(ino->i_rdev)) {
+	case WATCHDOG_MINOR:
+		if (!atomic_dec_and_test(&open_allowed) ) {
 			atomic_inc( &open_allowed );
-                        return -EBUSY;
-                    }
-		    MOD_INC_USE_COUNT;
-                    /*  Enable the port  */
-                    if (revision == PCWD_REVISION_C)
-                    {
-                    	spin_lock(&io_lock);
-                    	outb_p(0x00, current_readport + 3);
-                    	spin_unlock(&io_lock);
-                    }
-                    return(0);
-                case TEMP_MINOR:
-                    return(0);
-                default:
-                    return (-ENODEV);
-        }
+			return -EBUSY;
+		}
+		MOD_INC_USE_COUNT;
+		/*  Enable the port  */
+		if (revision == PCWD_REVISION_C) {
+			spin_lock(&io_lock);
+			outb_p(0x00, current_readport + 3);
+			spin_unlock(&io_lock);
+		}
+		return(0);
+
+	case TEMP_MINOR:
+		return(0);
+	default:
+		return (-ENODEV);
+	}
 }
 
 static ssize_t pcwd_read(struct file *file, char *buf, size_t count,
@@ -448,18 +478,17 @@
 
 static int pcwd_close(struct inode *ino, struct file *filep)
 {
-	if (minor(ino->i_rdev)==WATCHDOG_MINOR)
-	{
-#ifndef CONFIG_WATCHDOG_NOWAYOUT
-		/*  Disable the board  */
-		if (revision == PCWD_REVISION_C) {
-			spin_lock(&io_lock);
-			outb_p(0xA5, current_readport + 3);
-			outb_p(0xA5, current_readport + 3);
-			spin_unlock(&io_lock);
+	if (minor(ino->i_rdev)==WATCHDOG_MINOR) {
+		if (expect_close) {
+			/*  Disable the board  */
+			if (revision == PCWD_REVISION_C) {
+				spin_lock(&io_lock);
+				outb_p(0xA5, current_readport + 3);
+				outb_p(0xA5, current_readport + 3);
+				spin_unlock(&io_lock);
+			}
+			atomic_inc( &open_allowed );
 		}
-	        atomic_inc( &open_allowed );
-#endif
 	}
 	return 0;
 }
@@ -560,9 +589,15 @@
 	&pcwd_fops
 };
  
+static void __init pcwd_validate_timeout(void)
+{
+	timeout_val = timeout * 2;
+}
+ 
 static int __init pcwatchdog_init(void)
 {
 	int i, found = 0;
+	pcwd_validate_timeout();
 	spin_lock_init(&io_lock);
 	
 	revision = PCWD_REVISION_A;
diff -Nru a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c
--- a/drivers/char/watchdog/sbc60xxwdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/sbc60xxwdt.c	Fri Jan 10 12:12:38 2003
@@ -244,9 +244,9 @@
 {
 	static struct watchdog_info ident=
 	{
-		0,
-		1,
-		"SB60xx"
+		.options = WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "SB60xx"
 	};
 	
 	switch(cmd)
diff -Nru a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/watchdog/sc1200wdt.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,479 @@
+/*
+ *	National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver
+ *	(c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>,
+ *			All Rights Reserved.
+ *	Based on wdt.c and wdt977.c by Alan Cox and Woody Suwalski respectively.
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License
+ *	as published by the Free Software Foundation; either version
+ *	2 of the License, or (at your option) any later version.
+ *
+ *	The author(s) of this software shall not be held liable for damages
+ *	of any nature resulting due to the use of this software. This
+ *	software is provided AS-IS with no warranties.
+ *
+ *	Changelog:
+ *	20020220 Zwane Mwaikambo	Code based on datasheet, no hardware.
+ *	20020221 Zwane Mwaikambo	Cleanups as suggested by Jeff Garzik and Alan Cox.
+ *	20020222 Zwane Mwaikambo	Added probing.
+ *	20020225 Zwane Mwaikambo	Added ISAPNP support.
+ *	20020412 Rob Radez		Broke out start/stop functions
+ *		 <rob@osinvestor.com>	Return proper status instead of temperature warning
+ *					Add WDIOC_GETBOOTSTATUS and WDIOC_SETOPTIONS ioctls
+ *					Fix CONFIG_WATCHDOG_NOWAYOUT
+ *	20020530 Joel Becker		Add Matt Domsch's nowayout module option
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/ioport.h>
+#include <linux/spinlock.h>
+#include <linux/ioport.h>
+#include <asm/semaphore.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+#include <linux/isapnp.h>
+#include <linux/pci.h>
+
+#define SC1200_MODULE_VER	"build 20020303"
+#define SC1200_MODULE_NAME	"sc1200wdt"
+#define PFX			SC1200_MODULE_NAME ": "
+
+#define	MAX_TIMEOUT	255	/* 255 minutes */
+#define PMIR		(io)	/* Power Management Index Register */
+#define PMDR		(io+1)	/* Power Management Data Register */
+
+/* Data Register indexes */
+#define FER1		0x00	/* Function enable register 1 */
+#define FER2		0x01	/* Function enable register 2 */
+#define PMC1		0x02	/* Power Management Ctrl 1 */
+#define PMC2		0x03	/* Power Management Ctrl 2 */
+#define PMC3		0x04	/* Power Management Ctrl 3 */
+#define WDTO		0x05	/* Watchdog timeout register */
+#define	WDCF		0x06	/* Watchdog config register */
+#define WDST		0x07	/* Watchdog status register */
+
+/* WDCF bitfields - which devices assert WDO */
+#define KBC_IRQ		0x01	/* Keyboard Controller */
+#define MSE_IRQ		0x02	/* Mouse */
+#define UART1_IRQ	0x03	/* Serial0 */
+#define UART2_IRQ	0x04	/* Serial1 */
+/* 5 -7 are reserved */
+
+static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER;
+static int timeout = 1;
+static int io = -1;
+static int io_len = 2;		/* for non plug and play */
+struct semaphore open_sem;
+static char expect_close;
+spinlock_t sc1200wdt_lock;	/* io port access serialisation */
+
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+static int isapnp = 1;
+static struct pci_dev *wdt_dev;
+
+MODULE_PARM(isapnp, "i");
+MODULE_PARM_DESC(isapnp, "When set to 0 driver ISA PnP support will be disabled");
+#endif
+
+MODULE_PARM(io, "i");
+MODULE_PARM_DESC(io, "io port");
+MODULE_PARM(timeout, "i");
+MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1");
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+
+
+/* Read from Data Register */
+static inline void sc1200wdt_read_data(unsigned char index, unsigned char *data)
+{
+	spin_lock(&sc1200wdt_lock);
+	outb_p(index, PMIR);
+	*data = inb(PMDR);
+	spin_unlock(&sc1200wdt_lock);
+}
+
+
+/* Write to Data Register */
+static inline void sc1200wdt_write_data(unsigned char index, unsigned char data)
+{
+	spin_lock(&sc1200wdt_lock);
+	outb_p(index, PMIR);
+	outb(data, PMDR);
+	spin_unlock(&sc1200wdt_lock);
+}
+
+
+static void sc1200wdt_start(void)
+{
+	unsigned char reg;
+
+	sc1200wdt_read_data(WDCF, &reg);
+	/* assert WDO when any of the following interrupts are triggered too */
+	reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ);
+	sc1200wdt_write_data(WDCF, reg);
+	/* set the timeout and get the ball rolling */
+	sc1200wdt_write_data(WDTO, timeout);
+}
+
+
+static void sc1200wdt_stop(void)
+{
+	sc1200wdt_write_data(WDTO, 0);
+}
+
+
+/* This returns the status of the WDO signal, inactive high. */
+static inline int sc1200wdt_status(void)
+{
+	unsigned char ret;
+
+	sc1200wdt_read_data(WDST, &ret);
+	/* If the bit is inactive, the watchdog is enabled, so return
+	 * KEEPALIVEPING which is a bit of a kludge because there's nothing
+	 * else for enabled/disabled status
+	 */
+	return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING;	/* bits 1 - 7 are undefined */
+}
+
+
+static int sc1200wdt_open(struct inode *inode, struct file *file)
+{
+	/* allow one at a time */
+	if (down_trylock(&open_sem))
+		return -EBUSY;
+
+	if (timeout > MAX_TIMEOUT)
+		timeout = MAX_TIMEOUT;
+
+	sc1200wdt_start();
+	printk(KERN_INFO PFX "Watchdog enabled, timeout = %d min(s)", timeout);
+
+	return 0;
+}
+
+
+static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+	int new_timeout;
+	static struct watchdog_info ident = {
+		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+		.firmware_version = 0,
+		.identity = "PC87307/PC97307"
+	};
+
+	switch (cmd) {
+		default:
+			return -ENOTTY;	/* Keep Pavel Machek amused ;) */
+
+		case WDIOC_GETSUPPORT:
+			if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof ident))
+				return -EFAULT;
+			return 0;
+
+		case WDIOC_GETSTATUS:
+			return put_user(sc1200wdt_status(), (int *)arg);
+
+		case WDIOC_GETBOOTSTATUS:
+			return put_user(0, (int *)arg);
+
+		case WDIOC_KEEPALIVE:
+			sc1200wdt_write_data(WDTO, timeout);
+			return 0;
+
+		case WDIOC_SETTIMEOUT:
+			if (get_user(new_timeout, (int *)arg))
+				return -EFAULT;
+
+			/* the API states this is given in secs */
+			new_timeout /= 60;
+			if (new_timeout < 0 || new_timeout > MAX_TIMEOUT)
+				return -EINVAL;
+
+			timeout = new_timeout;
+			sc1200wdt_write_data(WDTO, timeout);
+			/* fall through and return the new timeout */
+
+		case WDIOC_GETTIMEOUT:
+			return put_user(timeout * 60, (int *)arg);
+
+		case WDIOC_SETOPTIONS:
+		{
+			int options, retval = -EINVAL;
+
+			if (get_user(options, (int *)arg))
+				return -EFAULT;
+
+			if (options & WDIOS_DISABLECARD) {
+				sc1200wdt_stop();
+				retval = 0;
+			}
+
+			if (options & WDIOS_ENABLECARD) {
+				sc1200wdt_start();
+				retval = 0;
+			}
+
+			return retval;
+		}
+	}
+}
+
+
+static int sc1200wdt_release(struct inode *inode, struct file *file)
+{
+	if (expect_close == 42) {
+		sc1200wdt_stop();
+		printk(KERN_INFO PFX "Watchdog disabled\n");
+	} else {
+		sc1200wdt_write_data(WDTO, timeout);
+		printk(KERN_CRIT PFX "Unexpected close!, timeout = %d min(s)\n", timeout);
+	}
+	up(&open_sem);
+	expect_close = 0;
+
+	return 0;
+}
+
+
+static ssize_t sc1200wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
+{
+	if (ppos != &file->f_pos)
+		return -ESPIPE;
+	
+	if (len) {
+		if (!nowayout) {
+			size_t i;
+
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+
+				if (get_user(c, data+i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 42;
+			}
+		}
+
+		sc1200wdt_write_data(WDTO, timeout);
+		return len;
+	}
+
+	return 0;
+}
+
+
+static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
+{
+	if (code == SYS_DOWN || code == SYS_HALT)
+		sc1200wdt_stop();
+
+	return NOTIFY_DONE;
+}
+
+
+static struct notifier_block sc1200wdt_notifier =
+{
+	notifier_call:	sc1200wdt_notify_sys
+};
+
+static struct file_operations sc1200wdt_fops =
+{
+	owner:		THIS_MODULE,
+	write:		sc1200wdt_write,
+	ioctl:		sc1200wdt_ioctl,
+	open:		sc1200wdt_open,
+	release:	sc1200wdt_release
+};
+
+static struct miscdevice sc1200wdt_miscdev =
+{
+	minor:		WATCHDOG_MINOR,
+	name:		"watchdog",
+	fops:		&sc1200wdt_fops,
+};
+
+
+static int __init sc1200wdt_probe(void)
+{
+	/* The probe works by reading the PMC3 register's default value of 0x0e
+	 * there is one caveat, if the device disables the parallel port or any
+	 * of the UARTs we won't be able to detect it.
+	 * Nb. This could be done with accuracy by reading the SID registers, but
+	 * we don't have access to those io regions.
+	 */
+	
+	unsigned char reg;
+
+	sc1200wdt_read_data(PMC3, &reg);
+	reg &= 0x0f;				/* we don't want the UART busy bits */
+	return (reg == 0x0e) ? 0 : -ENODEV;
+}
+
+
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+
+static int __init sc1200wdt_isapnp_probe(void)
+{
+	int ret;
+
+	/* The WDT is logical device 8 on the main device */
+	wdt_dev = isapnp_find_dev(NULL, ISAPNP_VENDOR('N','S','C'), ISAPNP_FUNCTION(0x08), NULL);
+	if (!wdt_dev)
+		return -ENODEV;
+	
+	if (wdt_dev->prepare(wdt_dev) < 0) {
+		printk(KERN_ERR PFX "ISA PnP found device that could not be autoconfigured\n");
+		return -EAGAIN;
+	}
+
+	if (!(pci_resource_flags(wdt_dev, 0) & IORESOURCE_IO)) {
+		printk(KERN_ERR PFX "ISA PnP could not find io ports\n");
+		return -ENODEV;
+	}
+
+	ret = wdt_dev->activate(wdt_dev);
+	if (ret && (ret != -EBUSY))
+		return -ENOMEM;
+
+	/* io port resource overriding support? */
+	io = pci_resource_start(wdt_dev, 0);
+	io_len = pci_resource_len(wdt_dev, 0);
+
+	printk(KERN_DEBUG PFX "ISA PnP found device at io port %#x/%d\n", io, io_len);
+	return 0;
+}
+
+#endif /* CONFIG_ISAPNP */
+
+
+static int __init sc1200wdt_init(void)
+{
+	int ret;
+
+	printk(banner);
+
+	spin_lock_init(&sc1200wdt_lock);
+	sema_init(&open_sem, 1);
+
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+	if (isapnp) {
+		ret = sc1200wdt_isapnp_probe();
+		if (ret)
+			goto out_clean;
+	}
+#endif
+
+	if (io == -1) {
+		printk(KERN_ERR PFX "io parameter must be specified\n");
+		ret = -EINVAL;
+		goto out_clean;
+	}
+
+	if (!request_region(io, io_len, SC1200_MODULE_NAME)) {
+		printk(KERN_ERR PFX "Unable to register IO port %#x\n", io);
+		ret = -EBUSY;
+		goto out_pnp;
+	}
+
+	ret = sc1200wdt_probe();
+	if (ret)
+		goto out_io;
+
+	ret = register_reboot_notifier(&sc1200wdt_notifier);
+	if (ret) {
+		printk(KERN_ERR PFX "Unable to register reboot notifier err = %d\n", ret);
+		goto out_io;
+	}
+
+	ret = misc_register(&sc1200wdt_miscdev);
+	if (ret) {
+		printk(KERN_ERR PFX "Unable to register miscdev on minor %d\n", WATCHDOG_MINOR);
+		goto out_rbt;
+	}
+
+	/* ret = 0 */
+
+out_clean:
+	return ret;
+
+out_rbt:
+	unregister_reboot_notifier(&sc1200wdt_notifier);
+
+out_io:
+	release_region(io, io_len);
+
+out_pnp:
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+	if (isapnp && wdt_dev)
+		wdt_dev->deactivate(wdt_dev);
+#endif
+	goto out_clean;
+}	
+
+
+static void __exit sc1200wdt_exit(void)
+{
+	misc_deregister(&sc1200wdt_miscdev);
+	unregister_reboot_notifier(&sc1200wdt_notifier);
+
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+	if(isapnp && wdt_dev)
+		wdt_dev->deactivate(wdt_dev);
+#endif
+
+	release_region(io, io_len);
+}
+
+
+#ifndef MODULE
+static int __init sc1200wdt_setup(char *str)
+{
+	int ints[4];
+
+	str = get_options (str, ARRAY_SIZE(ints), ints);
+
+	if (ints[0] > 0) {
+		io = ints[1];
+		if (ints[0] > 1)
+			timeout = ints[2];
+
+#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+		if (ints[0] > 2)
+			isapnp = ints[3];
+#endif
+	}
+
+	return 1;
+}
+
+__setup("sc1200wdt=", sc1200wdt_setup);
+#endif /* MODULE */
+
+
+module_init(sc1200wdt_init);
+module_exit(sc1200wdt_exit);
+
+MODULE_AUTHOR("Zwane Mwaikambo <zwane@commfireservices.com>");
+MODULE_DESCRIPTION("Driver for National Semiconductor PC87307/PC97307 watchdog component");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
+
diff -Nru a/drivers/char/watchdog/sc520_wdt.c b/drivers/char/watchdog/sc520_wdt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/watchdog/sc520_wdt.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,394 @@
+/*
+ *	AMD Elan SC520 processor Watchdog Timer driver for Linux 2.4.x
+ *
+ *      Based on acquirewdt.c by Alan Cox,
+ *           and sbc60xxwdt.c by Jakob Oestergaard <jakob@ostenfeld.dk>
+ *     
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License
+ *	as published by the Free Software Foundation; either version
+ *	2 of the License, or (at your option) any later version.
+ *	
+ *	The authors do NOT admit liability nor provide warranty for 
+ *	any of this software. This material is provided "AS-IS" in 
+ *      the hope that it may be useful for others.
+ *
+ *	(c) Copyright 2001    Scott Jennings <linuxdrivers@oro.net>
+ *           9/27 - 2001      [Initial release]
+ *	
+ *	Additional fixes Alan Cox
+ *	-	Fixed formatting
+ *	-	Removed debug printks
+ *	-	Fixed SMP built kernel deadlock
+ *	-	Switched to private locks not lock_kernel
+ *	-	Used ioremap/writew/readw
+ *	-	Added NOWAYOUT support
+ *
+ *  Theory of operation:
+ *  A Watchdog Timer (WDT) is a hardware circuit that can 
+ *  reset the computer system in case of a software fault.
+ *  You probably knew that already.
+ *
+ *  Usually a userspace daemon will notify the kernel WDT driver
+ *  via the /proc/watchdog special device file that userspace is
+ *  still alive, at regular intervals.  When such a notification
+ *  occurs, the driver will usually tell the hardware watchdog
+ *  that everything is in order, and that the watchdog should wait
+ *  for yet another little while to reset the system.
+ *  If userspace fails (RAM error, kernel bug, whatever), the
+ *  notifications cease to occur, and the hardware watchdog will
+ *  reset the system (causing a reboot) after the timeout occurs.
+ *
+ *  This WDT driver is different from most other Linux WDT
+ *  drivers in that the driver will ping the watchdog by itself,
+ *  because this particular WDT has a very short timeout (1.6
+ *  seconds) and it would be insane to count on any userspace
+ *  daemon always getting scheduled within that time frame.
+ *
+ *  This driver uses memory mapped IO, and spinlock.
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/smp_lock.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+
+/*
+ * The SC520 can timeout anywhere from 492us to 32.21s.
+ * If we reset the watchdog every ~250ms we should be safe.
+ */
+
+#define WDT_INTERVAL (HZ/4+1)
+
+/*
+ * We must not require too good response from the userspace daemon.
+ * Here we require the userspace daemon to send us a heartbeat
+ * char to /dev/watchdog every 30 seconds.
+ */
+
+#define WDT_HEARTBEAT (HZ * 30)
+
+/*
+ * AMD Elan SC520 timeout value is 492us times a power of 2 (0-7)
+ *
+ *   0: 492us    2: 1.01s    4: 4.03s   6: 16.22s
+ *   1: 503ms    3: 2.01s    5: 8.05s   7: 32.21s
+ */
+
+#define TIMEOUT_EXPONENT ( 1 << 3 )  /* 0x08 = 2.01s */
+
+/* #define MMCR_BASE_DEFAULT 0xfffef000 */
+#define MMCR_BASE_DEFAULT ((__u16 *)0xffffe)
+#define OFFS_WDTMRCTL ((unsigned int)0xcb0)
+#define WDT_ENB 0x8000		/* [15] Watchdog Timer Enable */
+#define WDT_WRST_ENB 0x4000	/* [14] Watchdog Timer Reset Enable */
+
+#define OUR_NAME "sc520_wdt"
+
+#define WRT_DOG(data) *wdtmrctl=data
+
+static __u16 *wdtmrctl;
+
+static void wdt_timer_ping(unsigned long);
+static struct timer_list timer;
+static unsigned long next_heartbeat;
+static unsigned long wdt_is_open;
+static int wdt_expect_close;
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+static spinlock_t wdt_spinlock;
+/*
+ *	Whack the dog
+ */
+
+static void wdt_timer_ping(unsigned long data)
+{
+	/* If we got a heartbeat pulse within the WDT_US_INTERVAL
+	 * we agree to ping the WDT 
+	 */
+	if(time_before(jiffies, next_heartbeat)) 
+	{
+		/* Ping the WDT */
+		spin_lock(&wdt_spinlock);
+		writew(0xAAAA, wdtmrctl);
+		writew(0x5555, wdtmrctl);
+		spin_unlock(&wdt_spinlock);
+
+		/* Re-set the timer interval */
+		timer.expires = jiffies + WDT_INTERVAL;
+		add_timer(&timer);
+	} else {
+		printk(OUR_NAME ": Heartbeat lost! Will not ping the watchdog\n");
+	}
+}
+
+/* 
+ * Utility routines
+ */
+
+static void wdt_config(int writeval)
+{
+	__u16 dummy;
+	unsigned long flags;
+
+	/* buy some time (ping) */
+	spin_lock_irqsave(&wdt_spinlock, flags);
+	dummy=readw(wdtmrctl);  /* ensure write synchronization */
+	writew(0xAAAA, wdtmrctl);
+	writew(0x5555, wdtmrctl);
+	/* make WDT configuration register writable one time */
+	writew(0x3333, wdtmrctl);
+	writew(0xCCCC, wdtmrctl);
+	/* write WDT configuration register */
+	writew(writeval, wdtmrctl);
+	spin_unlock_irqrestore(&wdt_spinlock, flags);
+}
+
+static void wdt_startup(void)
+{
+	next_heartbeat = jiffies + WDT_HEARTBEAT;
+
+	/* Start the timer */
+	timer.expires = jiffies + WDT_INTERVAL;	
+	add_timer(&timer);
+
+	wdt_config(WDT_ENB | WDT_WRST_ENB | TIMEOUT_EXPONENT);
+	printk(OUR_NAME ": Watchdog timer is now enabled.\n");  
+}
+
+static void wdt_turnoff(void)
+{
+	if (!nowayout) {
+		/* Stop the timer */
+		del_timer(&timer);
+		wdt_config(0);
+		printk(OUR_NAME ": Watchdog timer is now disabled...\n");
+	}
+}
+
+
+/*
+ * /dev/watchdog handling
+ */
+
+static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+{
+	/* We can't seek */
+	if(ppos != &file->f_pos)
+		return -ESPIPE;
+
+	/* See if we got the magic character */
+	if(count) 
+	{
+		size_t ofs;
+
+		/* note: just in case someone wrote the magic character
+		 * five months ago... */
+		wdt_expect_close = 0;
+
+		/* now scan */
+		for(ofs = 0; ofs != count; ofs++) {
+			char c;
+			if (get_user(c, buf + ofs))
+				return -EFAULT;
+			if(c == 'V')
+				wdt_expect_close = 1;
+		}
+
+		/* Well, anyhow someone wrote to us, we should return that favour */
+		next_heartbeat = jiffies + WDT_HEARTBEAT;
+		return 1;
+	}
+	return 0;
+}
+
+static int fop_open(struct inode * inode, struct file * file)
+{
+	switch(minor(inode->i_rdev)) 
+	{
+		case WATCHDOG_MINOR:
+			/* Just in case we're already talking to someone... */
+			if(test_and_set_bit(0, &wdt_is_open))
+				return -EBUSY;
+			/* Good, fire up the show */
+			wdt_startup();
+			if (nowayout)
+				MOD_INC_USE_COUNT;
+
+			return 0;
+		default:
+			return -ENODEV;
+	}
+}
+
+static int fop_close(struct inode * inode, struct file * file)
+{
+	if(minor(inode->i_rdev) == WATCHDOG_MINOR) 
+	{
+		if(wdt_expect_close)
+			wdt_turnoff();
+		else {
+			del_timer(&timer);
+			printk(OUR_NAME ": device file closed unexpectedly. Will not stop the WDT!\n");
+		}
+	}
+	clear_bit(0, &wdt_is_open);
+	return 0;
+}
+
+static long long fop_llseek(struct file *file, long long offset, int origin)
+{
+	return -ESPIPE;
+}
+
+static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	unsigned long arg)
+{
+	static struct watchdog_info ident=
+	{
+		.options = WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "SC520"
+	};
+	
+	switch(cmd)
+	{
+		default:
+			return -ENOIOCTLCMD;
+		case WDIOC_GETSUPPORT:
+			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+		case WDIOC_KEEPALIVE:
+			next_heartbeat = jiffies + WDT_HEARTBEAT;
+			return 0;
+	}
+}
+
+static struct file_operations wdt_fops = {
+	owner:		THIS_MODULE,
+	llseek:		fop_llseek,
+	write:		fop_write,
+	open:		fop_open,
+	release:	fop_close,
+	ioctl:		fop_ioctl
+};
+
+static struct miscdevice wdt_miscdev = {
+	WATCHDOG_MINOR,
+	"watchdog",
+	&wdt_fops
+};
+
+/*
+ *	Notifier for system down
+ */
+
+static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
+	void *unused)
+{
+	if(code==SYS_DOWN || code==SYS_HALT) 
+		wdt_turnoff();
+	return NOTIFY_DONE;
+}
+ 
+/*
+ *	The WDT needs to learn about soft shutdowns in order to
+ *	turn the timebomb registers off. 
+ */
+ 
+static struct notifier_block wdt_notifier=
+{
+	wdt_notify_sys,
+	0,
+	0
+};
+
+static void __exit sc520_wdt_unload(void)
+{
+	wdt_turnoff();
+
+	/* Deregister */
+	misc_deregister(&wdt_miscdev);
+	iounmap(wdtmrctl);
+	unregister_reboot_notifier(&wdt_notifier);
+}
+
+static int __init sc520_wdt_init(void)
+{
+	int rc = -EBUSY;
+	unsigned long cbar;
+
+	spin_lock_init(&wdt_spinlock);
+
+	init_timer(&timer);
+	timer.function = wdt_timer_ping;
+	timer.data = 0;
+
+	rc = misc_register(&wdt_miscdev);
+	if (rc)
+		goto err_out_region2;
+
+	rc = register_reboot_notifier(&wdt_notifier);
+	if (rc)
+		goto err_out_miscdev;
+
+	/* get the Base Address Register */
+	cbar = inl_p(0xfffc);
+	printk(OUR_NAME ": CBAR: 0x%08lx\n", cbar);
+	/* check if MMCR aliasing bit is set */
+	if (cbar & 0x80000000) {
+		printk(OUR_NAME ": MMCR Aliasing enabled.\n");
+		wdtmrctl = (__u16 *)(cbar & 0x3fffffff);
+	} else {
+		printk(OUR_NAME "!!! WARNING !!!\n"
+		  "\t MMCR Aliasing found NOT enabled!\n"
+		  "\t Using default value of: %p\n"
+		  "\t This has not been tested!\n"
+		  "\t Please email Scott Jennings <smj@oro.net>\n"
+		  "\t  and Bill Jennings <bj@oro.net> if it works!\n"
+		  , MMCR_BASE_DEFAULT
+		  );
+	  wdtmrctl = MMCR_BASE_DEFAULT;
+	}
+
+	wdtmrctl = (__u16 *)((char *)wdtmrctl + OFFS_WDTMRCTL);
+	wdtmrctl = ioremap((unsigned long)wdtmrctl, 2);
+	printk(KERN_INFO OUR_NAME ": WDT driver for SC520 initialised.\n");
+
+	return 0;
+
+err_out_miscdev:
+	misc_deregister(&wdt_miscdev);
+err_out_region2:
+	return rc;
+}
+
+module_init(sc520_wdt_init);
+module_exit(sc520_wdt_unload);
+
+MODULE_AUTHOR("Scott and Bill Jennings");
+MODULE_DESCRIPTION("Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
diff -Nru a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c
--- a/drivers/char/watchdog/shwdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/shwdt.c	Fri Jan 10 12:12:38 2003
@@ -334,21 +334,21 @@
 };
 
 static struct watchdog_info sh_wdt_info = {
-	WDIOF_KEEPALIVEPING,
-	1,
-	"SH WDT",
+	.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+	.firmware_version = 1,
+	.identity = "SH WDT",
 };
 
 static struct notifier_block sh_wdt_notifier = {
-	sh_wdt_notify_sys,
-	NULL,
-	0
+	.notifier_call = sh_wdt_notify_sys,
+	.next = NULL,
+	.priority = 0
 };
 
 static struct miscdevice sh_wdt_miscdev = {
-	WATCHDOG_MINOR,
-	"watchdog",
-	&sh_wdt_fops,
+	.minor = WATCHDOG_MINOR,
+	.name = "watchdog",
+	.fops &sh_wdt_fops,
 };
 
 /**
diff -Nru a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c
--- a/drivers/char/watchdog/softdog.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/softdog.c	Fri Jan 10 12:12:38 2003
@@ -47,6 +47,7 @@
 
 #define TIMER_MARGIN	60		/* (secs) Default is 1 minute */
 
+static int expect_close = 0;
 static int soft_margin = TIMER_MARGIN;	/* in seconds */
 
 MODULE_PARM(soft_margin,"i");
@@ -79,7 +80,7 @@
 static void watchdog_fire(unsigned long data)
 {
 #ifdef ONLY_TESTING
-		printk(KERN_CRIT "SOFTDOG: Would Reboot.\n");
+	printk(KERN_CRIT "SOFTDOG: Would Reboot.\n");
 #else
 	printk(KERN_CRIT "SOFTDOG: Initiating system reboot.\n");
 	machine_restart(NULL);
@@ -114,6 +115,8 @@
 	 */
 	if(!nowayout) {
 		del_timer(&watchdog_ticktock);
+	} else {
+		printk(KERN_CRIT "SOFTDOG: WDT device closed unexpectedly.  WDT will not stop!\n");
 	}
 	timer_alive=0;
 	return 0;
@@ -129,6 +132,21 @@
 	 *	Refresh the timer.
 	 */
 	if(len) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+
+				if (get_user(c, data + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ));
 		return 1;
 	}
@@ -139,6 +157,7 @@
 	unsigned int cmd, unsigned long arg)
 {
 	static struct watchdog_info ident = {
+		.options = WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.identity = "Software Watchdog",
 	};
 	switch (cmd) {
diff -Nru a/drivers/char/watchdog/w83877f_wdt.c b/drivers/char/watchdog/w83877f_wdt.c
--- a/drivers/char/watchdog/w83877f_wdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/w83877f_wdt.c	Fri Jan 10 12:12:38 2003
@@ -251,9 +251,9 @@
 {
 	static struct watchdog_info ident=
 	{
-		0,
-		1,
-		"W83877F"
+		.options = WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "W83877F"
 	};
 	
 	switch(cmd)
diff -Nru a/drivers/char/watchdog/wafer5823wdt.c b/drivers/char/watchdog/wafer5823wdt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/watchdog/wafer5823wdt.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,262 @@
+/*
+ *	ICP Wafer 5823 Single Board Computer WDT driver for Linux 2.4.x
+ *      http://www.icpamerica.com/wafer_5823.php
+ *      May also work on other similar models
+ *
+ *	(c) Copyright 2002 Justin Cormack <justin@street-vision.com>
+ *
+ *      Release 0.02
+ *
+ *	Based on advantechwdt.c which is based on wdt.c.
+ *	Original copyright messages:
+ *
+ *	(c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
+ *				http://www.redhat.com
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License
+ *	as published by the Free Software Foundation; either version
+ *	2 of the License, or (at your option) any later version.
+ *	
+ *	Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 
+ *	warranty for any of this software. This material is provided 
+ *	"AS-IS" and at no charge.	
+ *
+ *	(c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/ioport.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+
+static unsigned long wafwdt_is_open;
+static spinlock_t wafwdt_lock;
+static int expect_close = 0;
+
+/*
+ *	You must set these - there is no sane way to probe for this board.
+ *
+ *      To enable, write the timeout value in seconds (1 to 255) to I/O
+ *      port WDT_START, then read the port to start the watchdog. To pat
+ *      the dog, read port WDT_STOP to stop the timer, then read WDT_START
+ *      to restart it again.
+ */
+
+#define WDT_START 0x443
+#define WDT_STOP 0x843
+
+#define WD_TIMO 60		/* 1 minute */
+static int wd_margin = WD_TIMO;
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+static void wafwdt_ping(void)
+{
+	/* pat watchdog */
+        spin_lock(&wafwdt_lock);
+	inb_p(WDT_STOP);
+	inb_p(WDT_START);
+        spin_unlock(&wafwdt_lock);
+}
+
+static void wafwdt_start(void)
+{
+	/* start up watchdog */
+	outb_p(wd_margin, WDT_START);
+	inb_p(WDT_START);
+}
+
+static void
+wafwdt_stop(void)
+{
+	/* stop watchdog */
+	inb_p(WDT_STOP);
+}
+
+static ssize_t wafwdt_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
+{
+	/*  Can't seek (pwrite) on this device  */
+	if (ppos != &file->f_pos)
+		return -ESPIPE;
+
+	if (count) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+				if (get_user(c, buf + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
+		wafwdt_ping();
+		return 1;
+	}
+	return 0;
+}
+
+static int wafwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	     unsigned long arg)
+{
+	int new_margin;
+	static struct watchdog_info ident = {
+		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "Wafer 5823 WDT"
+	};
+	int one=1;
+
+	switch (cmd) {
+	case WDIOC_GETSUPPORT:
+		if (copy_to_user
+		    ((struct watchdog_info *) arg, &ident, sizeof (ident)))
+			return -EFAULT;
+		break;
+
+	case WDIOC_GETSTATUS:
+		if (copy_to_user((int *) arg, &one, sizeof (int)))
+			return -EFAULT;
+		break;
+
+	case WDIOC_KEEPALIVE:
+		wafwdt_ping();
+		break;
+
+	case WDIOC_SETTIMEOUT:
+		if (get_user(new_margin, (int *)arg))
+			return -EFAULT;
+		if ((new_margin < 1) || (new_margin > 255))
+			return -EINVAL;
+		wd_margin = new_margin;
+		wafwdt_stop();
+		wafwdt_start();
+		/* Fall */
+	case WDIOC_GETTIMEOUT:
+		return put_user(wd_margin, (int *)arg);
+
+	default:
+		return -ENOTTY;
+	}
+	return 0;
+}
+
+static int wafwdt_open(struct inode *inode, struct file *file)
+{
+	if (test_and_set_bit(0, &wafwdt_is_open))
+		return -EBUSY;
+	wafwdt_start();
+	return 0;
+}
+
+static int
+wafwdt_close(struct inode *inode, struct file *file)
+{
+	clear_bit(0, &wafwdt_is_open);
+	if (expect_close) {   
+		wafwdt_stop();
+	} else {
+		printk(KERN_CRIT "WDT device closed unexpectedly.  WDT will not stop!\n");
+	}
+	return 0;
+}
+
+/*
+ *	Notifier for system down
+ */
+
+static int wafwdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
+{
+	if (code == SYS_DOWN || code == SYS_HALT) {
+		/* Turn the WDT off */
+		wafwdt_stop();
+	}
+	return NOTIFY_DONE;
+}
+
+/*
+ *	Kernel Interfaces
+ */
+
+static struct file_operations wafwdt_fops = {
+	owner:THIS_MODULE,
+	write:wafwdt_write,
+	ioctl:wafwdt_ioctl,
+	open:wafwdt_open,
+	release:wafwdt_close,
+};
+
+static struct miscdevice wafwdt_miscdev = {
+	WATCHDOG_MINOR,
+	"watchdog",
+	&wafwdt_fops
+};
+
+/*
+ *	The WDT needs to learn about soft shutdowns in order to
+ *	turn the timebomb registers off. 
+ */
+
+static struct notifier_block wafwdt_notifier = {
+	wafwdt_notify_sys,
+	NULL,
+	0
+};
+
+static int __init wafwdt_init(void)
+{
+	printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n");
+
+	spin_lock_init(&wafwdt_lock);
+	if(!request_region(WDT_STOP, 1, "Wafer 5823 WDT"))
+		goto error;
+	if(!request_region(WDT_START, 1, "Wafer 5823 WDT"))
+		goto error2;
+	if(misc_register(&wafwdt_miscdev)<0)
+		goto error3;
+	register_reboot_notifier(&wafwdt_notifier);
+	return 0;
+error3:
+	release_region(WDT_START, 1);
+error2:
+	release_region(WDT_STOP, 1);
+error:
+	return -ENODEV;
+}
+
+static void __exit wafwdt_exit(void)
+{
+	misc_deregister(&wafwdt_miscdev);
+	unregister_reboot_notifier(&wafwdt_notifier);
+	release_region(WDT_STOP, 1);
+	release_region(WDT_START, 1);
+}
+
+module_init(wafwdt_init);
+module_exit(wafwdt_exit);
+
+MODULE_AUTHOR("Justin Cormack");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
+
+/* end of wafer5823wdt.c */
diff -Nru a/drivers/char/watchdog/wdt.c b/drivers/char/watchdog/wdt.c
--- a/drivers/char/watchdog/wdt.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/wdt.c	Fri Jan 10 12:12:38 2003
@@ -52,6 +52,7 @@
 #include <asm/system.h>
 
 static unsigned long wdt_is_open;
+static int expect_close;
 
 /*
  *	You must set these - there is no sane way to probe for this board.
@@ -258,8 +259,21 @@
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
 
-	if(count)
-	{
+	if(count) {
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != count; i++) {
+				char c;
+				if (get_user(c, buf + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		wdt_ping();
 		return 1;
 	}
@@ -317,10 +331,11 @@
 {
 	static struct watchdog_info ident=
 	{
-		WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER
-			|WDIOF_EXTERN1|WDIOF_EXTERN2|WDIOF_FANFAULT,
-		1,
-		"WDT500/501"
+		.options = WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER
+					|WDIOF_EXTERN1|WDIOF_EXTERN2|WDIOF_FANFAULT
+					|WDIOF_SETTIMEOUT|WDIOF_MAGICCLOSE,
+		.firmware_version = 1,
+		.identity = "WDT500/501"
 	};
 	
 	ident.options&=WDT_OPTION_MASK;	/* Mask down to the card we have */
@@ -399,9 +414,11 @@
 {
 	if(minor(inode->i_rdev)==WATCHDOG_MINOR)
 	{
-		if (!nowayout) {
+		if (expect_close) {
 			inb_p(WDT_DC);		/* Disable counters */
 			wdt_ctr_load(2,0);	/* 0 length reset pulses now */
+		} else {
+			printk(KERN_CRIT "wdt: WDT device closed unexpectedly.  WDT will not stop!\n");
 		}
 		clear_bit(0, &wdt_is_open);
 	}
diff -Nru a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c
--- a/drivers/char/watchdog/wdt977.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/wdt977.c	Fri Jan 10 12:12:38 2003
@@ -41,6 +41,7 @@
 static	int timeoutM = DEFAULT_TIMEOUT;		/* timeout in minutes */
 static	unsigned long timer_alive;
 static	int testmode;
+static int expect_close = 0;
 
 MODULE_PARM(timeout, "i");
 MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=60");
@@ -196,6 +197,8 @@
 		clear_bit(0,&timer_alive);
 
 		printk(KERN_INFO "Wdt977 Watchdog: shutdown\n");
+	} else {
+		printk(KERN_CRIT "WDT device closed unexpectedly.  WDT will not stop!\n");
 	}
 	return 0;
 }
@@ -220,6 +223,21 @@
 
 	if(count)
 	{
+		if (!nowayout) {
+			size_t i;
+
+			/* In case it was set long ago */
+			expect_close = 0;
+
+			for (i = 0; i != len; i++) {
+				char c;
+				if (get_user(c, data + i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
+
 		kick_wdog();
 		return 1;
 	}
diff -Nru a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c
--- a/drivers/char/watchdog/wdt_pci.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/char/watchdog/wdt_pci.c	Fri Jan 10 12:12:38 2003
@@ -73,6 +73,7 @@
 #endif
 
 static unsigned long wdt_is_open;
+static int expect_close = 0;
 
 /*
  *	You must set these - there is no sane way to probe for this board.
@@ -276,6 +277,16 @@
 
 	if(count)
 	{
+		if (!nowayout) {
+			size_t i;
+			for (i = 0; i != count; i++) {
+				char c;
+				if(get_user(c, buf+i))
+					return -EFAULT;
+				if (c == 'V')
+					expect_close = 1;
+			}
+		}
 		wdtpci_ping();
 		return 1;
 	}
@@ -332,9 +343,10 @@
 	unsigned long arg)
 {
 	static struct watchdog_info ident = {
-		.options	  = WDIOF_OVERHEAT  | WDIOF_POWERUNDER |
-				    WDIOF_POWEROVER | WDIOF_EXTERN1 |
-				    WDIOF_EXTERN2   | WDIOF_FANFAULT,
+		.options	= WDIOF_OVERHEAT  | WDIOF_POWERUNDER |
+				  WDIOF_POWEROVER | WDIOF_EXTERN1 |
+				  WDIOF_EXTERN2   | WDIOF_FANFAULT |
+				  WDIOF_SETTIMEOUT|WDIOF_MAGICCLOSE,
 		.firmware_version = 1,
 		.identity	  = "WDT500/501PCI",
 	};
diff -Nru a/drivers/hotplug/acpiphp_glue.c b/drivers/hotplug/acpiphp_glue.c
--- a/drivers/hotplug/acpiphp_glue.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/hotplug/acpiphp_glue.c	Fri Jan 10 12:12:38 2003
@@ -230,11 +230,11 @@
  * TBD: _TRA, etc.
  */
 static void
-decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
+decode_acpi_resource (struct acpi_resource *resource, struct acpiphp_bridge *bridge)
 {
-	acpi_resource_address16 *address16_data;
-	acpi_resource_address32 *address32_data;
-	acpi_resource_address64 *address64_data;
+	struct acpi_resource_address16 *address16_data;
+	struct acpi_resource_address32 *address32_data;
+	struct acpi_resource_address64 *address64_data;
 	struct pci_resource *res;
 
 	u32 resource_type, producer_consumer, address_length;
@@ -252,7 +252,7 @@
 
 		switch (resource->id) {
 		case ACPI_RSTYPE_ADDRESS16:
-			address16_data = (acpi_resource_address16 *)&resource->data;
+			address16_data = (struct acpi_resource_address16 *)&resource->data;
 			resource_type = address16_data->resource_type;
 			producer_consumer = address16_data->producer_consumer;
 			min_address_range = address16_data->min_address_range;
@@ -264,7 +264,7 @@
 			break;
 
 		case ACPI_RSTYPE_ADDRESS32:
-			address32_data = (acpi_resource_address32 *)&resource->data;
+			address32_data = (struct acpi_resource_address32 *)&resource->data;
 			resource_type = address32_data->resource_type;
 			producer_consumer = address32_data->producer_consumer;
 			min_address_range = address32_data->min_address_range;
@@ -276,7 +276,7 @@
 			break;
 
 		case ACPI_RSTYPE_ADDRESS64:
-			address64_data = (acpi_resource_address64 *)&resource->data;
+			address64_data = (struct acpi_resource_address64 *)&resource->data;
 			resource_type = address64_data->resource_type;
 			producer_consumer = address64_data->producer_consumer;
 			min_address_range = address64_data->min_address_range;
@@ -296,7 +296,7 @@
 			break;
 		}
 
-		resource = (acpi_resource *)((char*)resource + resource->length);
+		resource = (struct acpi_resource *)((char*)resource + resource->length);
 
 		if (found && producer_consumer == ACPI_PRODUCER && address_length > 0) {
 			switch (resource_type) {
@@ -389,9 +389,9 @@
 static void decode_hpp(struct acpiphp_bridge *bridge)
 {
 	acpi_status status;
-	acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
-			       .pointer = NULL};
-	acpi_object *package;
+	struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+				      .pointer = NULL};
+	union acpi_object *package;
 	int i;
 
 	/* default numbers */
@@ -407,7 +407,7 @@
 		return;
 	}
 
-	package = (acpi_object *) buffer.pointer;
+	package = (union acpi_object *) buffer.pointer;
 
 	if (!package || package->type != ACPI_TYPE_PACKAGE ||
 	    package->package.count != 4 || !package->package.elements) {
@@ -476,8 +476,8 @@
 static void add_host_bridge (acpi_handle *handle, int seg, int bus)
 {
 	acpi_status status;
-	acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
-			       .pointer = NULL};
+	struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+				      .pointer = NULL};
 
 	struct acpiphp_bridge *bridge;
 
@@ -772,10 +772,10 @@
 find_host_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	acpi_status status;
-	acpi_device_info info;
+	struct acpi_device_info info;
 	char objname[5];
-	acpi_buffer buffer = { .length = sizeof(objname),
-			       .pointer = objname };
+	struct acpi_buffer buffer = { .length = sizeof(objname),
+				      .pointer = objname };
 
 	status = acpi_get_object_info(handle, &info);
 	if (ACPI_FAILURE(status)) {
@@ -837,8 +837,8 @@
 	acpi_status status;
 	struct acpiphp_func *func;
 	struct list_head *l;
-	acpi_object_list arg_list;
-	acpi_object arg;
+	struct acpi_object_list arg_list;
+	union acpi_object arg;
 
 	int retval = 0;
 
@@ -1069,8 +1069,8 @@
 {
 	struct acpiphp_bridge *bridge;
 	char objname[64];
-	acpi_buffer buffer = { .length = sizeof(objname),
-			       .pointer = objname };
+	struct acpi_buffer buffer = { .length = sizeof(objname),
+				      .pointer = objname };
 
 	bridge = (struct acpiphp_bridge *)context;
 
@@ -1120,8 +1120,8 @@
 {
 	struct acpiphp_func *func;
 	char objname[64];
-	acpi_buffer buffer = { .length = sizeof(objname),
-			       .pointer = objname };
+	struct acpi_buffer buffer = { .length = sizeof(objname),
+				      .pointer = objname };
 
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
diff -Nru a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c
--- a/drivers/input/mouse/psmouse.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/input/mouse/psmouse.c	Fri Jan 10 12:12:38 2003
@@ -192,7 +192,7 @@
 		return;
 	}
 
-	if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/20)) {
+	if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/2)) {
 		printk(KERN_WARNING "psmouse.c: Lost synchronization, throwing %d bytes away.\n", psmouse->pktcnt);
 		psmouse->pktcnt = 0;
 	}
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h	Fri Jan 10 12:12:38 2003
@@ -72,6 +72,7 @@
 #endif
 #include <linux/module.h>
 #include <asm/byteorder.h>
+#include <asm/io.h>
 
 #ifndef KERNEL_VERSION
 #define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
diff -Nru a/drivers/serial/21285.c b/drivers/serial/21285.c
--- a/drivers/serial/21285.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/21285.c	Fri Jan 10 12:12:38 2003
@@ -233,12 +233,29 @@
 }
 
 static void
-serial21285_change_speed(struct uart_port *port, unsigned int cflag,
-			 unsigned int iflag, unsigned int quot)
+serial21285_set_termios(struct uart_port *port, struct termios *termios,
+			struct termios *old)
 {
-	unsigned int h_lcr;
+	unsigned long flags;
+	unsigned int quot, h_lcr;
 
-	switch (cflag & CSIZE) {
+	/*
+	 * We don't support modem control lines.
+	 */
+	termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR);
+	termios->c_cflag |= CLOCAL;
+
+	/*
+	 * We don't support BREAK character recognition.
+	 */
+	termios->c_iflag &= ~(IGNBRK | BRKINT);
+
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		h_lcr = 0x00;
 		break;
@@ -253,34 +270,44 @@
 		break;
 	}
 
-	if (cflag & CSTOPB)
+	if (termios->c_cflag & CSTOPB)
 		h_lcr |= H_UBRLCR_STOPB;
-	if (cflag & PARENB) {
+	if (termios->c_cflag & PARENB) {
 		h_lcr |= H_UBRLCR_PARENB;
-		if (!(cflag & PARODD))
+		if (!(termios->c_cflag & PARODD))
 			h_lcr |= H_UBRLCR_PAREVN;
 	}
 
 	if (port->fifosize)
 		h_lcr |= H_UBRLCR_FIFO;
 
+	spin_lock_irqsave(&port->lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
+	/*
+	 * Which character status flags are we interested in?
+	 */
 	port->read_status_mask = RXSTAT_OVERRUN;
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		port->read_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;
 
 	/*
-	 * Characters to ignore
+	 * Which character status flags should we ignore?
 	 */
 	port->ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		port->ignore_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;
-	if (iflag & IGNBRK && iflag & IGNPAR)
+	if (termios->c_iflag & IGNBRK && termios->c_iflag & IGNPAR)
 		port->ignore_status_mask |= RXSTAT_OVERRUN;
 
 	/*
 	 * Ignore all characters if CREAD is not set.
 	 */
-	if ((cflag & CREAD) == 0)
+	if ((termios->c_cflag & CREAD) == 0)
 		port->ignore_status_mask |= RXSTAT_DUMMY_READ;
 
 	quot -= 1;
@@ -290,6 +317,8 @@
 	*CSR_M_UBRLCR = (quot >> 8) & 0x0f;
 	*CSR_H_UBRLCR = h_lcr;
 	*CSR_UARTCON = 1;
+
+	spin_unlock_irqrestore(&port->lock, flags);
 }
 
 static const char *serial21285_type(struct uart_port *port)
@@ -340,7 +369,7 @@
 	.break_ctl	= serial21285_break_ctl,
 	.startup	= serial21285_startup,
 	.shutdown	= serial21285_shutdown,
-	.change_speed	= serial21285_change_speed,
+	.set_termios	= serial21285_set_termios,
 	.type		= serial21285_type,
 	.release_port	= serial21285_release_port,
 	.request_port	= serial21285_request_port,
diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/serial/8250.c	Fri Jan 10 12:12:37 2003
@@ -1174,7 +1174,7 @@
 
 	/*
 	 * Clear the FIFO buffers and disable them.
-	 * (they will be reeanbled in change_speed())
+	 * (they will be reeanbled in set_termios())
 	 */
 	if (uart_config[up->port.type].flags & UART_CLEAR_FIFO) {
 		serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
@@ -1241,7 +1241,7 @@
 
 	/*
 	 * Finally, enable interrupts.  Note: Modem status interrupts
-	 * are set via change_speed(), which will be occuring imminently
+	 * are set via set_termios(), which will be occuring imminently
 	 * anyway, so we don't enable them here.
 	 */
 	up->ier = UART_IER_RLSI | UART_IER_RDI;
@@ -1319,14 +1319,15 @@
 }
 
 static void
-serial8250_change_speed(struct uart_port *port, unsigned int cflag,
-			unsigned int iflag, unsigned int quot)
+serial8250_set_termios(struct uart_port *port, struct termios *termios,
+		       struct termios *old)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 	unsigned char cval, fcr = 0;
 	unsigned long flags;
+	unsigned int quot;
 
-	switch (cflag & CSIZE) {
+	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		cval = 0x00;
 		break;
@@ -1342,18 +1343,23 @@
 		break;
 	}
 
-	if (cflag & CSTOPB)
+	if (termios->c_cflag & CSTOPB)
 		cval |= 0x04;
-	if (cflag & PARENB)
+	if (termios->c_cflag & PARENB)
 		cval |= UART_LCR_PARITY;
-	if (!(cflag & PARODD))
+	if (!(termios->c_cflag & PARODD))
 		cval |= UART_LCR_EPAR;
 #ifdef CMSPAR
-	if (cflag & CMSPAR)
+	if (termios->c_cflag & CMSPAR)
 		cval |= UART_LCR_SPAR;
 #endif
 
 	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	/*
 	 * Work around a bug in the Oxford Semiconductor 952 rev B
 	 * chip which causes it to seriously miscalculate baud rates
 	 * when DLL is 0.
@@ -1375,52 +1381,58 @@
 	if (up->port.type == PORT_16750)
 		fcr |= UART_FCR7_64BYTE;
 
+	/*
+	 * Ok, we're now changing the port state.  Do it with
+	 * interrupts disabled.
+	 */
+	spin_lock_irqsave(&up->port.lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
 	up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
-	if (iflag & (BRKINT | PARMRK))
+	if (termios->c_iflag & (BRKINT | PARMRK))
 		up->port.read_status_mask |= UART_LSR_BI;
 
 	/*
 	 * Characteres to ignore
 	 */
 	up->port.ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		up->port.ignore_status_mask |= UART_LSR_PE | UART_LSR_FE;
-	if (iflag & IGNBRK) {
+	if (termios->c_iflag & IGNBRK) {
 		up->port.ignore_status_mask |= UART_LSR_BI;
 		/*
 		 * If we're ignoring parity and break indicators,
 		 * ignore overruns too (for real raw support).
 		 */
-		if (iflag & IGNPAR)
+		if (termios->c_iflag & IGNPAR)
 			up->port.ignore_status_mask |= UART_LSR_OE;
 	}
 
 	/*
 	 * ignore all characters if CREAD is not set
 	 */
-	if ((cflag & CREAD) == 0)
+	if ((termios->c_cflag & CREAD) == 0)
 		up->port.ignore_status_mask |= UART_LSR_DR;
 
 	/*
-	 * Ok, we're now changing the port state.  Do it with
-	 * interrupts disabled.
-	 */
-	spin_lock_irqsave(&up->port.lock, flags);
-
-	/*
 	 * CTS flow control flag and modem status interrupts
 	 */
 	up->ier &= ~UART_IER_MSI;
-	if (UART_ENABLE_MS(&up->port, cflag))
+	if (UART_ENABLE_MS(&up->port, termios->c_cflag))
 		up->ier |= UART_IER_MSI;
 
 	serial_out(up, UART_IER, up->ier);
 
 	if (uart_config[up->port.type].flags & UART_STARTECH) {
 		serial_outp(up, UART_LCR, 0xBF);
-		serial_outp(up, UART_EFR, cflag & CRTSCTS ? UART_EFR_CTS :0);
+		serial_outp(up, UART_EFR,
+			    termios->c_cflag & CRTSCTS ? UART_EFR_CTS :0);
 	}
 	serial_outp(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
 	serial_outp(up, UART_DLL, quot & 0xff);		/* LS of divisor */
@@ -1728,7 +1740,7 @@
 	.break_ctl	= serial8250_break_ctl,
 	.startup	= serial8250_startup,
 	.shutdown	= serial8250_shutdown,
-	.change_speed	= serial8250_change_speed,
+	.set_termios	= serial8250_set_termios,
 	.pm		= serial8250_pm,
 	.type		= serial8250_type,
 	.release_port	= serial8250_release_port,
diff -Nru a/drivers/serial/amba.c b/drivers/serial/amba.c
--- a/drivers/serial/amba.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/amba.c	Fri Jan 10 12:12:38 2003
@@ -403,14 +403,19 @@
 }
 
 static void
-ambauart_change_speed(struct uart_port *port, unsigned int cflag,
-		      unsigned int iflag, unsigned int quot)
+ambauart_set_termios(struct uart_port *port, struct termios *termios,
+		     struct termios *old)
 {
 	unsigned int lcr_h, old_cr;
 	unsigned long flags;
+	unsigned int quot;
 
-	/* byte size and parity */
-	switch (cflag & CSIZE) {
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		lcr_h = AMBA_UARTLCR_H_WLEN_5;
 		break;
@@ -424,49 +429,55 @@
 		lcr_h = AMBA_UARTLCR_H_WLEN_8;
 		break;
 	}
-	if (cflag & CSTOPB)
+	if (termios->c_cflag & CSTOPB)
 		lcr_h |= AMBA_UARTLCR_H_STP2;
-	if (cflag & PARENB) {
+	if (termios->c_cflag & PARENB) {
 		lcr_h |= AMBA_UARTLCR_H_PEN;
-		if (!(cflag & PARODD))
+		if (!(termios->c_cflag & PARODD))
 			lcr_h |= AMBA_UARTLCR_H_EPS;
 	}
 	if (port->fifosize > 1)
 		lcr_h |= AMBA_UARTLCR_H_FEN;
 
+	spin_lock_irqsave(&port->lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
 	port->read_status_mask = AMBA_UARTRSR_OE;
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		port->read_status_mask |= AMBA_UARTRSR_FE | AMBA_UARTRSR_PE;
-	if (iflag & (BRKINT | PARMRK))
+	if (termios->c_iflag & (BRKINT | PARMRK))
 		port->read_status_mask |= AMBA_UARTRSR_BE;
 
 	/*
 	 * Characters to ignore
 	 */
 	port->ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		port->ignore_status_mask |= AMBA_UARTRSR_FE | AMBA_UARTRSR_PE;
-	if (iflag & IGNBRK) {
+	if (termios->c_iflag & IGNBRK) {
 		port->ignore_status_mask |= AMBA_UARTRSR_BE;
 		/*
 		 * If we're ignoring parity and break indicators,
 		 * ignore overruns too (for real raw support).
 		 */
-		if (iflag & IGNPAR)
+		if (termios->c_iflag & IGNPAR)
 			port->ignore_status_mask |= AMBA_UARTRSR_OE;
 	}
 
 	/*
 	 * Ignore all characters if CREAD is not set.
 	 */
-	if ((cflag & CREAD) == 0)
+	if ((termios->c_cflag & CREAD) == 0)
 		port->ignore_status_mask |= UART_DUMMY_RSR_RX;
 
 	/* first, disable everything */
-	spin_lock_irqsave(&port->lock, flags);
 	old_cr = UART_GET_CR(port) & ~AMBA_UARTCR_MSIE;
 
-	if (UART_ENABLE_MS(port, cflag))
+	if (UART_ENABLE_MS(port, termios->c_cflag))
 		old_cr |= AMBA_UARTCR_MSIE;
 
 	UART_PUT_CR(port, 0);
@@ -546,7 +557,7 @@
 	.break_ctl	= ambauart_break_ctl,
 	.startup	= ambauart_startup,
 	.shutdown	= ambauart_shutdown,
-	.change_speed	= ambauart_change_speed,
+	.set_termios	= ambauart_set_termios,
 	.type		= ambauart_type,
 	.release_port	= ambauart_release_port,
 	.request_port	= ambauart_request_port,
diff -Nru a/drivers/serial/anakin.c b/drivers/serial/anakin.c
--- a/drivers/serial/anakin.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/anakin.c	Fri Jan 10 12:12:38 2003
@@ -283,13 +283,36 @@
 }
 
 static void
-anakin_change_speed(struct uart_port *port, unsigned int cflag,
-		    unsigned int iflag, unsigned int quot)
+anakin_set_termios(struct uart_port *port, struct termios *termios,
+		   struct termios *old)
 {
-	unsigned int flags;
+	unsigned long flags;
+	unsigned int quot;
+
+	/*
+	 * We don't support parity, stop bits, or anything other
+	 * than 8 bits, so clear these termios flags.
+	 */
+	termios->c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CREAD);
+	termios->c_cflag |= CS8;
+
+	/*
+	 * We don't appear to support any error conditions either.
+	 */
+	termios->c_iflag &= ~(INPCK | IGNPAR | IGNBRK | BRKINT);
+
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
 
 	spin_lock_irqsave(&port->lock, flags);
-	while (!(anakin_in(port, 0x10) & TXEMPTY));
+
+	uart_update_timeout(port, termios->c_cflag, quot);
+
+	while (!(anakin_in(port, 0x10) & TXEMPTY))
+		barrier();
+
 	anakin_out(port, 0x10, (anakin_in(port, 0x10) & ~PRESCALER)
 			| (quot << 3));
 
@@ -314,7 +337,7 @@
 	.break_ctl	= anakin_break_ctl,
 	.startup	= anakin_startup,
 	.shutdown	= anakin_shutdown,
-	.change_speed	= anakin_change_speed,
+	.set_termios	= anakin_set_termios,
 	.type		= anakin_type,
 };
 
diff -Nru a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
--- a/drivers/serial/clps711x.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/clps711x.c	Fri Jan 10 12:12:38 2003
@@ -317,14 +317,23 @@
 }
 
 static void
-clps711xuart_change_speed(struct uart_port *port, unsigned int cflag,
-			  unsigned int iflag, unsigned int quot)
+clps711xuart_set_termios(struct uart_port *port, struct termios *termios,
+			 struct termios *old)
 {
-	unsigned int ubrlcr;
+	unsigned int ubrlcr, quot;
 	unsigned long flags;
 
-	/* byte size and parity */
-	switch (cflag & CSIZE) {
+	/*
+	 * We don't implement CREAD.
+	 */
+	termios->c_cflag |= CREAD;
+
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		ubrlcr = UBRLCR_WRDLEN5;
 		break;
@@ -338,40 +347,44 @@
 		ubrlcr = UBRLCR_WRDLEN8;
 		break;
 	}
-	if (cflag & CSTOPB)
+	if (termios->c_cflag & CSTOPB)
 		ubrlcr |= UBRLCR_XSTOP;
-	if (cflag & PARENB) {
+	if (termios->c_cflag & PARENB) {
 		ubrlcr |= UBRLCR_PRTEN;
-		if (!(cflag & PARODD))
+		if (!(termios->c_cflag & PARODD))
 			ubrlcr |= UBRLCR_EVENPRT;
 	}
 	if (port->fifosize > 1)
 		ubrlcr |= UBRLCR_FIFOEN;
 
+	spin_lock_irqsave(&port->lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
 	port->read_status_mask = UARTDR_OVERR;
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		port->read_status_mask |= UARTDR_PARERR | UARTDR_FRMERR;
 
 	/*
 	 * Characters to ignore
 	 */
 	port->ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		port->ignore_status_mask |= UARTDR_FRMERR | UARTDR_PARERR;
-	if (iflag & IGNBRK) {
+	if (termios->c_iflag & IGNBRK) {
 		/*
 		 * If we're ignoring parity and break indicators,
 		 * ignore overruns to (for real raw support).
 		 */
-		if (iflag & IGNPAR)
+		if (termios->c_iflag & IGNPAR)
 			port->ignore_status_mask |= UARTDR_OVERR;
 	}
 
 	quot -= 1;
 
-	/* first, disable everything */
-	spin_lock_irqsave(&port->lock, flags);
-
 	clps_writel(ubrlcr | quot, UBRLCR(port));
 
 	spin_unlock_irqrestore(&port->lock, flags);
@@ -411,7 +424,7 @@
 	.break_ctl	= clps711xuart_break_ctl,
 	.startup	= clps711xuart_startup,
 	.shutdown	= clps711xuart_shutdown,
-	.change_speed	= clps711xuart_change_speed,
+	.set_termios	= clps711xuart_set_termios,
 	.type		= clps711xuart_type,
 	.config_port	= clps711xuart_config_port,
 	.release_port	= clps711xuart_release_port,
diff -Nru a/drivers/serial/core.c b/drivers/serial/core.c
--- a/drivers/serial/core.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/core.c	Fri Jan 10 12:12:38 2003
@@ -314,60 +314,72 @@
  *	uart_get_baud_rate - return baud rate for a particular port
  *	@port: uart_port structure describing the port in question.
  *	@termios: desired termios settings.
+ *	@old: old termios (or NULL)
+ *	@min: minimum acceptable baud rate
+ *	@max: maximum acceptable baud rate
  *
  *	Decode the termios structure into a numeric baud rate,
  *	taking account of the magic 38400 baud rate (with spd_*
  *	flags), and mapping the %B0 rate to 9600 baud.
  */
 unsigned int
-uart_get_baud_rate(struct uart_port *port, struct termios *termios)
+uart_get_baud_rate(struct uart_port *port, struct termios *termios,
+		   struct termios *old, unsigned int min, unsigned int max)
 {
-	unsigned int baud = tty_termios_baud_rate(termios);
+	unsigned int try, baud, altbaud = 38400;
+	unsigned int flags = port->flags & UPF_SPD_MASK;
 
-	/*
-	 * The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
-	 * Die! Die! Die!
-	 */
-	if (baud == 38400) {
-		unsigned int flags = port->flags & UPF_SPD_MASK;
+	if (flags == UPF_SPD_HI)
+		altbaud = 57600;
+	if (flags == UPF_SPD_VHI)
+		altbaud = 115200;
+	if (flags == UPF_SPD_SHI)
+		altbaud = 230400;
+	if (flags == UPF_SPD_WARP)
+		altbaud = 460800;
 
-		if (flags == UPF_SPD_HI)
-			baud = 57600;
-		if (flags == UPF_SPD_VHI)
-			baud = 115200;
-		if (flags == UPF_SPD_SHI)
-			baud = 230400;
-		if (flags == UPF_SPD_WARP)
-			baud = 460800;
-	}
+	for (try = 0; try < 2; try++) {
+		baud = tty_termios_baud_rate(termios);
 
-	/*
-	 * Special case: B0 rate.
-	 */
-	if (baud == 0)
-		baud = 9600;
+		/*
+		 * The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
+		 * Die! Die! Die!
+		 */
+		if (baud == 38400)
+			baud = altbaud;
 
-	return baud;
-}
+		/*
+		 * Special case: B0 rate.
+		 */
+		if (baud == 0)
+			baud = 9600;
 
-EXPORT_SYMBOL(uart_get_baud_rate);
+		if (baud >= min && baud <= max)
+			return baud;
 
-static inline unsigned int
-uart_calculate_quot(struct uart_port *port, unsigned int baud)
-{
-	unsigned int quot;
+		/*
+		 * Oops, the quotient was zero.  Try again with
+		 * the old baud rate if possible.
+		 */
+		termios->c_cflag &= ~CBAUD;
+		if (old) {
+			termios->c_cflag |= old->c_cflag & CBAUD;
+			old = NULL;
+			continue;
+		}
 
-	/*
-	 * Old custom speed handling.
-	 */
-	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
-		quot = port->custom_divisor;
-	else
-		quot = port->uartclk / (16 * baud);
+		/*
+		 * As a last resort, if the quotient is zero,
+		 * default to 9600 bps
+		 */
+		termios->c_cflag |= B9600;
+	}
 
-	return quot;
+	return 0;
 }
 
+EXPORT_SYMBOL(uart_get_baud_rate);
+
 /**
  *	uart_get_divisor - return uart clock divisor
  *	@port: uart_port structure describing the port.
@@ -387,34 +399,18 @@
 uart_get_divisor(struct uart_port *port, struct termios *termios,
 		 struct termios *old_termios)
 {
-	unsigned int quot, try;
-
-	for (try = 0; try < 3; try ++) {
-		unsigned int baud;
+	unsigned int quot, baud, max = port->uartclk / 16;
 
-		/* Determine divisor based on baud rate */
-		baud = uart_get_baud_rate(port, termios);
-		quot = uart_calculate_quot(port, baud);
-		if (quot)
-			return quot;
+	/* Determine divisor based on baud rate */
+	baud = uart_get_baud_rate(port, termios, old_termios, 0, max);
 
-		/*
-		 * Oops, the quotient was zero.  Try again with
-		 * the old baud rate if possible.
-		 */
-		termios->c_cflag &= ~CBAUD;
-		if (old_termios) {
-			termios->c_cflag |= old_termios->c_cflag & CBAUD;
-			old_termios = NULL;
-			continue;
-		}
-
-		/*
-		 * As a last resort, if the quotient is zero,
-		 * default to 9600 bps
-		 */
-		termios->c_cflag |= B9600;
-	}
+	/*
+	 * Old custom speed handling.
+	 */
+	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
+		quot = port->custom_divisor;
+	else
+		quot = port->uartclk / (16 * baud);
 
 	return quot;
 }
@@ -427,7 +423,6 @@
 	struct tty_struct *tty = info->tty;
 	struct uart_port *port = info->port;
 	struct termios *termios;
-	unsigned int quot;
 
 	/*
 	 * If we have no tty, termios, or the port does not exist,
@@ -451,10 +446,7 @@
 	else
 		info->flags |= UIF_CHECK_CD;
 
-	quot = uart_get_divisor(port, termios, old_termios);
-	uart_update_timeout(port, termios->c_cflag, quot);
-
-	port->ops->change_speed(port, termios->c_cflag, termios->c_iflag, quot);
+	port->ops->set_termios(port, termios, old_termios);
 }
 
 static inline void
@@ -827,7 +819,7 @@
 
 	port->irq              = new_serial.irq;
 	port->uartclk          = new_serial.baud_base * 16;
-	port->flags            = new_serial.flags & UPF_FLAGS;
+	port->flags            = new_serial.flags & UPF_CHANGE_MASK;
 	port->custom_divisor   = new_serial.custom_divisor;
 	state->close_delay     = new_serial.close_delay * HZ / 100;
 	state->closing_wait    = new_serial.closing_wait * HZ / 100;
@@ -1267,7 +1259,6 @@
 	if (tty->ldisc.flush_buffer)
 		tty->ldisc.flush_buffer(tty);
 	tty->closing = 0;
-	info->event = 0;
 	info->tty = NULL;
 	if (info->blocked_open) {
 		if (info->state->close_delay) {
@@ -1376,7 +1367,6 @@
 		return;
 	}
 	uart_shutdown(info);
-	info->event = 0;
 	state->count = 0;
 	info->flags &= ~UIF_NORMAL_ACTIVE;
 	info->tty = NULL;
@@ -1859,10 +1849,13 @@
 uart_set_options(struct uart_port *port, struct console *co,
 		 int baud, int parity, int bits, int flow)
 {
-	unsigned int cflag = CREAD | HUPCL | CLOCAL;
-	unsigned int quot;
+	struct termios termios;
 	int i;
 
+	memset(&termios, 0, sizeof(struct termios));
+
+	termios.c_cflag = CREAD | HUPCL | CLOCAL;
+
 	/*
 	 * Construct a cflag setting.
 	 */
@@ -1870,28 +1863,27 @@
 		if (baud_rates[i].rate <= baud)
 			break;
 
-	cflag |= baud_rates[i].cflag;
+	termios.c_cflag |= baud_rates[i].cflag;
 
 	if (bits == 7)
-		cflag |= CS7;
+		termios.c_cflag |= CS7;
 	else
-		cflag |= CS8;
+		termios.c_cflag |= CS8;
 
 	switch (parity) {
 	case 'o': case 'O':
-		cflag |= PARODD;
+		termios.c_cflag |= PARODD;
 		/*fall through*/
 	case 'e': case 'E':
-		cflag |= PARENB;
+		termios.c_cflag |= PARENB;
 		break;
 	}
 
 	if (flow == 'r')
-		cflag |= CRTSCTS;
+		termios.c_cflag |= CRTSCTS;
 
-	co->cflag = cflag;
-	quot = (port->uartclk / (16 * baud));
-	port->ops->change_speed(port, cflag, 0, quot);
+	port->ops->set_termios(port, &termios, NULL);
+	co->cflag = termios.c_cflag;
 
 	return 0;
 }
diff -Nru a/drivers/serial/mux.c b/drivers/serial/mux.c
--- a/drivers/serial/mux.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/mux.c	Fri Jan 10 12:12:38 2003
@@ -268,17 +268,16 @@
 }
 
 /**
- * mux_change_speed - Chane port parameters.
+ * mux_set_termios - Chane port parameters.
  * @port: Ptr to the uart_port.
- * @cflag: character flags.
- * @iflag: interrupt flags.
- * @quot: 
+ * @termios: new termios settings.
+ * @old: old termios settings.
  *
  * The Serial Mux does not support this function.
  */
 static void
-mux_change_speed(struct uart_port *port, unsigned int cflag,
-			unsigned int iflag, unsigned int quot)
+mux_set_termios(struct uart_port *port, struct termios *termios,
+	        struct termios *old)
 {
 }
 
@@ -388,7 +387,7 @@
 	.break_ctl =		mux_break_ctl,
 	.startup =		mux_startup,
 	.shutdown =		mux_shutdown,
-	.change_speed =		mux_change_speed,
+	.set_termios =		mux_set_termios,
 	.type =			mux_type,
 	.release_port =		mux_release_port,
 	.request_port =		mux_request_port,
diff -Nru a/drivers/serial/nb85e_uart.c b/drivers/serial/nb85e_uart.c
--- a/drivers/serial/nb85e_uart.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/nb85e_uart.c	Fri Jan 10 12:12:38 2003
@@ -440,15 +440,13 @@
 }
 
 static void
-nb85e_uart_change_speed (struct uart_port *port, unsigned cflags,
-			 unsigned iflag, unsigned quot)
+nb85e_uart_set_termios (struct uart_port *port, struct termios *termios,
+		        struct termios *old)
 {
-	/* The serial framework doesn't give us the baud rate directly, but
-	   insists on calculating a `quotient' from it, and giving us that
-	   instead.  Get the real baud rate from the tty code instead.  */
-	int baud = tty_get_baud_rate (port->info->tty);
+	/* FIXME: Which termios flags does this driver support? --rmk */
 
-	nb85e_uart_configure (port->line, cflags, baud);
+	nb85e_uart_configure (port->line, termios->c_cflags,
+			uart_get_baud_rate(port, termios));
 }
 
 static const char *nb85e_uart_type (struct uart_port *port)
@@ -483,7 +481,7 @@
 	.break_ctl	= nb85e_uart_break_ctl,
 	.startup	= nb85e_uart_startup,
 	.shutdown	= nb85e_uart_shutdown,
-	.change_speed	= nb85e_uart_change_speed,
+	.set_termios	= nb85e_uart_set_termios,
 	.type		= nb85e_uart_type,
 	.release_port	= nb85e_uart_nop,
 	.request_port	= nb85e_uart_success,
diff -Nru a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
--- a/drivers/serial/sa1100.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/sa1100.c	Fri Jan 10 12:12:38 2003
@@ -436,36 +436,50 @@
 }
 
 static void
-sa1100_change_speed(struct uart_port *port, unsigned int cflag,
-		    unsigned int iflag, unsigned int quot)
+sa1100_set_termios(struct uart_port *port, struct termios *termios,
+		   struct termios *old)
 {
 	struct sa1100_port *sport = (struct sa1100_port *)port;
 	unsigned long flags;
-	unsigned int utcr0, old_utcr3;
+	unsigned int utcr0, old_utcr3, quot;
+	unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8;
 
-	/* byte size and parity */
-	switch (cflag & CSIZE) {
-	case CS7:
-		utcr0 = 0;
-		break;
-	default:
-		utcr0 = UTCR0_DSS;
-		break;
+	/*
+	 * We only support CS7 and CS8.
+	 */
+	while ((termios->c_cflag & CSIZE) != CS7 &&
+	       (termios->c_cflag & CSIZE) != CS8) {
+		termios->c_cflag &= ~CSIZE;
+		termios->c_cflag |= old_csize;
+		old_csize = CS8;
 	}
-	if (cflag & CSTOPB)
+
+	if ((termios->c_cflag & CSIZE) == CS8)
+		utcr0 = UTCR0_DSS;
+	else
+		utcr0 = 0;
+
+	if (termios->c_cflag & CSTOPB)
 		utcr0 |= UTCR0_SBS;
-	if (cflag & PARENB) {
+	if (termios->c_cflag & PARENB) {
 		utcr0 |= UTCR0_PE;
-		if (!(cflag & PARODD))
+		if (!(termios->c_cflag & PARODD))
 			utcr0 |= UTCR0_OES;
 	}
 
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	spin_lock_irqsave(&sport->port.lock, flags);
+
 	sport->port.read_status_mask &= UTSR0_TO_SM(UTSR0_TFS);
 	sport->port.read_status_mask |= UTSR1_TO_SM(UTSR1_ROR);
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		sport->port.read_status_mask |=
 				UTSR1_TO_SM(UTSR1_FRE | UTSR1_PRE);
-	if (iflag & (BRKINT | PARMRK))
+	if (termios->c_iflag & (BRKINT | PARMRK))
 		sport->port.read_status_mask |=
 				UTSR0_TO_SM(UTSR0_RBB | UTSR0_REB);
 
@@ -473,29 +487,36 @@
 	 * Characters to ignore
 	 */
 	sport->port.ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		sport->port.ignore_status_mask |=
 				UTSR1_TO_SM(UTSR1_FRE | UTSR1_PRE);
-	if (iflag & IGNBRK) {
+	if (termios->c_iflag & IGNBRK) {
 		sport->port.ignore_status_mask |=
 				UTSR0_TO_SM(UTSR0_RBB | UTSR0_REB);
 		/*
 		 * If we're ignoring parity and break indicators,
 		 * ignore overruns too (for real raw support).
 		 */
-		if (iflag & IGNPAR)
+		if (termios->c_iflag & IGNPAR)
 			sport->port.ignore_status_mask |=
 				UTSR1_TO_SM(UTSR1_ROR);
 	}
 
 	del_timer_sync(&sport->timer);
 
-	/* first, disable interrupts and drain transmitter */
-	spin_lock_irqsave(&sport->port.lock, flags);
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
+	/*
+	 * disable interrupts and drain transmitter
+	 */
 	old_utcr3 = UART_GET_UTCR3(sport);
 	UART_PUT_UTCR3(sport, old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE));
 
-	while (UART_GET_UTSR1(sport) & UTSR1_TBY);
+	while (UART_GET_UTSR1(sport) & UTSR1_TBY)
+		barrier();
 
 	/* then, disable everything */
 	UART_PUT_UTCR3(sport, 0);
@@ -512,7 +533,7 @@
 
 	UART_PUT_UTCR3(sport, old_utcr3);
 
-	if (UART_ENABLE_MS(&sport->port, cflag))
+	if (UART_ENABLE_MS(&sport->port, termios->c_cflag))
 		sa1100_enable_ms(&sport->port);
 
 	spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -597,7 +618,7 @@
 	.break_ctl	= sa1100_break_ctl,
 	.startup	= sa1100_startup,
 	.shutdown	= sa1100_shutdown,
-	.change_speed	= sa1100_change_speed,
+	.set_termios	= sa1100_set_termios,
 	.type		= sa1100_type,
 	.release_port	= sa1100_release_port,
 	.request_port	= sa1100_request_port,
diff -Nru a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
--- a/drivers/serial/sunsab.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/sunsab.c	Fri Jan 10 12:12:38 2003
@@ -583,10 +583,22 @@
 	tmp &= ~SAB82532_MODE_RAC;
 	writeb(tmp, &up->regs->rw.mode);
 
+	/*
+	 * XXX FIXME
+	 *
+	 * If the chip is powered down here the system hangs/crashes during
+	 * reboot or shutdown.  This needs to be investigated further,
+	 * similar behaviour occurs in 2.4 when the driver is configured
+	 * as a module only.  One hint may be that data is sometimes
+	 * transmitted at 9600 baud during shutdown (regardless of the
+	 * speed the chip was configured for when the port was open).
+	 */
+#if 0
 	/* Power Down */	
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp &= ~SAB82532_CCR0_PU;
 	writeb(tmp, &up->regs->rw.ccr0);
+#endif
 
 	spin_unlock_irqrestore(&up->port.lock, flags);
 }
@@ -751,20 +763,15 @@
 }
 
 /* port->lock is not held.  */
-static void sunsab_change_speed(struct uart_port *port, unsigned int cflag,
-				unsigned int iflag, unsigned int quot)
+static void sunsab_set_termios(struct uart_port *port, struct termios *termios,
+			       struct termios *old)
 {
 	struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
 	unsigned long flags;
-	int baud;
+	int baud = uart_get_baud_rate(port, termios);
 
 	spin_lock_irqsave(&up->port.lock, flags);
-
-	/* Undo what generic UART core did.  */
-	baud = (SAB_BASE_BAUD / (quot * 16));
-
-	sunsab_convert_to_sab(up, cflag, iflag, baud);
-
+	sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud);
 	spin_unlock_irqrestore(&up->port.lock, flags);
 }
 
@@ -807,7 +814,7 @@
 	.break_ctl	= sunsab_break_ctl,
 	.startup	= sunsab_startup,
 	.shutdown	= sunsab_shutdown,
-	.change_speed	= sunsab_change_speed,
+	.set_termios	= sunsab_set_termios,
 	.type		= sunsab_type,
 	.release_port	= sunsab_release_port,
 	.request_port	= sunsab_request_port,
diff -Nru a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
--- a/drivers/serial/sunsu.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/sunsu.c	Fri Jan 10 12:12:38 2003
@@ -660,7 +660,7 @@
 
 	/*
 	 * Clear the FIFO buffers and disable them.
-	 * (they will be reeanbled in change_speed())
+	 * (they will be reeanbled in set_termios())
 	 */
 	if (uart_config[up->port.type].flags & UART_CLEAR_FIFO) {
 		serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
@@ -714,7 +714,7 @@
 
 	/*
 	 * Finally, enable interrupts.  Note: Modem status interrupts
-	 * are set via change_speed(), which will be occuring imminently
+	 * are set via set_termios(), which will be occuring imminently
 	 * anyway, so we don't enable them here.
 	 */
 	up->ier = UART_IER_RLSI | UART_IER_RDI;
@@ -844,6 +844,17 @@
 	if (up->port.type == PORT_16750)
 		fcr |= UART_FCR7_64BYTE;
 
+	/*
+	 * Ok, we're now changing the port state.  Do it with
+	 * interrupts disabled.
+	 */
+	spin_lock_irqsave(&up->port.lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, cflag, quot);
+
 	up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
 	if (iflag & INPCK)
 		up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
@@ -879,11 +890,6 @@
 	if (UART_ENABLE_MS(&up->port, cflag))
 		up->ier |= UART_IER_MSI;
 
-	/*
-	 * Ok, we're now changing the port state.  Do it with
-	 * interrupts disabled.
-	 */
-	spin_lock_irqsave(&up->port.lock, flags);
 	serial_out(up, UART_IER, up->ier);
 
 	if (uart_config[up->port.type].flags & UART_STARTECH) {
@@ -910,6 +916,20 @@
 	spin_unlock_irqrestore(&up->port.lock, flags);
 }
 
+static void
+sunsu_set_termios(struct uart_port *port, struct termios *termios,
+		  struct termios *old)
+{
+	unsigned int quot;
+
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
+	sunsu_change_speed(port, termios->c_cflag, termios->c_iflag, quot);
+}
+
 static void sunsu_release_port(struct uart_port *port)
 {
 }
@@ -960,7 +980,7 @@
 	.break_ctl	= sunsu_break_ctl,
 	.startup	= sunsu_startup,
 	.shutdown	= sunsu_shutdown,
-	.change_speed	= sunsu_change_speed,
+	.set_termios	= sunsu_set_termios,
 	.type		= sunsu_type,
 	.release_port	= sunsu_release_port,
 	.request_port	= sunsu_request_port,
diff -Nru a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
--- a/drivers/serial/sunzilog.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/sunzilog.c	Fri Jan 10 12:12:38 2003
@@ -917,26 +917,27 @@
 
 /* The port lock is not held.  */
 static void
-sunzilog_change_speed(struct uart_port *port, unsigned int cflag,
-		      unsigned int iflag, unsigned int quot)
+sunzilog_set_termios(struct uart_port *port, struct termios *termios,
+		     struct termios *old)
 {
 	struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
 	unsigned long flags;
 	int baud, brg;
 
+	baud = uart_get_baud_rate(port, termios, old, 1200, 76800);
+
 	spin_lock_irqsave(&up->port.lock, flags);
 
-	baud = (ZS_CLOCK / (quot * 16));
 	brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR);
 
-	sunzilog_convert_to_zs(up, cflag, iflag, brg);
+	sunzilog_convert_to_zs(up, termios->c_cflag, termios->c_iflag, brg);
 
-	if (UART_ENABLE_MS(&up->port, cflag))
+	if (UART_ENABLE_MS(&up->port, termios->c_cflag))
 		up->flags |= SUNZILOG_FLAG_MODEM_STATUS;
 	else
 		up->flags &= ~SUNZILOG_FLAG_MODEM_STATUS;
 
-	up->cflag = cflag;
+	up->cflag = termios->c_cflag;
 
 	sunzilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port));
 
@@ -982,7 +983,7 @@
 	.break_ctl	=	sunzilog_break_ctl,
 	.startup	=	sunzilog_startup,
 	.shutdown	=	sunzilog_shutdown,
-	.change_speed	=	sunzilog_change_speed,
+	.set_termios	=	sunzilog_set_termios,
 	.type		=	sunzilog_type,
 	.release_port	=	sunzilog_release_port,
 	.request_port	=	sunzilog_request_port,
@@ -1036,90 +1037,68 @@
 /* We used to attempt to use the address property of the Zilog device node
  * but that totally is not necessary on sparc64.
  */
-static struct zilog_layout * __init get_zs_sun4u(int chip, int node)
+static struct zilog_layout * __init get_zs_sun4u(int chip, int zsnode)
 {
-	unsigned long mapped_addr = 0xdeadbeefUL;
+	unsigned long mapped_addr;
 	unsigned int sun4u_ino;
-	int zsnode, seen;
-
-	zsnode = node;
-	seen = 0;
-	while (zsnode) {
-		int slave;
-
-		zsnode = prom_searchsiblings(zsnode, "zs");
-		if (zsnode == 0 || zsnode == -1)
-			break;
-		slave = prom_getintdefault(zsnode, "slave", -1);
-		if ((slave == chip) || (seen == chip)) {
-			struct sbus_bus *sbus = NULL;
-			struct sbus_dev *sdev = NULL;
-			int err;
-
-			if (central_bus == NULL) {
-				for_each_sbus(sbus) {
-					for_each_sbusdev(sdev, sbus) {
-						if (sdev->prom_node == zsnode)
-							goto found;
-					}
-				}
-			}
-		found:
-			if (sdev == NULL && central_bus == NULL) {
-				prom_printf("SunZilog: sdev&&central == NULL for "
-					    "Zilog %d in get_zs_sun4u.\n", chip);
-				prom_halt();
-			}
-			if (central_bus == NULL) {
-				mapped_addr =
-					sbus_ioremap(&sdev->resource[0], 0,
-						     PAGE_SIZE,
-						     "Zilog Registers");
-			} else {
-				struct linux_prom_registers zsregs[1];
-
-				err = prom_getproperty(zsnode, "reg",
-						       (char *) &zsregs[0],
-						       sizeof(zsregs));
-				if (err == -1) {
-					prom_printf("SunZilog: Cannot map "
-						    "Zilog %d regs on "
-						    "central bus.\n", chip);
-					prom_halt();
-				}
-				apply_fhc_ranges(central_bus->child,
-						 &zsregs[0], 1);
-				apply_central_ranges(central_bus, &zsregs[0], 1);
-				mapped_addr =
-					(((u64)zsregs[0].which_io)<<32UL) |
-					((u64)zsregs[0].phys_addr);
-			}
-
-			if (zilog_irq == -1) {
-				if (central_bus) {
-					unsigned long iclr, imap;
-
-					iclr = central_bus->child->fhc_regs.uregs
-						+ FHC_UREGS_ICLR;
-					imap = central_bus->child->fhc_regs.uregs
-						+ FHC_UREGS_IMAP;
-					zilog_irq = build_irq(12, 0, iclr, imap);
-				} else {
-					err = prom_getproperty(zsnode, "interrupts",
-							       (char *) &sun4u_ino,
-							       sizeof(sun4u_ino));
-					zilog_irq = sbus_build_irq(sbus_root, sun4u_ino);
-				}
+	struct sbus_bus *sbus = NULL;
+	struct sbus_dev *sdev = NULL;
+	int err;
+
+	if (central_bus == NULL) {
+		for_each_sbus(sbus) {
+			for_each_sbusdev(sdev, sbus) {
+				if (sdev->prom_node == zsnode)
+					goto found;
 			}
-			break;
 		}
-		zsnode = prom_getsibling(zsnode);
-		seen++;
 	}
-
-	if (zsnode == 0 || zsnode == -1) {
-		prom_printf("SunZilog: Cannot find Zilog %d in get_zs_sun4u.\n", chip);
+ found:
+	if (sdev == NULL && central_bus == NULL) {
+		prom_printf("SunZilog: sdev&&central == NULL for "
+			    "Zilog %d in get_zs_sun4u.\n", chip);
 		prom_halt();
+	}
+	if (central_bus == NULL) {
+		mapped_addr =
+			sbus_ioremap(&sdev->resource[0], 0,
+				     PAGE_SIZE,
+				     "Zilog Registers");
+	} else {
+		struct linux_prom_registers zsregs[1];
+
+		err = prom_getproperty(zsnode, "reg",
+				       (char *) &zsregs[0],
+				       sizeof(zsregs));
+		if (err == -1) {
+			prom_printf("SunZilog: Cannot map "
+				    "Zilog %d regs on "
+				    "central bus.\n", chip);
+			prom_halt();
+		}
+		apply_fhc_ranges(central_bus->child,
+				 &zsregs[0], 1);
+		apply_central_ranges(central_bus, &zsregs[0], 1);
+		mapped_addr =
+			(((u64)zsregs[0].which_io)<<32UL) |
+			((u64)zsregs[0].phys_addr);
+	}
+
+	if (zilog_irq == -1) {
+		if (central_bus) {
+			unsigned long iclr, imap;
+
+			iclr = central_bus->child->fhc_regs.uregs
+				+ FHC_UREGS_ICLR;
+			imap = central_bus->child->fhc_regs.uregs
+				+ FHC_UREGS_IMAP;
+			zilog_irq = build_irq(12, 0, iclr, imap);
+		} else {
+			err = prom_getproperty(zsnode, "interrupts",
+					       (char *) &sun4u_ino,
+					       sizeof(sun4u_ino));
+			zilog_irq = sbus_build_irq(sbus_root, sun4u_ino);
+		}
 	}
 
 	return (struct zilog_layout *) mapped_addr;
diff -Nru a/drivers/serial/uart00.c b/drivers/serial/uart00.c
--- a/drivers/serial/uart00.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/serial/uart00.c	Fri Jan 10 12:12:38 2003
@@ -314,14 +314,24 @@
 }
 
 static void
-uart00_change_speed(struct uart_port *port, unsigned int cflag,
-		    unsigned int iflag, unsigned int quot)
+uart00_set_termios(struct uart_port *port, struct termios *termios,
+		   struct termios *old)
 {
-	unsigned int uart_mc, old_ies;
+	unsigned int uart_mc, old_ies, quot;
 	unsigned long flags;
 
+	/*
+	 * We don't support CREAD (yet)
+	 */
+	termios->c_cflag |= CREAD;
+
+	/*
+	 * Ask the core to calculate the divisor for us.
+	 */
+	quot = uart_get_divisor(port, termios, old);
+
 	/* byte size and parity */
-	switch (cflag & CSIZE) {
+	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		uart_mc = UART_MC_CLS_CHARLEN_5;
 		break;
@@ -335,41 +345,47 @@
 		uart_mc = UART_MC_CLS_CHARLEN_8;
 		break;
 	}
-	if (cflag & CSTOPB)
+	if (termios->c_cflag & CSTOPB)
 		uart_mc|= UART_MC_ST_TWO;
-	if (cflag & PARENB) {
+	if (termios->c_cflag & PARENB) {
 		uart_mc |= UART_MC_PE_MSK;
-		if (!(cflag & PARODD))
+		if (!(termios->c_cflag & PARODD))
 			uart_mc |= UART_MC_EP_MSK;
 	}
 
+	spin_lock_irqsave(&port->lock, flags);
+
+	/*
+	 * Update the per-port timeout.
+	 */
+	uart_update_timeout(port, termios->c_cflag, quot);
+
 	port->read_status_mask = UART_RDS_OE_MSK;
-	if (iflag & INPCK)
+	if (termios->c_iflag & INPCK)
 		port->read_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
-	if (iflag & (BRKINT | PARMRK))
+	if (termios->c_iflag & (BRKINT | PARMRK))
 		port->read_status_mask |= UART_RDS_BI_MSK;
 
 	/*
 	 * Characters to ignore
 	 */
 	port->ignore_status_mask = 0;
-	if (iflag & IGNPAR)
+	if (termios->c_iflag & IGNPAR)
 		port->ignore_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
-	if (iflag & IGNBRK) {
+	if (termios->c_iflag & IGNBRK) {
 		port->ignore_status_mask |= UART_RDS_BI_MSK;
 		/*
 		 * If we're ignoring parity and break indicators,
 		 * ignore overruns to (for real raw support).
 		 */
-		if (iflag & IGNPAR)
+		if (termios->c_iflag & IGNPAR)
 			port->ignore_status_mask |= UART_RDS_OE_MSK;
 	}
 
 	/* first, disable everything */
-	spin_lock_irqsave(&port->lock, flags);
 	old_ies = UART_GET_IES(port); 
 
-	if (UART_ENABLE_MS(port, cflag))
+	if (UART_ENABLE_MS(port, termios->c_cflag))
 		old_ies |= UART_IES_ME_MSK;
 
 	/* Set baud rate */
@@ -495,7 +511,7 @@
 	.break_ctl	= uart00_break_ctl,
 	.startup	= uart00_startup,
 	.shutdown	= uart00_shutdown,
-	.change_speed	= uart00_change_speed,
+	.set_termios	= uart00_set_termios,
 	.type		= uart00_type,
 	.release_port	= uart00_release_port,
 	.request_port	= uart00_request_port,
diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/class/usblp.c	Fri Jan 10 12:12:38 2003
@@ -610,7 +610,8 @@
 {
 	DECLARE_WAITQUEUE(wait, current);
 	struct usblp *usblp = file->private_data;
-	int timeout, err = 0, writecount = 0;
+	int timeout, err = 0;
+	size_t writecount = 0;
 
 	while (writecount < count) {
 		if (!usblp->wcomplete) {
diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/core/hcd-pci.c	Fri Jan 10 12:12:38 2003
@@ -147,7 +147,7 @@
 		goto clean_2;
 	}
 
-	dev_info (*hcd->controller, "%s\n", hcd->product_desc);
+	dev_info (hcd->controller, "%s\n", hcd->product_desc);
 
 #ifndef __sparc__
 	sprintf (buf, "%d", dev->irq);
@@ -156,7 +156,7 @@
 #endif
 	if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd)
 			!= 0) {
-		dev_err (*hcd->controller,
+		dev_err (hcd->controller,
 				"request interrupt %s failed\n", bufp);
 		retval = -EBUSY;
 		goto clean_3;
@@ -165,7 +165,7 @@
 
 	hcd->regs = base;
 	hcd->region = region;
-	dev_info (*hcd->controller, "irq %s, %s %p\n", bufp,
+	dev_info (hcd->controller, "irq %s, %s %p\n", bufp,
 		(driver->flags & HCD_MEMORY) ? "pci mem" : "io base",
 		base);
 
@@ -207,7 +207,7 @@
 	hcd = pci_get_drvdata(dev);
 	if (!hcd)
 		return;
-	dev_info (*hcd->controller, "remove, state %x\n", hcd->state);
+	dev_info (hcd->controller, "remove, state %x\n", hcd->state);
 
 	if (in_interrupt ()) BUG ();
 
@@ -234,7 +234,7 @@
 
 	usb_deregister_bus (&hcd->self);
 	if (atomic_read (&hcd->self.refcnt) != 1) {
-		dev_warn (*hcd->controller,
+		dev_warn (hcd->controller,
 			"dangling refs (%d) to bus %d!\n",
 			atomic_read (&hcd->self.refcnt) - 1,
 			hcd->self.busnum);
@@ -285,7 +285,7 @@
 	int			retval;
 
 	hcd = pci_get_drvdata(dev);
-	dev_info (*hcd->controller, "suspend to state %d\n", state);
+	dev_info (hcd->controller, "suspend to state %d\n", state);
 
 	pci_save_state (dev, hcd->pci_state);
 
@@ -314,12 +314,12 @@
 	int			retval;
 
 	hcd = pci_get_drvdata(dev);
-	dev_info (*hcd->controller, "resume\n");
+	dev_info (hcd->controller, "resume\n");
 
 	/* guard against multiple resumes (APM bug?) */
 	atomic_inc (&hcd->resume_count);
 	if (atomic_read (&hcd->resume_count) != 1) {
-		dev_err (*hcd->controller, "concurrent PCI resumes\n");
+		dev_err (hcd->controller, "concurrent PCI resumes\n");
 		retval = 0;
 		goto done;
 	}
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/core/hcd.c	Fri Jan 10 12:12:38 2003
@@ -347,7 +347,7 @@
 			/* FALLTHROUGH */
 	case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
 	case DeviceOutRequest | USB_REQ_SET_FEATURE:
-		dev_dbg (*hcd->controller, "no device features yet yet\n");
+		dev_dbg (hcd->controller, "no device features yet yet\n");
 		break;
 	case DeviceRequest | USB_REQ_GET_CONFIGURATION:
 		ubuf [0] = 1;
@@ -390,7 +390,7 @@
 		break;
 	case DeviceOutRequest | USB_REQ_SET_ADDRESS:
 		// wValue == urb->dev->devaddr
-		dev_dbg (*hcd->controller, "root hub device address %d\n",
+		dev_dbg (hcd->controller, "root hub device address %d\n",
 			wValue);
 		break;
 
@@ -405,7 +405,7 @@
 			/* FALLTHROUGH */
 	case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
 	case EndpointOutRequest | USB_REQ_SET_FEATURE:
-		dev_dbg (*hcd->controller, "no endpoint features yet\n");
+		dev_dbg (hcd->controller, "no endpoint features yet\n");
 		break;
 
 	/* CLASS REQUESTS (and errors) */
@@ -419,12 +419,12 @@
 error:
 		/* "protocol stall" on error */
 		urb->status = -EPIPE;
-		dev_dbg (*hcd->controller, "unsupported hub control message (maxchild %d)\n",
+		dev_dbg (hcd->controller, "unsupported hub control message (maxchild %d)\n",
 				urb->dev->maxchild);
 	}
 	if (urb->status) {
 		urb->actual_length = 0;
-		dev_dbg (*hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
+		dev_dbg (hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
 			typeReq, wValue, wIndex, wLength, urb->status);
 	}
 	if (bufp) {
@@ -457,7 +457,7 @@
 	if (timer_pending (&hcd->rh_timer)
 			|| urb->status != -EINPROGRESS
 			|| urb->transfer_buffer_length < len) {
-		dev_dbg (*hcd->controller, "not queuing status urb, stat %d\n", urb->status);
+		dev_dbg (hcd->controller, "not queuing status urb, stat %d\n", urb->status);
 		return -EINVAL;
 	}
 
@@ -668,7 +668,7 @@
 
 	usbfs_add_bus (bus);
 
-	dev_info (*bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
+	dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
 }
 EXPORT_SYMBOL (usb_register_bus);
 
@@ -682,7 +682,7 @@
  */
 void usb_deregister_bus (struct usb_bus *bus)
 {
-	dev_info (*bus->controller, "USB bus %d deregistered\n", bus->busnum);
+	dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum);
 
 	/*
 	 * NOTE: make sure that all the devices are removed by the
@@ -718,7 +718,7 @@
 	sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum);
 	retval = usb_new_device (usb_dev, parent_dev);
 	if (retval)
-		dev_err (*parent_dev, "can't register root hub for %s, %d\n",
+		dev_err (parent_dev, "can't register root hub for %s, %d\n",
 				usb_dev->dev.bus_id, retval);
 	return retval;
 }
@@ -825,7 +825,7 @@
 #else
 			"would have ";
 #endif
-		dev_dbg (dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
+		dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
 			mode, old_alloc, bustime, new_alloc);
 #endif
 #ifdef CONFIG_USB_BANDWIDTH
@@ -864,7 +864,7 @@
 	urb->bandwidth = bustime;
 
 #ifdef USB_BANDWIDTH_MESSAGES
-	dev_dbg (dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
+	dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
 		bustime,
 		isoc ? "ISOC" : "INTR",
 		dev->bus->bandwidth_allocated,
@@ -893,7 +893,7 @@
 		dev->bus->bandwidth_int_reqs--;
 
 #ifdef USB_BANDWIDTH_MESSAGES
-	dev_dbg (dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
+	dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
 		urb->bandwidth,
 		isoc ? "ISOC" : "INTR",
 		dev->bus->bandwidth_allocated,
@@ -1154,7 +1154,7 @@
 	 */
 	if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
 		if (in_interrupt ()) {
-			dev_dbg (*hcd->controller, "non-async unlink in_interrupt");
+			dev_dbg (hcd->controller, "non-async unlink in_interrupt");
 			retval = -EWOULDBLOCK;
 			goto done;
 		}
@@ -1180,7 +1180,7 @@
 
 		/* hcds shouldn't really fail these calls, but... */
 		if (retval) {
-			dev_dbg (*sys, "dequeue %p --> %d\n", urb, retval);
+			dev_dbg (sys, "dequeue %p --> %d\n", urb, retval);
 			if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
 				spin_lock_irqsave (&urb->lock, flags);
 				urb->complete = splice.complete;
@@ -1203,7 +1203,7 @@
 	spin_unlock_irqrestore (&urb->lock, flags);
 bye:
 	if (retval && sys)
-		dev_dbg (*sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
+		dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
 	return retval;
 }
 
@@ -1234,7 +1234,7 @@
 
 	/* device driver problem with refcounts? */
 	if (!list_empty (&dev->urb_list)) {
-		dev_dbg (*hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
+		dev_dbg (hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
 			hcd->self.bus_name, udev->devnum);
 		return -EINVAL;
 	}
@@ -1367,7 +1367,7 @@
 		dev = list_entry (devlist, struct hcd_dev, dev_list);
 		list_for_each (urblist, &dev->urb_list) {
 			urb = list_entry (urblist, struct urb, urb_list);
-			dev_dbg (*hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
+			dev_dbg (hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
 				hcd->self.bus_name, urb, urb->pipe, urb->status);
 			if (urb->status == -EINPROGRESS)
 				urb->status = -ESHUTDOWN;
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/core/hub.c	Fri Jan 10 12:12:38 2003
@@ -263,7 +263,7 @@
 	int i;
 
 	/* Enable power to the ports */
-	dev_dbg(*hubdev(interface_to_usbdev(hub->intf)),
+	dev_dbg(hubdev(interface_to_usbdev(hub->intf)),
 		"enabling power on all ports\n");
 	dev = interface_to_usbdev(hub->intf);
 	for (i = 0; i < hub->descriptor->bNbrPorts; i++)
@@ -307,7 +307,7 @@
 
 	hub_dev = hubdev(dev);
 	dev->maxchild = hub->descriptor->bNbrPorts;
-	dev_info (*hub_dev, "%d port%s detected\n", dev->maxchild,
+	dev_info (hub_dev, "%d port%s detected\n", dev->maxchild,
 		(dev->maxchild == 1) ? "" : "s");
 
 	le16_to_cpus(&hub->descriptor->wHubCharacteristics);
@@ -321,33 +321,33 @@
 				    [((i + 1) / 8)] & (1 << ((i + 1) % 8))
 				? 'F' : 'R';
 		portstr[dev->maxchild] = 0;
-		dev_dbg(*hub_dev, "compound device; port removable status: %s\n", portstr);
+		dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr);
 	} else
-		dev_dbg(*hub_dev, "standalone hub\n");
+		dev_dbg(hub_dev, "standalone hub\n");
 
 	switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
 		case 0x00:
-			dev_dbg(*hub_dev, "ganged power switching\n");
+			dev_dbg(hub_dev, "ganged power switching\n");
 			break;
 		case 0x01:
-			dev_dbg(*hub_dev, "individual port power switching\n");
+			dev_dbg(hub_dev, "individual port power switching\n");
 			break;
 		case 0x02:
 		case 0x03:
-			dev_dbg(*hub_dev, "unknown reserved power switching mode\n");
+			dev_dbg(hub_dev, "unknown reserved power switching mode\n");
 			break;
 	}
 
 	switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
 		case 0x00:
-			dev_dbg(*hub_dev, "global over-current protection\n");
+			dev_dbg(hub_dev, "global over-current protection\n");
 			break;
 		case 0x08:
-			dev_dbg(*hub_dev, "individual port over-current protection\n");
+			dev_dbg(hub_dev, "individual port over-current protection\n");
 			break;
 		case 0x10:
 		case 0x18:
-			dev_dbg(*hub_dev, "no over-current protection\n");
+			dev_dbg(hub_dev, "no over-current protection\n");
                         break;
 	}
 
@@ -358,16 +358,16 @@
 		case 0:
 			break;
 		case 1:
-			dev_dbg(*hub_dev, "Single TT\n");
+			dev_dbg(hub_dev, "Single TT\n");
 			hub->tt.hub = dev;
 			break;
 		case 2:
-			dev_dbg(*hub_dev, "TT per port\n");
+			dev_dbg(hub_dev, "TT per port\n");
 			hub->tt.hub = dev;
 			hub->tt.multi = 1;
 			break;
 		default:
-			dev_dbg(*hub_dev, "Unrecognized hub protocol %d\n",
+			dev_dbg(hub_dev, "Unrecognized hub protocol %d\n",
 				dev->descriptor.bDeviceProtocol);
 			break;
 	}
@@ -375,26 +375,26 @@
 	switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) {
 		case 0x00:
 			if (dev->descriptor.bDeviceProtocol != 0)
-				dev_dbg(*hub_dev, "TT requires at most 8 FS bit times\n");
+				dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n");
 			break;
 		case 0x20:
-			dev_dbg(*hub_dev, "TT requires at most 16 FS bit times\n");
+			dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n");
 			break;
 		case 0x40:
-			dev_dbg(*hub_dev, "TT requires at most 24 FS bit times\n");
+			dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n");
 			break;
 		case 0x60:
-			dev_dbg(*hub_dev, "TT requires at most 32 FS bit times\n");
+			dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n");
 			break;
 	}
 
-	dev_dbg(*hub_dev, "Port indicators are %s supported\n", 
+	dev_dbg(hub_dev, "Port indicators are %s supported\n", 
 	    (hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND)
 	    	? "" : "not");
 
-	dev_dbg(*hub_dev, "power on to power good time: %dms\n",
+	dev_dbg(hub_dev, "power on to power good time: %dms\n",
 		hub->descriptor->bPwrOn2PwrGood * 2);
-	dev_dbg(*hub_dev, "hub controller current requirement: %dmA\n",
+	dev_dbg(hub_dev, "hub controller current requirement: %dmA\n",
 		hub->descriptor->bHubContrCurrent);
 
 	ret = usb_get_hub_status(dev, &hubstatus);
@@ -405,11 +405,11 @@
 
 	le16_to_cpus(&hubstatus.wHubStatus);
 
-	dev_dbg(*hub_dev, "local power source is %s\n",
+	dev_dbg(hub_dev, "local power source is %s\n",
 		(hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER)
 		? "lost (inactive)" : "good");
 
-	dev_dbg(*hub_dev, "%sover-current condition exists\n",
+	dev_dbg(hub_dev, "%sover-current condition exists\n",
 		(hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
 
 	/* Start the interrupt endpoint */
@@ -442,7 +442,7 @@
 	return 0;
 
 fail:
-	dev_err (hub->intf->dev, "config failed, %s (err %d)\n",
+	dev_err (&hub->intf->dev, "config failed, %s (err %d)\n",
 			message, ret);
 	/* hub_disconnect() frees urb and descriptor */
 	return ret;
@@ -505,7 +505,7 @@
 	if ((desc->desc.bInterfaceSubClass != 0) &&
 	    (desc->desc.bInterfaceSubClass != 1)) {
 descriptor_error:
-		dev_err (intf->dev, "bad descriptor, ignoring hub\n");
+		dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
 		return -EIO;
 	}
 
@@ -529,7 +529,7 @@
 	}
 
 	/* We found a hub */
-	dev_info (*hubdev (dev), "USB hub found\n");
+	dev_info (hubdev (dev), "USB hub found\n");
 
 	hub = kmalloc(sizeof(*hub), GFP_KERNEL);
 	if (!hub) {
@@ -714,7 +714,7 @@
 		if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
 			delay = HUB_LONG_RESET_TIME;
 
-		dev_dbg (*hubdev (hub),
+		dev_dbg (hubdev (hub),
 			"port %d not reset yet, waiting %dms\n",
 			port + 1, delay);
 	}
@@ -740,13 +740,13 @@
 			return status;
 		}
 
-		dev_dbg (*hubdev (hub),
+		dev_dbg (hubdev (hub),
 			"port %d not enabled, trying reset again...\n",
 			port + 1);
 		delay = HUB_LONG_RESET_TIME;
 	}
 
-	dev_err (*hubdev (hub),
+	dev_err (hubdev (hub),
 		"Cannot enable port %i.  Maybe the USB cable is bad?\n",
 		port + 1);
 
@@ -814,7 +814,7 @@
 	}
 
 	/* XXX Replace this with dbg() when 2.6 is about to ship. */
-	dev_info (*hubdev (hub),
+	dev_info (hubdev (hub),
 		"debounce: port %d: delay %dms stable %d status 0x%x\n",
 		port + 1, delay_time, stable_count, portstatus);
 
@@ -829,7 +829,7 @@
 	unsigned int delay = HUB_SHORT_RESET_TIME;
 	int i;
 
-	dev_dbg (hubstate->intf->dev,
+	dev_dbg (&hubstate->intf->dev,
 		"port %d, status %x, change %x, %s\n",
 		port + 1, portstatus, portchange, portspeed (portstatus));
 
@@ -849,7 +849,7 @@
 	}
 
 	if (usb_hub_port_debounce(hub, port)) {
-		dev_err (hubstate->intf->dev,
+		dev_err (&hubstate->intf->dev,
 			"connect-debounce failed, port %d disabled\n",
 			port+1);
 		usb_hub_port_disable(hub, port);
@@ -870,7 +870,7 @@
 		/* Allocate a new device struct */
 		dev = usb_alloc_dev(hub, hub->bus);
 		if (!dev) {
-			dev_err (hubstate->intf->dev,
+			dev_err (&hubstate->intf->dev,
 				"couldn't allocate usb_device\n");
 			break;
 		}
@@ -914,10 +914,10 @@
 			len = snprintf (dev->devpath, sizeof dev->devpath,
 				"%d", port + 1);
 		if (len == sizeof dev->devpath)
-			dev_err (hubstate->intf->dev,
+			dev_err (&hubstate->intf->dev,
 				"devpath size! usb/%03d/%03d path %s\n",
 				dev->bus->busnum, dev->devnum, dev->devpath);
-		dev_info (hubstate->intf->dev,
+		dev_info (&hubstate->intf->dev,
 			"new USB device on port %d, assigned address %d\n",
 			port + 1, dev->devnum);
 
@@ -1006,7 +1006,7 @@
 			if (portchange & USB_PORT_STAT_C_CONNECTION) {
 				usb_hub_port_connect_change(hub, i, portstatus, portchange);
 			} else if (portchange & USB_PORT_STAT_C_ENABLE) {
-				dev_dbg (*hubdev (dev),
+				dev_dbg (hubdev (dev),
 					"port %d enable change, status %x\n",
 					i + 1, portstatus);
 				usb_clear_port_feature(dev,
diff -Nru a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c
--- a/drivers/usb/core/usb-debug.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/core/usb-debug.c	Fri Jan 10 12:12:38 2003
@@ -177,7 +177,7 @@
 	if (!(buf = kmalloc(256, GFP_KERNEL)))
 		return;
 	if (usb_string(dev, index, buf, 256) > 0)
-		dev_printk(KERN_INFO, dev->dev, "%s: %s\n", id, buf);
+		dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf);
 	kfree(buf);
 }
 
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/core/usb.c	Fri Jan 10 12:12:38 2003
@@ -84,19 +84,19 @@
 	const struct usb_device_id *id;
 	int error = -ENODEV;
 
-	dev_dbg(*dev, "%s\n", __FUNCTION__);
+	dev_dbg(dev, "%s\n", __FUNCTION__);
 
 	if (!driver->probe)
 		return error;
 
 	if (!try_module_get(driver->owner)) {
-		dev_err (*dev, "Can't get a module reference for %s\n", driver->name);
+		dev_err (dev, "Can't get a module reference for %s\n", driver->name);
 		return error;
 	}
 
 	id = usb_match_id (intf, driver->id_table);
 	if (id) {
-		dev_dbg (*dev, "%s - got id\n", __FUNCTION__);
+		dev_dbg (dev, "%s - got id\n", __FUNCTION__);
 		down (&driver->serialize);
 		error = driver->probe (intf, id);
 		up (&driver->serialize);
@@ -118,7 +118,7 @@
 	driver = to_usb_driver(dev->driver);
 
 	if (!driver) {
-		dev_err(*dev, "%s does not have a valid driver to work with!",
+		dev_err(dev, "%s does not have a valid driver to work with!",
 		    __FUNCTION__);
 		return -ENODEV;
 	}
@@ -126,7 +126,7 @@
 	if (!try_module_get(driver->owner)) {
 		// FIXME this happens even when we just rmmod
 		// drivers that aren't in active use...
-		dev_err(*dev, "Dieing driver still bound to device.\n");
+		dev_err(dev, "Dieing driver still bound to device.\n");
 		return -EIO;
 	}
 
@@ -827,7 +827,7 @@
 
 	*pdev = NULL;
 
-	dev_info (dev->dev, "USB disconnect, address %d\n", dev->devnum);
+	dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum);
 
 	/* Free up all the children before we remove this device */
 	for (i = 0; i < USB_MAXCHILDREN; i++) {
@@ -836,7 +836,7 @@
 			usb_disconnect(child);
 	}
 
-	dev_dbg (dev->dev, "unregistering interfaces\n");
+	dev_dbg (&dev->dev, "unregistering interfaces\n");
 	if (dev->actconfig) {
 		for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 			struct usb_interface *interface = &dev->actconfig->interface[i];
@@ -846,7 +846,7 @@
 		}
 	}
 
-	dev_dbg (dev->dev, "unregistering device\n");
+	dev_dbg (&dev->dev, "unregistering device\n");
 	/* Free the device number and remove the /proc/bus/usb entry */
 	if (dev->devnum > 0) {
 		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
@@ -931,7 +931,7 @@
 
 	if (prod && usb_string (dev, prod, prod_str, 256) > 0) {
 #ifdef DEBUG
-		dev_printk (KERN_INFO, dev->dev, "Product: %s\n", prod_str);
+		dev_printk (KERN_INFO, &dev->dev, "Product: %s\n", prod_str);
 #endif
 	} else {
 		prod_str = 0;
@@ -939,7 +939,7 @@
 
 	if (mfgr && usb_string (dev, mfgr, mfgr_str, 256) > 0) {
 #ifdef DEBUG
-		dev_printk (KERN_INFO, dev->dev, "Manufacturer: %s\n", mfgr_str);
+		dev_printk (KERN_INFO, &dev->dev, "Manufacturer: %s\n", mfgr_str);
 #endif
 	} else {
 		mfgr_str = 0;
@@ -1042,7 +1042,7 @@
 			wait_ms(200);
 		}
 		if (err < 0) {
-			dev_err(dev->dev, "USB device not accepting new address=%d (error=%d)\n",
+			dev_err(&dev->dev, "USB device not accepting new address=%d (error=%d)\n",
 				dev->devnum, err);
 			clear_bit(dev->devnum, dev->bus->devmap.devicemap);
 			dev->devnum = -1;
@@ -1060,9 +1060,9 @@
 
 	if (err < 8) {
 		if (err < 0)
-			dev_err(dev->dev, "USB device not responding, giving up (error=%d)\n", err);
+			dev_err(&dev->dev, "USB device not responding, giving up (error=%d)\n", err);
 		else
-			dev_err(dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
+			dev_err(&dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
 		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
 		dev->devnum = -1;
 		return 1;
@@ -1077,9 +1077,9 @@
 	err = usb_get_device_descriptor(dev);
 	if (err < (signed)sizeof(dev->descriptor)) {
 		if (err < 0)
-			dev_err(dev->dev, "unable to get device descriptor (error=%d)\n", err);
+			dev_err(&dev->dev, "unable to get device descriptor (error=%d)\n", err);
 		else
-			dev_err(dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
+			dev_err(&dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
 				sizeof(dev->descriptor), err);
 	
 		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
@@ -1089,7 +1089,7 @@
 
 	err = usb_get_configuration(dev);
 	if (err < 0) {
-		dev_err(dev->dev, "unable to get device %d configuration (error=%d)\n",
+		dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n",
 			dev->devnum, err);
 		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
 		dev->devnum = -1;
@@ -1099,7 +1099,7 @@
 	/* we set the default configuration here */
 	err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
 	if (err) {
-		dev_err(dev->dev, "failed to set device %d default configuration (error=%d)\n",
+		dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n",
 			dev->devnum, err);
 		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
 		dev->devnum = -1;
@@ -1108,7 +1108,7 @@
 
 	/* USB device state == configured ... tell the world! */
 
-	dev_dbg(dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
+	dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
 		dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);
 	set_device_description (dev);
 
@@ -1151,7 +1151,7 @@
 				dev->bus->bus_name, dev->devpath,
 				desc->bInterfaceNumber);
 		}
-		dev_dbg (dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
+		dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
 		device_add (&interface->dev);
 		usb_create_driverfs_intf_files (interface);
 	}
diff -Nru a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
--- a/drivers/usb/host/ehci-dbg.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ehci-dbg.c	Fri Jan 10 12:12:38 2003
@@ -18,38 +18,14 @@
 
 /* this file is part of ehci-hcd.c */
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,50)
-
 #define ehci_dbg(ehci, fmt, args...) \
-	dev_dbg (*(ehci)->hcd.controller, fmt, ## args )
+	dev_dbg ((ehci)->hcd.controller , fmt , ## args )
 #define ehci_err(ehci, fmt, args...) \
-	dev_err (*(ehci)->hcd.controller, fmt, ## args )
+	dev_err ((ehci)->hcd.controller , fmt , ## args )
 #define ehci_info(ehci, fmt, args...) \
-	dev_info (*(ehci)->hcd.controller, fmt, ## args )
+	dev_info ((ehci)->hcd.controller , fmt , ## args )
 #define ehci_warn(ehci, fmt, args...) \
-	dev_warn (*(ehci)->hcd.controller, fmt, ## args )
-
-#else
-
-#ifdef DEBUG
-#define ehci_dbg(ehci, fmt, args...) \
-	printk(KERN_DEBUG "%s %s: " fmt, hcd_name, \
-		(ehci)->hcd.pdev->slot_name, ## args )
-#else
-#define ehci_dbg(ehci, fmt, args...) do { } while (0)
-#endif
-
-#define ehci_err(ehci, fmt, args...) \
-	printk(KERN_ERR "%s %s: " fmt, hcd_name, \
-		(ehci)->hcd.pdev->slot_name, ## args )
-#define ehci_info(ehci, fmt, args...) \
-	printk(KERN_INFO "%s %s: " fmt, hcd_name, \
-		(ehci)->hcd.pdev->slot_name, ## args )
-#define ehci_warn(ehci, fmt, args...) \
-	printk(KERN_WARNING "%s %s: " fmt, hcd_name, \
-		(ehci)->hcd.pdev->slot_name, ## args )
-#endif
-
+	dev_warn ((ehci)->hcd.controller , fmt , ## args )
 
 #ifdef EHCI_VERBOSE_DEBUG
 #	define vdbg dbg
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ehci-hcd.c	Fri Jan 10 12:12:38 2003
@@ -637,9 +637,13 @@
 static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
-	u32			status = readl (&ehci->regs->status);
+	u32			status;
 	int			bh;
 
+	spin_lock (&ehci->lock);
+
+	status = readl (&ehci->regs->status);
+
 	/* e.g. cardbus physical eject */
 	if (status == ~(u32) 0) {
 		ehci_dbg (ehci, "device removed\n");
@@ -648,9 +652,7 @@
 
 	status &= INTR_MASK;
 	if (!status)			/* irq sharing? */
-		return;
-
-	spin_lock (&ehci->lock);
+		goto done;
 
 	/* clear (just) interrupts */
 	writel (status, &ehci->regs->status);
@@ -693,6 +695,7 @@
 
 	if (bh)
 		ehci_work (ehci, regs);
+done:
 	spin_unlock (&ehci->lock);
 }
 
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ehci-q.c	Fri Jan 10 12:12:38 2003
@@ -222,7 +222,7 @@
 static unsigned
 qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
 {
-	struct ehci_qtd		*last = 0;
+	struct ehci_qtd		*last = 0, *end = qh->dummy;
 	struct list_head	*entry, *tmp;
 	int			stopped = 0;
 	unsigned		count = 0;
@@ -253,6 +253,10 @@
 			last = 0;
 		}
 
+		/* ignore urbs submitted during completions we reported */
+		if (qtd == end)
+			break;
+
 		/* hardware copies qtd out of qh overlay */
 		rmb ();
 		token = le32_to_cpu (qtd->hw_token);
@@ -967,25 +971,28 @@
 scan_async (struct ehci_hcd *ehci, struct pt_regs *regs)
 {
 	struct ehci_qh		*qh;
-	unsigned		count;
 
+	if (!++(ehci->stamp))
+		ehci->stamp++;
 rescan:
 	qh = ehci->async->qh_next.qh;
-	count = 0;
 	if (likely (qh != 0)) {
 		do {
 			/* clean any finished work for this qh */
-			if (!list_empty (&qh->qtd_list)) {
+			if (!list_empty (&qh->qtd_list)
+					&& qh->stamp != ehci->stamp) {
 				int temp;
 
 				/* unlinks could happen here; completion
-				 * reporting drops the lock.
+				 * reporting drops the lock.  rescan using
+				 * the latest schedule, but don't rescan
+				 * qhs we already finished (no looping).
 				 */
 				qh = qh_get (qh);
+				qh->stamp = ehci->stamp;
 				temp = qh_completions (ehci, qh, regs);
 				qh_put (ehci, qh);
 				if (temp != 0) {
-					count += temp;
 					goto rescan;
 				}
 			}
diff -Nru a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
--- a/drivers/usb/host/ehci.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ehci.h	Fri Jan 10 12:12:38 2003
@@ -81,6 +81,7 @@
 	struct pci_pool		*sitd_pool;	/* sitd per split iso urb */
 
 	struct timer_list	watchdog;
+	unsigned		stamp;
 
 #ifdef EHCI_STATS
 	struct ehci_stats	stats;
@@ -306,6 +307,7 @@
 	struct ehci_qtd		*dummy;
 
 	atomic_t		refcount;
+	unsigned		stamp;
 
 	u8			qh_state;
 #define	QH_STATE_LINKED		1		/* HC sees this */
diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
--- a/drivers/usb/host/ohci-dbg.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ohci-dbg.c	Fri Jan 10 12:12:38 2003
@@ -75,7 +75,7 @@
 
 static void ohci_dump_intr_mask (struct device *dev, char *label, __u32 mask)
 {
-	dev_dbg (*dev, "%s: 0x%08x%s%s%s%s%s%s%s%s%s\n",
+	dev_dbg (dev, "%s: 0x%08x%s%s%s%s%s%s%s%s%s\n",
 		label,
 		mask,
 		(mask & OHCI_INTR_MIE) ? " MIE" : "",
@@ -93,7 +93,7 @@
 static void maybe_print_eds (struct device *dev, char *label, __u32 value)
 {
 	if (value)
-		dev_dbg (*dev, "%s %08x\n", label, value);
+		dev_dbg (dev, "%s %08x\n", label, value);
 }
 
 static char *hcfs2string (int state)
@@ -115,12 +115,12 @@
 	__u32			temp;
 
 	temp = readl (&regs->revision) & 0xff;
-	dev_dbg (*dev, "OHCI %d.%d, %s legacy support registers\n",
+	dev_dbg (dev, "OHCI %d.%d, %s legacy support registers\n",
 		0x03 & (temp >> 4), (temp & 0x0f),
 		(temp & 0x10) ? "with" : "NO");
 
 	temp = readl (&regs->control);
-	dev_dbg (*dev, "control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", temp,
+	dev_dbg (dev, "control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", temp,
 		(temp & OHCI_CTRL_RWE) ? " RWE" : "",
 		(temp & OHCI_CTRL_RWC) ? " RWC" : "",
 		(temp & OHCI_CTRL_IR) ? " IR" : "",
@@ -133,7 +133,7 @@
 		);
 
 	temp = readl (&regs->cmdstatus);
-	dev_dbg (*dev, "cmdstatus: 0x%08x SOC=%d%s%s%s%s\n", temp,
+	dev_dbg (dev, "cmdstatus: 0x%08x SOC=%d%s%s%s%s\n", temp,
 		(temp & OHCI_SOC) >> 16,
 		(temp & OHCI_OCR) ? " OCR" : "",
 		(temp & OHCI_BLF) ? " BLF" : "",
@@ -167,7 +167,7 @@
 	ndp = (temp & RH_A_NDP);
 
 	if (verbose) {
-		dev_dbg (*controller->hcd.controller,
+		dev_dbg (controller->hcd.controller,
 			"roothub.a: %08x POTPGT=%d%s%s%s%s%s NDP=%d\n", temp,
 			((temp & RH_A_POTPGT) >> 24) & 0xff,
 			(temp & RH_A_NOCP) ? " NOCP" : "",
@@ -178,14 +178,14 @@
 			ndp
 			);
 		temp = roothub_b (controller);
-		dev_dbg (*controller->hcd.controller,
+		dev_dbg (controller->hcd.controller,
 			"roothub.b: %08x PPCM=%04x DR=%04x\n",
 			temp,
 			(temp & RH_B_PPCM) >> 16,
 			(temp & RH_B_DR)
 			);
 		temp = roothub_status (controller);
-		dev_dbg (*controller->hcd.controller,
+		dev_dbg (controller->hcd.controller,
 			"roothub.status: %08x%s%s%s%s%s%s\n",
 			temp,
 			(temp & RH_HS_CRWE) ? " CRWE" : "",
@@ -205,13 +205,13 @@
 
 static void ohci_dump (struct ohci_hcd *controller, int verbose)
 {
-	dev_dbg (*controller->hcd.controller,
+	dev_dbg (controller->hcd.controller,
 		"OHCI controller state\n");
 
 	// dumps some of the state we know about
 	ohci_dump_status (controller);
 	if (controller->hcca)
-		dev_dbg (*controller->hcd.controller,
+		dev_dbg (controller->hcd.controller,
 			"hcca frame #%04x\n", controller->hcca->frame_no);
 	ohci_dump_roothub (controller, 1);
 }
@@ -318,6 +318,8 @@
 	}
 }
 
+#define DRIVERFS_DEBUG_FILES 		/* only on 2.5 versions */
+
 #else
 static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
 
@@ -325,6 +327,8 @@
 
 /*-------------------------------------------------------------------------*/
 
+#ifdef DRIVERFS_DEBUG_FILES
+
 static ssize_t
 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
 {
@@ -355,7 +359,7 @@
 			scratch,
 			(info & ED_SKIP) ? " s" : "",
 			(ed->hwHeadP & ED_H) ? " H" : "",
-			(ed->hwHeadP & ED_C) ? "data1" : "data0");
+			(ed->hwHeadP & ED_C) ? data1 : data0);
 		size -= temp;
 		buf += temp;
 
@@ -513,7 +517,7 @@
 	device_create_file (bus->hcd.controller, &dev_attr_async);
 	device_create_file (bus->hcd.controller, &dev_attr_periodic);
 	// registers
-	dev_dbg (*bus->hcd.controller, "created debug files\n");
+	dev_dbg (bus->hcd.controller, "created debug files\n");
 }
 
 static inline void remove_debug_files (struct ohci_hcd *bus)
@@ -521,6 +525,13 @@
 	device_remove_file (bus->hcd.controller, &dev_attr_async);
 	device_remove_file (bus->hcd.controller, &dev_attr_periodic);
 }
+
+#else /* empty stubs for creating those files */
+
+static inline void create_debug_files (struct ohci_hcd *bus) { }
+static inline void remove_debug_files (struct ohci_hcd *bus) { }
+
+#endif /* DRIVERFS_DEBUG_FILES */
 
 /*-------------------------------------------------------------------------*/
 
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/host/ohci-hcd.c	Fri Jan 10 12:12:37 2003
@@ -383,7 +383,7 @@
 
 	/* SMM owns the HC?  not for long! */
 	if (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-		dev_dbg (*ohci->hcd.controller, "USB HC TakeOver from BIOS/SMM\n");
+		dev_dbg (ohci->hcd.controller, "USB HC TakeOver from BIOS/SMM\n");
 
 		/* this timeout is arbitrary.  we make it long, so systems
 		 * depending on usb keyboards may be usable even if the
@@ -396,7 +396,7 @@
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
 			wait_ms (10);
 			if (--temp == 0) {
-				dev_err (*ohci->hcd.controller, "USB HC TakeOver failed!\n");
+				dev_err (ohci->hcd.controller, "USB HC TakeOver failed!\n");
 				return -1;
 			}
 		}
@@ -405,7 +405,7 @@
 	/* Disable HC interrupts */
 	writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
 
-	dev_dbg (*ohci->hcd.controller, "USB HC reset_hc %s: ctrl = 0x%x ;\n",
+	dev_dbg (ohci->hcd.controller, "USB HC reset_hc %s: ctrl = 0x%x ;\n",
 		ohci->hcd.self.bus_name,
 		readl (&ohci->regs->control));
 
@@ -422,7 +422,7 @@
 	temp = 30;	/* ... allow extra time */
 	while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
 		if (--temp == 0) {
-			dev_err (*ohci->hcd.controller, "USB HC reset timed out!");
+			dev_err (ohci->hcd.controller, "USB HC reset timed out!");
 			return -1;
 		}
 		udelay (1);
@@ -594,7 +594,7 @@
 {	
 	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
 
-	dev_dbg (*hcd->controller, "stop %s controller%s\n",
+	dev_dbg (hcd->controller, "stop %s controller%s\n",
 		hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
 		ohci->disabled ? " (disabled)" : ""
 		);
diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ohci-hub.c	Fri Jan 10 12:12:38 2003
@@ -41,7 +41,7 @@
 /*-------------------------------------------------------------------------*/
 
 #define dbg_port(hc,label,num,value) \
-	dev_dbg (*hc->hcd.controller, \
+	dev_dbg (hc->hcd.controller, \
 		"%s roothub.portstatus [%d] " \
 		"= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
 		label, num, temp, \
diff -Nru a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
--- a/drivers/usb/host/ohci-mem.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ohci-mem.c	Fri Jan 10 12:12:38 2003
@@ -122,7 +122,7 @@
 	if (*prev)
 		*prev = td->td_hash;
 	else
-		dev_dbg (*hc->hcd.controller, "bad hash for td %p\n", td);
+		dev_dbg (hc->hcd.controller, "bad hash for td %p\n", td);
 	pci_pool_free (hc->td_cache, td, td->td_dma);
 }
 
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/host/ohci-q.c	Fri Jan 10 12:12:38 2003
@@ -206,7 +206,7 @@
 	default:
 		branch = balance (ohci, ed->interval, ed->load);
 		if (branch < 0) {
-			dev_dbg (*ohci->hcd.controller,
+			dev_dbg (ohci->hcd.controller,
 				"ERR %d, interval %d msecs, load %d\n",
 				branch, ed->interval, ed->load);
 			// FIXME if there are TDs queued, fail them!
@@ -786,7 +786,7 @@
 	}
 
 	/* help for troubleshooting: */
-	dev_dbg (urb->dev->dev,
+	dev_dbg (&urb->dev->dev,
 		"urb %p usb-%s-%s ep-%d-%s cc %d --> status %d\n",
 		urb,
 		urb->dev->bus->bus_name, urb->dev->devpath,
diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
--- a/drivers/usb/image/Kconfig	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/image/Kconfig	Fri Jan 10 12:12:37 2003
@@ -24,8 +24,8 @@
 	depends on USB
 	help
 	  Say Y here if you want to connect a USB scanner to your computer's
-	  USB port. Please read <file:Documentation/usb/scanner.txt> and
-	  <file:Documentation/usb/scanner-hp-sane.txt> for more information.
+	  USB port. Please read <file:Documentation/usb/scanner.txt> for more
+	  information.
 
 	  This code is also available as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want).
diff -Nru a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
--- a/drivers/usb/image/mdc800.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/image/mdc800.c	Fri Jan 10 12:12:38 2003
@@ -673,7 +673,7 @@
  */
 static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
 {
-	int   left=len, sts=len; /* single transfer size */
+	size_t left=len, sts=len; /* single transfer size */
 	char* ptr=buf;
 	DECLARE_WAITQUEUE(wait, current);
 
@@ -767,7 +767,7 @@
  */
 static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
 {
-	int i=0;
+	size_t i=0;
 	DECLARE_WAITQUEUE(wait, current);
 
 	down (&mdc800->io_lock);
diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c
--- a/drivers/usb/image/scanner.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/image/scanner.c	Fri Jan 10 12:12:38 2003
@@ -1,7 +1,7 @@
 /* -*- linux-c -*- */
 
 /* 
- * Driver for USB Scanners (linux-2.5.52)
+ * Driver for USB Scanners (linux-2.5.54)
  *
  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
  *
@@ -328,13 +328,21 @@
  *    - Accept devices with more than one interface. Only use interfaces that
  *      look like belonging to scanners.
  *    - Fix compilation error when debugging is enabled.
+ *    - Add locking to ioctl_scanner(). Thanks to Oliver Neukum
+ *      <oliver@neukum.name>.
  *
+ * 0.4.10  01/07/2003
+ *    - Added vendor/product ids for Visioneer scanners.
+ *    - Print information about user-supplied ids only once at startup instead
+ *      of everytime any USB device is plugged in.
+ *    - Removed PV8630 ioctls. Use the standard ioctls instead.
+ *    - Made endpoint detection more generic. Basically, only one bulk-in 
+ *      endpoint is required, everything else is optional.
+ *      
  * TODO
- *    - Remove the 2/3 endpoint limitation
  *    - Performance
  *    - Select/poll methods
  *    - More testing
- *    - Proper registry/assignment for LM9830 ioctl's
  *    - More general usage ioctl's
  *
  *
@@ -713,74 +721,22 @@
 {
 	struct usb_device *dev;
 	struct scn_usb_data *scn = file->private_data;
+	int retval = -ENOTTY;
 	int scn_minor;
 
 	scn_minor = USB_SCN_MINOR(inode);
+	down(&(scn->sem));
 
 	dev = scn->scn_dev;
 
 	switch (cmd)
 	{
 	case SCANNER_IOCTL_VENDOR :
-		return (put_user(dev->descriptor.idVendor, (unsigned int *) arg));
+		retval = (put_user(dev->descriptor.idVendor, (unsigned int *) arg));
+		break;
 	case SCANNER_IOCTL_PRODUCT :
-		return (put_user(dev->descriptor.idProduct, (unsigned int *) arg));
-#ifdef PV8630
-	case PV8630_IOCTL_INREQUEST :
-	{
-		int result;
-
-		struct {
-			__u8  data;
-			__u8  request;
-			__u16 value;
-			__u16 index;
-		} args;
-
-		if (copy_from_user(&args, (void *)arg, sizeof(args)))
-			return -EFAULT;
-
-		result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-					 args.request, USB_TYPE_VENDOR|
-					 USB_RECIP_DEVICE|USB_DIR_IN,
-					 args.value, args.index, &args.data,
-					 1, HZ*5);
-
-		dbg("ioctl_scanner(%d): inreq: args.data:%x args.value:%x args.index:%x args.request:%x\n", scn_minor, args.data, args.value, args.index, args.request);
-
-		if (copy_to_user((void *)arg, &args, sizeof(args)))
-			return -EFAULT;
-
-		dbg("ioctl_scanner(%d): inreq: result:%d\n", scn_minor, result);
-
-		return result;
-	}
-	case PV8630_IOCTL_OUTREQUEST :
-	{
-		int result;
-
-		struct {
-			__u8  request;
-			__u16 value;
-			__u16 index;
-		} args;
-
-		if (copy_from_user(&args, (void *)arg, sizeof(args)))
-			return -EFAULT;
-
-		dbg("ioctl_scanner(%d): outreq: args.value:%x args.index:%x args.request:%x\n", scn_minor, args.value, args.index, args.request);
-
-		result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
-					 args.request, USB_TYPE_VENDOR|
-					 USB_RECIP_DEVICE|USB_DIR_OUT,
-					 args.value, args.index, NULL,
-					 0, HZ*5);
-
-		dbg("ioctl_scanner(%d): outreq: result:%d\n", scn_minor, result);
-
-		return result;
-	}
-#endif /* PV8630 */
+		retval = (put_user(dev->descriptor.idProduct, (unsigned int *) arg));
+		break;
  	case SCANNER_IOCTL_CTRLMSG:
  	{
  		struct ctrlmsg_ioctl {
@@ -789,19 +745,26 @@
  		} cmsg;
  		int pipe, nb, ret;
  		unsigned char buf[64];
- 
- 		if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
- 			return -EFAULT;
+		retval = 0;
+
+ 		if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg))) {
+			retval = -EFAULT;
+			break;
+		}
 
  		nb = cmsg.req.wLength;
 
- 		if (nb > sizeof(buf))
- 			return -EINVAL;
+ 		if (nb > sizeof(buf)) {
+ 			retval = -EINVAL;
+			break;
+		}
 
  		if ((cmsg.req.bRequestType & 0x80) == 0) {
  			pipe = usb_sndctrlpipe(dev, 0);
- 			if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
- 				return -EFAULT;
+ 			if (nb > 0 && copy_from_user(buf, cmsg.data, nb)) {
+ 				retval = -EFAULT;
+				break;
+			}
  		} else {
  			pipe = usb_rcvctrlpipe(dev, 0);
 		}
@@ -814,18 +777,20 @@
 
  		if (ret < 0) {
  			err("ioctl_scanner(%d): control_msg returned %d\n", scn_minor, ret);
- 			return -EIO;
+ 			retval = -EIO;
+			break;
  		}
 
  		if (nb > 0 && (cmsg.req.bRequestType & 0x80) && copy_to_user(cmsg.data, buf, nb))
- 			return -EFAULT;
+ 			retval = -EFAULT;
 
- 		return 0;
+ 		break;
  	}
 	default:
-		return -ENOTTY;
+		break;
 	}
-	return 0;
+	up(&(scn->sem));
+	return retval;
 }
 
 static struct
@@ -856,10 +821,6 @@
 	char have_bulk_in, have_bulk_out, have_intr;
 	char name[10];
 
-	if (vendor != -1 && product != -1) {
-		info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
-	}
-
 	dbg("probe_scanner: USB dev address:%p", dev);
 
 /*
@@ -913,45 +874,52 @@
  
 	if (interface[0].desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC &&
 	    interface[0].desc.bInterfaceClass != USB_CLASS_PER_INTERFACE &&
-	    interface[0].desc.bInterfaceClass != 16) {
+	    interface[0].desc.bInterfaceClass != SCN_CLASS_SCANJET) {
 		dbg("probe_scanner: This interface doesn't look like a scanner (class=0x%x).", interface[0].desc.bInterfaceClass);
 		return -ENODEV;
 	}
 
 /*
- * Start checking for one or two bulk endpoints and an optional
- * interrupt endpoint. If we have an interrupt endpoint go ahead and
+ * Start checking for bulk and interrupt endpoints. We are only using the first
+ * one of each type of endpoint. If we have an interrupt endpoint go ahead and
  * setup the handler. FIXME: This is a future enhancement...
  */
 
 	dbg("probe_scanner: Number of Endpoints:%d", (int) interface->desc.bNumEndpoints);
 
-	if ((interface->desc.bNumEndpoints < 1) || (interface->desc.bNumEndpoints > 3)) {
-		info("probe_scanner: Only 1, 2, or 3 endpoints supported.");
-		return -ENODEV;
-	}
-
 	ep_cnt = have_bulk_in = have_bulk_out = have_intr = 0;
 
 	while (ep_cnt < interface->desc.bNumEndpoints) {
 		endpoint = &interface->endpoint[ep_cnt].desc;
 
-		if (!have_bulk_in && IS_EP_BULK_IN(endpoint)) {
+		if (IS_EP_BULK_IN(endpoint)) {
 			ep_cnt++;
+			if (have_bulk_in) {
+				info ("probe_scanner: ignoring additional bulk_in_ep:%d", ep_cnt);
+				continue;
+			}
 			have_bulk_in = ep_cnt;
 			dbg("probe_scanner: bulk_in_ep:%d", have_bulk_in);
 			continue;
 		}
 
-		if (!have_bulk_out && IS_EP_BULK_OUT(endpoint)) {
+		if (IS_EP_BULK_OUT(endpoint)) {
 			ep_cnt++;
+			if (have_bulk_out) {
+				info ("probe_scanner: ignoring additional bulk_out_ep:%d", ep_cnt);
+				continue;
+			}
 			have_bulk_out = ep_cnt;
 			dbg("probe_scanner: bulk_out_ep:%d", have_bulk_out);
 			continue;
 		}
 
-		if (!have_intr && IS_EP_INTR(endpoint)) {
+		if (IS_EP_INTR(endpoint)) {
 			ep_cnt++;
+			if (have_intr) {
+				info ("probe_scanner: ignoring additional intr_ep:%d", ep_cnt);
+				continue;
+			}
 			have_intr = ep_cnt;
 			dbg("probe_scanner: intr_ep:%d", have_intr);
 			continue;
@@ -966,31 +934,11 @@
  * should have.
  */
 
-	switch(interface->desc.bNumEndpoints) {
-	case 1:
-		if (!have_bulk_in) {
-			info("probe_scanner: One bulk-in endpoint required.");
-			return -EIO;
-		}
-		break;
-	case 2:
-		if (!have_bulk_in || !have_bulk_out) {
-			info("probe_scanner: Two bulk endpoints required.");
-			return -EIO;
-		}
-		break;
-	case 3:
-		if (!have_bulk_in || !have_bulk_out || !have_intr) {
-			info("probe_scanner: Two bulk endpoints and one interrupt endpoint required.");
-			return -EIO;
-		}
-		break;
-	default:
-		info("probe_scanner: Endpoint determination failed --  consult Documentation/usb/scanner.txt");
+	if (!have_bulk_in) {
+		err("probe_scanner: One bulk-in endpoint required.");
 		return -EIO;
 	}
 
-
 /*
  * Determine a minor number and initialize the structure associated
  * with it.  The problem with this is that we are counting on the fact
@@ -1069,7 +1017,6 @@
 		break;
 	case 0x055f:		/* Mustek */
 	case 0x0400:		/* Another Mustek */
-	case 0x0ff5:		/* And yet another Mustek */
 		scn->rd_nak_timeout = HZ * 1;
 	default:
 		scn->rd_nak_timeout = RD_NAK_TIMEOUT;
@@ -1171,6 +1118,8 @@
                 return -1;
 
 	info(DRIVER_VERSION ":" DRIVER_DESC);
+	if (vendor != -1 && product != -1)
+		info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
 	return 0;
 }
 
diff -Nru a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h
--- a/drivers/usb/image/scanner.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/image/scanner.h	Fri Jan 10 12:12:38 2003
@@ -1,5 +1,5 @@
 /*
- * Driver for USB Scanners (linux-2.5.52)
+ * Driver for USB Scanners (linux-2.5.54)
  *
  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
  *
@@ -38,13 +38,7 @@
 
 // #define DEBUG
 
-/* Enable this to support the older ioctl interfaces scanners that
- * a PV8630 Scanner-On-Chip.  The prefered method is the
- * SCANNER_IOCTL_CTRLMSG ioctl.
- */
-// #define PV8630 
-
-#define DRIVER_VERSION "0.4.9"
+#define DRIVER_VERSION "0.4.10"
 #define DRIVER_DESC "USB Scanner Driver"
 
 #include <linux/usb.h>
@@ -122,6 +116,7 @@
 	{ USB_DEVICE(0x0458, 0x2016) }, /* ColorPage-HR6X */
 	/* Hewlett Packard */
 	{ USB_DEVICE(0x03f0, 0x0505) }, /* ScanJet 2100C */
+	{ USB_DEVICE(0x03f0, 0x0605) },	/* 2200C */
 	{ USB_DEVICE(0x03f0, 0x0901) }, /* 2300C */
 	{ USB_DEVICE(0x03f0, 0x0205) },	/* 3300C */
 	{ USB_DEVICE(0x03f0, 0x0405) }, /* 3400C */
@@ -134,7 +129,6 @@
 	//	{ USB_DEVICE(0x03f0, 0x0701) },	/* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
 	{ USB_DEVICE(0x03f0, 0x0201) },	/* 6200C */
 	{ USB_DEVICE(0x03f0, 0x0601) },	/* 6300C */
-	{ USB_DEVICE(0x03f0, 0x605) },	/* 2200C */
 	/* iVina */
 	{ USB_DEVICE(0x0638, 0x0268) }, /* 1200U */
 	/* Lexmark */
@@ -242,6 +236,8 @@
 	{ USB_DEVICE(0x04a7, 0x0311) },	/* 6200 EPP/USB */
 	{ USB_DEVICE(0x04a7, 0x0321) },	/* OneTouch 8100 EPP/USB */
 	{ USB_DEVICE(0x04a7, 0x0331) }, /* OneTouch 8600 EPP/USB */
+	{ USB_DEVICE(0x0461, 0x0345) }, /* 6200 (actually Primax?) */
+	{ USB_DEVICE(0x0461, 0x0371) }, /* Onetouch 8920 USB (actually Primax?) */
 	{ }				/* Terminating entry */
 };
 
@@ -268,19 +264,15 @@
 #define RD_EXPIRE 12		/* Number of attempts to wait X seconds */
 
 
-/* FIXME: These are NOT registered ioctls()'s */
-#ifdef PV8630
-#define PV8630_IOCTL_INREQUEST 69
-#define PV8630_IOCTL_OUTREQUEST 70
-#endif /* PV8630 */
-
-
 /* read vendor and product IDs from the scanner */
 #define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
 #define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
 /* send/recv a control message to the scanner */
 #define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest)
 
+/* USB bInterfaceClass used by Hewlett-Packard ScanJet 3300c and Genius HR6
+   USB - Vivid III */
+#define SCN_CLASS_SCANJET 16
 
 #ifdef CONFIG_USB_DYNAMIC_MINORS
 #define SCN_MAX_MNR 256
diff -Nru a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c
--- a/drivers/usb/input/pid.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/input/pid.c	Fri Jan 10 12:12:38 2003
@@ -48,9 +48,7 @@
 /* Called when a transfer is completed */
 static void hid_pid_ctrl_out(struct urb *u, struct pt_regs *regs)
 {
-#ifdef DEBUG
-    printk("hid_pid_ctrl_out - Transfer Completed\n");
-#endif
+    dev_dbg(&u->dev->dev, "hid_pid_ctrl_out - Transfer Completed\n");
 }
 
 static void hid_pid_exit(struct hid_device* hid)
@@ -64,32 +62,29 @@
 }
 
 static int pid_upload_periodic(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
-    
-    printk("Requested periodic force upload\n");
+    dev_info(&pid->hid->dev->dev, "requested periodic force upload\n");
     return 0;
 }
 
 static int pid_upload_constant(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
-    printk("Requested constant force upload\n");
+    dev_info(&pid->hid->dev->dev, "requested constant force upload\n");
     return 0;
 }
 
 static int pid_upload_condition(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
-    printk("Requested Condition force upload\n");
+    dev_info(&pid->hid->dev->dev, "requested Condition force upload\n");
     return 0;
 }
 
 static int pid_upload_ramp(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
-    printk("Request ramp force upload\n");
+    dev_info(&pid->hid->dev->dev, "request ramp force upload\n");
     return 0;
 }
 
 static int hid_pid_event(struct hid_device *hid, struct input_dev *input,
 			  unsigned int type, unsigned int code, int value)
 {
-#ifdef DEBUG
-    printk ("PID event received: type=%d,code=%d,value=%d.\n",type,code,value);
-#endif
+    dev_dbg(&hid->dev->dev, "PID event received: type=%d,code=%d,value=%d.\n", type, code, value);
 
     if (type != EV_FF)
 	return -1;
@@ -127,20 +122,20 @@
 	/* Find report */
 	ret =  hid_find_report_by_usage(hid, wanted_report, &report, HID_OUTPUT_REPORT);
 	if(!ret) {
-		printk("Couldn't find report\n");
+		dev_err(&hid->dev->dev, "couldn't find report\n");
 		return ret;
 	}
 
 	/* Find field */
 	field = (struct hid_field *) kmalloc(sizeof(struct hid_field), GFP_KERNEL);
 	if(!field) {
-		printk("Couldn't allocate field\n");
+		dev_err(&hid->dev->dev, "couldn't allocate field\n");
 		return -ENOMEM;
 	}
 
 	ret = hid_set_field(field, ret, pid->effects[id].device_id);
 	if(!ret) {
-		printk("Couldn't set field\n");
+		dev_err(&hid->dev->dev, "couldn't set field\n");
 		return ret;
 	}
 
@@ -169,7 +164,7 @@
 		if ( current->pid == pid->effects[i].owner
 		     && test_bit(FF_PID_FLAGS_USED, &pid->effects[i].flags))
 			if (hid_pid_erase(dev, i))
-				warn("erase effect %d failed", i);
+				dev_warn(&hid->dev->dev, "erase effect %d failed", i);
 
 	return 0;
 }
@@ -183,14 +178,10 @@
 	int is_update;
 	int flags=0;
 
-#ifdef DEBUG
-        printk("Upload effect called: effect_type=%x\n",effect->type);
-#endif
+        dev_dbg(&pid_private->hid->dev->dev, "upload effect called: effect_type=%x\n",effect->type);
 	/* Check this effect type is supported by this device */
 	if (!test_bit(effect->type, dev->ffbit)) {
-#ifdef DEBUG
-		printk("Invalid kind of effect requested.\n");
-#endif
+		dev_dbg(&pid_private->hid->dev->dev, "invalid kind of effect requested.\n");
 		return -EINVAL;
 	}
 
@@ -209,16 +200,12 @@
 
 		if ( id == FF_EFFECTS_MAX) {
 // TEMP - We need to get ff_effects_max correctly first:  || id >= dev->ff_effects_max) {
-#ifdef DEBUG
-			printk("Not enough device memory\n");
-#endif
+			dev_dbg(&pid_private->hid->dev->dev, "Not enough device memory\n");
 			return -ENOMEM;
 		}
 
 		effect->id = id;
-#ifdef DEBUG
-		printk("Effect ID is %d\n.",id);
-#endif
+		dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d\n.",id);
 		pid_private->effects[id].owner = current->pid;
 		pid_private->effects[id].flags = (1<<FF_PID_FLAGS_USED);
 		spin_unlock_irqrestore(&pid_private->lock,flags);
@@ -265,9 +252,7 @@
 			break;
 
 		default:
-#ifdef DEBUG
-			printk("Invalid type of effect requested - %x.\n", effect->type);
-#endif
+			dev_dbg(&pid_private->hid->dev->dev, "invalid type of effect requested - %x.\n", effect->type);
 			return -EINVAL;
 	}
 	/* If a packet was sent, forbid new updates until we are notified
diff -Nru a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
--- a/drivers/usb/misc/Makefile	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/Makefile	Fri Jan 10 12:12:38 2003
@@ -3,14 +3,14 @@
 # (the ones that don't fit into any other categories)
 #
 
-export-objs	:= atmsar.o
-
 obj-$(CONFIG_USB_AUERSWALD)	+= auerswald.o
 obj-$(CONFIG_USB_BRLVGER)	+= brlvger.o
 obj-$(CONFIG_USB_EMI26)		+= emi26.o
 obj-$(CONFIG_USB_LCD)		+= usblcd.o
 obj-$(CONFIG_USB_RIO500)	+= rio500.o
-obj-$(CONFIG_USB_SPEEDTOUCH)	+= speedtouch.o atmsar.o
+obj-$(CONFIG_USB_SPEEDTOUCH)	+= speedtch.o
 obj-$(CONFIG_USB_TEST)		+= usbtest.o
 obj-$(CONFIG_USB_TIGL)		+= tiglusb.o
 obj-$(CONFIG_USB_USS720)	+= uss720.o
+
+speedtch-objs := speedtouch.o atmsar.o
diff -Nru a/drivers/usb/misc/atmsar.c b/drivers/usb/misc/atmsar.c
--- a/drivers/usb/misc/atmsar.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/atmsar.c	Fri Jan 10 12:12:38 2003
@@ -1,81 +1,77 @@
+/******************************************************************************
+ *  atmsar.c  --  General SAR library for ATM devices.
+ *
+ *  Copyright (C) 2000, Johan Verrept
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ *  more details.
+ *
+ *  You should have received a copy of the GNU General Public License along with
+ *  this program; if not, write to the Free Software Foundation, Inc., 59
+ *  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ******************************************************************************/
+
 /*
- *  General SAR library for ATM devices. 
- * 
- *  Written By Johan Verrept ( Johan.Verrept@advalvas.be )
- *
- *  Copyright (c) 2000, Johan Verrept
- *
- *  This code falls under the GNU General Public License, see COPYING for details
- *
- *  This package is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
-
-Version 0.2.4A:
-       - Version for inclusion in 2.5 series kernel
-       - Modifcations by Richard Purdie (rpurdie@rpsys.net)
- 	- replaced "sarlib" with "atmsar"
-       - adaptations for inclusion in kernel tree
-
-Version 0.2.4:
-	- Fixed wrong buffer overrun check in atmsar_decode_rawcell()
-	  reported by Stephen Robinson <stephen.robinson@zen.co.uk>
-	- Fixed bug when input skb did not contain a multple of 52/53 bytes.
-	  (would happen when the speedtouch device resynced)
-	  also reported by Stephen Robinson <stephen.robinson@zen.co.uk>
-
-Version 0.2.3:
-	- Fixed wrong allocation size. caused memory corruption in some
-	  cases. Reported by Vladimir Dergachev <volodya@mindspring.com>
-	- Added some comments
-
-Version 0.2.2:
-	- Fixed CRCASM (patch from Linus Flannagan <linusf@netservices.eng.net>)
-	- Fixed problem when user did NOT use the ATMSAR_USE_53BYTE_CELL flag.
-          (reported by  Piers Scannell <email@lot105.com> )
-	- No more in-buffer rewriting for cloned buffers.
-	- Removed the PII specific CFLAGS in the Makefile.
-
-Version 0.2.1:
-	- removed dependancy on alloc_tx. tis presented problems when using
-		this with the  br2684 code.
-
-Version 0.2:
-        - added AAL0 reassembly
-        - added alloc_tx support                  
-        - replaced alloc_skb in decode functions to dev_alloc_skb to allow
-                 calling from interrupt
-        - fixed embarassing AAL5 bug. I was setting the pti bit in the wrong
-                byte...
-        - fixed another emabrassing bug.. picked up the wrong crc type and
-                forgot to invert the crc result...
-        - fixed AAL5 length calculations.
-        - removed automatic skb freeing from encode functions.
-                This caused problems because i did kfree_skb it, while it
-                needed to be popped. I cannot determine though whether it
-                needs to be popped or not. Figu'e it out ye'self ;-)
-        - added mru field. This is the buffersize. atmsar_decode_aal0 will
-                use when it allocates a receive buffer. A stop gap for real
-		buffer management.
-
-Version 0.1:
-	- library created.
-	- only contains AAL5, AAL0 can be easily added. ( actually, only
-		AAL0 reassembly is missing)
-*/
+ *  Written by Johan Verrept (Johan.Verrept@advalvas.be)
+ *
+ *  0.2.4A:	- Version for inclusion in 2.5 series kernel
+ *		- Modifications by Richard Purdie (rpurdie@rpsys.net)
+ *		- replaced "sarlib" with "atmsar"
+ *		- adaptations for inclusion in kernel tree
+ *
+ *  0.2.4:	- Fixed wrong buffer overrun check in atmsar_decode_rawcell()
+ *		reported by Stephen Robinson <stephen.robinson@zen.co.uk>
+ *		- Fixed bug when input skb did not contain a multple of 52/53
+ *		bytes (would happen when the speedtouch device resynced)
+ *		also reported by Stephen Robinson <stephen.robinson@zen.co.uk>
+ *
+ *  0.2.3:	- Fixed wrong allocation size. caused memory corruption in some
+ *		cases. Reported by Vladimir Dergachev <volodya@mindspring.com>
+ *		- Added some comments
+ *
+ *  0.2.2:	- Fixed CRCASM
+ *		patch from Linus Flannagan <linusf@netservices.eng.net>
+ *		- Fixed problem when user did NOT use the
+ *		ATMSAR_USE_53BYTE_CELL flag.
+ *		reported by  Piers Scannell <email@lot105.com>
+ *		- No more in-buffer rewriting for cloned buffers.
+ *		- Removed the PII specific CFLAGS in the Makefile.
+ *
+ *  0.2.1:	- removed dependancy on alloc_tx. tis presented problems when
+ *		using this with the br2684 code.
+ *
+ *  0.2:	- added AAL0 reassembly
+ *		- added alloc_tx support
+ *		- replaced alloc_skb in decode functions to dev_alloc_skb to
+ *		allow calling from interrupt
+ *		- fixed embarassing AAL5 bug. I was setting the pti bit in the
+ *		wrong byte...
+ *		- fixed another emabrassing bug.. picked up the wrong crc type
+ *		and forgot to invert the crc result...
+ *		- fixed AAL5 length calculations.
+ *		- removed automatic skb freeing from encode functions.
+ *		This caused problems because i did kfree_skb it, while it
+ *		needed to be popped. I cannot determine though whether it
+ *		needs to be popped or not. Figu'e it out ye'self ;-)
+ *		- added mru field. This is the buffersize. atmsar_decode_aal0
+ *		will use when it allocates a receive buffer. A stop gap for
+ *		real buffer management.
+ *
+ *  0.1:	- library created.
+ *		- only contains AAL5, AAL0 can be easily added. (actually, only
+ *		AAL0 reassembly is missing)
+ *
+ */
 
 #include "atmsar.h"
-#include <linux/module.h>
-#include <linux/init.h>
-
-#define DRIVER_AUTHOR "Johan Verrept, Johan.Verrept@advalvas.be"
-#define DRIVER_DESC "General SAR library for ATM devices"
-#define DRIVER_VERSION "0.2.4A"
 
 /***********************
  **
@@ -220,7 +216,7 @@
 
 #define crc32( crc, mem, len) calc_crc(mem, len, crc);
 
-/* initialiation routines. not used at the moment 
+/* initialization routines. not used at the moment
  * I will avoid these as long as possible !!
  */
 
@@ -302,7 +298,7 @@
 /*
  * This gives problems with the ATM layer alloc_tx().
  * It is not usable from interrupt context and for
- * some reason this is used in interurpt context 
+ * some reason this is used in interrupt context
  * with br2684.c
  *
   if (vcc->alloc_tx)
@@ -587,7 +583,7 @@
 					vcc->reasBuffer = dev_alloc_skb (vcc->mtu);
 
 				/* if alloc fails, we just drop the cell. it is possible that we can still
-				 * receive cells on other vcc's 
+				 * receive cells on other vcc's
 				 */
 				if (vcc->reasBuffer) {
 					/* if (buffer overrun) discard received cells until now */
@@ -693,28 +689,3 @@
 	PDEBUG ("atmsar_decode_aal5 returns pdu 0x%p with length %d\n", skb, skb->len);
 	return skb;
 };
-
-
-static int start (void)
-{
-	return 0;
-}
-
-static void cleanup (void)
-{
-}
-
-module_init (start);
-module_exit (cleanup);
-
-EXPORT_SYMBOL (atmsar_open);
-EXPORT_SYMBOL (atmsar_close);
-EXPORT_SYMBOL (atmsar_encode_rawcell);
-EXPORT_SYMBOL (atmsar_encode_aal5);
-EXPORT_SYMBOL (atmsar_decode_rawcell);
-EXPORT_SYMBOL (atmsar_decode_aal5);
-EXPORT_SYMBOL (atmsar_alloc_tx);
-
-MODULE_AUTHOR (DRIVER_AUTHOR);
-MODULE_DESCRIPTION (DRIVER_DESC);
-MODULE_LICENSE ("GPL");
diff -Nru a/drivers/usb/misc/atmsar.h b/drivers/usb/misc/atmsar.h
--- a/drivers/usb/misc/atmsar.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/atmsar.h	Fri Jan 10 12:12:38 2003
@@ -1,15 +1,26 @@
-/*
+#ifndef _ATMSAR_H_
+#define _ATMSAR_H_
+
+/******************************************************************************
+ *  atmsar.h  --  General SAR library for ATM devices.
  *
- *  General SAR library for ATM devices.
+ *  Copyright (C) 2000, Johan Verrept
  *
- *  Copyright (c) 2000, Johan Verrept
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
  *
- *  This code falls under the GNU General Public License, see COPYING for details.
+ *  This program is distributed in the hope that it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ *  more details.
  *
- */
-
-#ifndef _ATMSAR_H_
-#define _ATMSAR_H_
+ *  You should have received a copy of the GNU General Public License along with
+ *  this program; if not, write to the Free Software Foundation, Inc., 59
+ *  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ******************************************************************************/
 
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
--- a/drivers/usb/misc/auerswald.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/auerswald.c	Fri Jan 10 12:12:38 2003
@@ -1946,9 +1946,6 @@
         if (intf->altsetting->desc.bInterfaceNumber != 0)
 		return -ENODEV;
 
-	/* prevent module unloading while sleeping */
-	MOD_INC_USE_COUNT;
-
 	/* allocate memory for our device and intialize it */
 	cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
 	if (cp == NULL) {
@@ -2066,7 +2063,6 @@
 
 	/* Error exit: clean up the memory */
 pfail:	auerswald_delete (cp);
-	MOD_DEC_USE_COUNT;
 	return -EIO;
 }
 
@@ -2138,9 +2134,6 @@
 			if (scp) scp->disconnect( scp);
 		}
 	}
-
-	/* The device releases this module */
-	MOD_DEC_USE_COUNT;
 }
 
 /* Descriptor for the devices which are served by this driver.
diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c
--- a/drivers/usb/misc/brlvger.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/brlvger.c	Fri Jan 10 12:12:38 2003
@@ -467,8 +467,6 @@
 
 	n = devnum - BRLVGER_MINOR;
 
-	MOD_INC_USE_COUNT;
-
 	do {
 		down(&disconnect_sem);
 		priv = display_table[n];
@@ -478,7 +476,6 @@
 			if (file->f_flags & O_NONBLOCK) {
 				dbg3("Failing non-blocking open: "
 				     "device %d not connected", n);
-				MOD_DEC_USE_COUNT;
 				return -EAGAIN;
 			}
 			/* Blocking open. One global wait queue will
@@ -490,7 +487,6 @@
 						       != NULL);
 			if(ret) {
 				dbg2("Interrupted wait for device %d", n);
-				MOD_DEC_USE_COUNT;
 				return ret;
 			}
 		}
@@ -504,7 +500,7 @@
 	/* Only one process can open each device, no sharing. */
 	ret = -EBUSY;
 	if(priv->opened)
-		goto error;
+		goto out;
 
 	dbg("Opening display %d", priv->subminor);
 
@@ -512,7 +508,7 @@
 	priv->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if(!priv->intr_urb) {
 		err("Unable to allocate URB");
-		goto error;
+		goto out;
 	}
 	usb_fill_int_urb( priv->intr_urb, priv->dev,
 			usb_rcvintpipe(priv->dev,
@@ -521,19 +517,19 @@
 			intr_callback, priv, priv->in_interrupt->bInterval);
 	if((ret = usb_submit_urb(priv->intr_urb, GFP_KERNEL)) <0){
 		err("Error %d while submitting URB", ret);
-		goto error;
+		goto out;
 	}
 
 	/* Set voltage */
 	if(brlvger_set_display_voltage(priv, raw_voltage) <0) {
 		err("Unable to set voltage");
-		goto error;
+		goto out;
 	}
 
 	/* Turn display on */
 	if((ret = brlvger_set_display_on_off(priv, 1)) <0) {
 		err("Error %d while turning display on", ret);
-		goto error;
+		goto out;
 	}
 
 	/* Mark as opened, so disconnect cannot free priv. */
@@ -544,8 +540,6 @@
 	ret = 0;
 	goto out;
 
- error:
-	MOD_DEC_USE_COUNT;
  out:
 	up(&priv->open_sem);
 	return ret;
@@ -577,8 +571,6 @@
 		up(&priv->open_sem);
 	}
 
-	MOD_DEC_USE_COUNT;
-
 	return 0;
 }
 
@@ -589,7 +581,8 @@
 	struct brlvger_priv *priv = file->private_data;
 	char buf[MAX_BRLVGER_CELLS];
 	int ret;
-	int rs, off;
+	size_t rs;
+	loff_t off;
 	__u16 written;
 
 	if(!priv->dev)
diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
--- a/drivers/usb/misc/rio500.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/rio500.c	Fri Jan 10 12:12:38 2003
@@ -94,8 +94,6 @@
 
 	init_waitqueue_head(&rio->wait_q);
 
-	MOD_INC_USE_COUNT;
-
 	unlock_kernel();
 
 	info("Rio opened.");
@@ -109,8 +107,6 @@
 
 	rio->isopen = 0;
 
-	MOD_DEC_USE_COUNT;
-
 	info("Rio closed.");
 	return 0;
 }
@@ -443,6 +439,7 @@
 
 static struct
 file_operations usb_rio_fops = {
+	.owner =	THIS_MODULE,
 	.read =		read_rio,
 	.write =	write_rio,
 	.ioctl =	ioctl_rio,
diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/speedtouch.c	Fri Jan 10 12:12:38 2003
@@ -1,31 +1,49 @@
+/******************************************************************************
+ *  speedtouch.c  --  Alcatel SpeedTouch USB xDSL modem driver.
+ *
+ *  Copyright (C) 2001, Alcatel
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ *  more details.
+ *
+ *  You should have received a copy of the GNU General Public License along with
+ *  this program; if not, write to the Free Software Foundation, Inc., 59
+ *  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ******************************************************************************/
+
 /*
- *  Driver Module for Alcatel SpeedTouch USB xDSL modem
- *  Copyright 2001, Alcatel
  *  Written by Johan Verrept (Johan.Verrept@advalvas.be)
  *
-
-1.5A:   - Version for inclusion in 2.5 series kernel
-        - Modifcations by Richard Purdie (rpurdie@rpsys.net)
-        - made compatible with kernel 2.5.6 onwards by changing
-	  udsl_usb_send_data_context->urb changed to a pointer 
-	  and adding code to alloc and free it
-        - remove_wait_queue() added to udsl_atm_processqueue_thread() 
-
-1.5:	- fixed memory leak when atmsar_decode_aal5 returned NULL.
-	 (reported by stephen.robinson@zen.co.uk)
-
-1.4:	- changed the spin_lock() under interrupt to spin_lock_irqsave()
-	- unlink all active send urbs of a vcc that is being closed.
-
-1.3.1:	- added the version number
-
-1.3:	- Added multiple send urb support
-	- fixed memory leak and vcc->tx_inuse starvation bug
-	  when not enough memory left in vcc.
-
-1.2:	- Fixed race condition in udsl_usb_send_data()
-1.1:	- Turned off packet debugging
- 
+ *  1.5A:	- Version for inclusion in 2.5 series kernel
+ *		- Modifications by Richard Purdie (rpurdie@rpsys.net)
+ *		- made compatible with kernel 2.5.6 onwards by changing
+ *		udsl_usb_send_data_context->urb to a pointer and adding code
+ *		to alloc and free it
+ *		- remove_wait_queue() added to udsl_atm_processqueue_thread()
+ *
+ *  1.5:	- fixed memory leak when atmsar_decode_aal5 returned NULL.
+ *		(reported by stephen.robinson@zen.co.uk)
+ *
+ *  1.4:	- changed the spin_lock() under interrupt to spin_lock_irqsave()
+ *		- unlink all active send urbs of a vcc that is being closed.
+ *
+ *  1.3.1:	- added the version number
+ *
+ *  1.3:	- Added multiple send urb support
+ *		- fixed memory leak and vcc->tx_inuse starvation bug
+ *		  when not enough memory left in vcc.
+ *
+ *  1.2:	- Fixed race condition in udsl_usb_send_data()
+ *  1.1:	- Turned off packet debugging
+ *
  */
 
 #include <linux/module.h>
@@ -44,8 +62,6 @@
 #include <linux/atmdev.h>
 #include "atmsar.h"
 
-const char *udsl_version = "1.5A";
-
 /*
 #define DEBUG 1
 #define DEBUG_PACKET 1
@@ -736,7 +752,7 @@
 	case -ENOENT:		/* buffer was unlinked */
 	case -EILSEQ:		/* unplug or timeout */
 	case -ETIMEDOUT:	/* unplug or timeout */
-		/* 
+		/*
 		 * we don't do anything here and we don't resubmit
 		 */
 		return;
@@ -1007,11 +1023,11 @@
 *
 ****************************************************************************/
 
-static int udsl_usb_init (void)
+static int __init udsl_usb_init (void)
 {
 	int i;
 
-	PDEBUG ("Initializing SpeedTouch Driver Version %s\n", udsl_version);
+	PDEBUG ("Initializing SpeedTouch Driver Version " DRIVER_VERSION "\n");
 
 	for (i = 0; i < MAX_UDSL; i++)
 		minor_data[i] = NULL;
@@ -1022,7 +1038,7 @@
 	return usb_register (&udsl_usb_driver);
 }
 
-static void udsl_usb_cleanup (void)
+static void __exit udsl_usb_cleanup (void)
 {
 	/* killing threads */
 	udsl_atm_sar_stop ();
@@ -1035,7 +1051,7 @@
 #ifdef DEBUG_PACKET
 /*******************************************************************************
 *
-* Debug 
+* Debug
 *
 *******************************************************************************/
 
diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
--- a/drivers/usb/misc/usbtest.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/misc/usbtest.c	Fri Jan 10 12:12:38 2003
@@ -546,7 +546,300 @@
 
 /*-------------------------------------------------------------------------*/
 
-// control queueing !!
+/* use ch9 requests to test whether:
+ *   (a) queues work for control, keeping N subtests queued and
+ *       active (auto-resubmit) for M loops through the queue.
+ *   (b) protocol stalls (control-only) will autorecover.
+ *       it's quite not like bulk/intr; no halt clearing.
+ *   (c) short control reads are reported and handled.
+ */
+
+struct ctrl_ctx {
+	spinlock_t		lock;
+	struct usbtest_dev	*dev;
+	struct completion	complete;
+	unsigned		count;
+	unsigned		pending;
+	int			status;
+	struct urb		**urb;
+	struct usbtest_param	*param;
+};
+
+static void ctrl_complete (struct urb *urb, struct pt_regs *regs)
+{
+	struct ctrl_ctx		*ctx = urb->context;
+	struct usb_ctrlrequest	*reqp;
+	int			status = urb->status;
+
+	reqp = (struct usb_ctrlrequest *)urb->setup_packet;
+
+	spin_lock (&ctx->lock);
+	ctx->count--;
+	ctx->pending--;
+
+	/* FIXME verify that the completions are in the right sequence.
+	 * we could store the test number with the setup packet, that
+	 * buffer has extra space.
+	 */
+
+	switch (status) {
+	case 0:			/* success */
+	case -EREMOTEIO:	/* short read */
+		if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_DEVICE)
+				&& reqp->bRequest == USB_REQ_GET_DESCRIPTOR
+				&& ((le16_to_cpu (reqp->wValue) >> 8)
+					== USB_DT_DEVICE)) {
+			if (reqp->wLength > USB_DT_DEVICE_SIZE
+					&& status == -EREMOTEIO)
+				status = 0;
+			else if (reqp->wLength == USB_DT_DEVICE_SIZE
+					&& status != 0)
+				status = -EIO;
+			if (status)
+				goto error;
+		}
+		break;
+	case -ECONNRESET:	/* async unlink */
+		break;
+	case -EPIPE: 		/* (protocol) stall */
+		if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_INTERFACE)
+				&& reqp->bRequest == USB_REQ_GET_INTERFACE)
+			status = 0;
+		else if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_DEVICE)
+				&& reqp->bRequest == USB_REQ_GET_DESCRIPTOR) {
+			switch (le16_to_cpu (reqp->wValue) >> 8) {
+			case USB_DT_DEVICE_QUALIFIER:
+			case USB_DT_OTHER_SPEED_CONFIG:
+			case USB_DT_INTERFACE:
+			case USB_DT_ENDPOINT:
+				status = 0;
+			}
+		} else if (reqp->bRequestType == USB_RECIP_ENDPOINT
+				&& reqp->bRequest == USB_REQ_CLEAR_FEATURE)
+			status = 0;
+		/* some stalls we plan on; others would be errors */
+		if (status == 0)
+			break;
+		/* else FALLTHROUGH */
+error:
+	default:		/* this fault's an error */
+		if (ctx->status == 0) {
+			int		i;
+
+			ctx->status = status;
+			info ("control queue %02x.%02x, err %d, %d left",
+					reqp->bRequestType, reqp->bRequest,
+					status, ctx->count);
+
+			/* FIXME use this "unlink everything" exit route
+			 * in all cases, not just for fault cleanup.
+			 * it'll be another test mode, but one that makes
+			 * testing be more consistent.
+			 */
+
+			/* unlink whatever's still pending */
+			for (i = 0; i < ctx->param->sglen; i++) {
+				struct urb	*u = ctx->urb [i];
+
+				if (u == urb || !u->dev)
+					continue;
+				status = usb_unlink_urb (u);
+				switch (status) {
+				case -EINPROGRESS:
+				case -EBUSY:
+					continue;
+				default:
+					dbg ("urb unlink --> %d", status);
+				}
+			}
+			status = ctx->status;
+		}
+	}
+
+	/* resubmit if we need to, else mark this as done */
+	if ((status == 0) && (ctx->pending < ctx->count)) {
+		if ((status = usb_submit_urb (urb, SLAB_ATOMIC)) != 0) {
+			dbg ("can't resubmit ctrl %02x.%02x, err %d",
+				reqp->bRequestType, reqp->bRequest, status);
+			urb->dev = 0;
+		} else
+			ctx->pending++;
+	} else
+		urb->dev = 0;
+	
+	/* signal completion when nothing's queued */
+	if (ctx->pending == 0)
+		complete (&ctx->complete);
+	spin_unlock (&ctx->lock);
+}
+
+static int
+test_ctrl_queue (struct usbtest_dev *dev, struct usbtest_param *param)
+{
+	struct usb_device	*udev = testdev_to_usbdev (dev);
+	struct urb		**urb;
+	struct ctrl_ctx		context;
+	int			i;
+
+	spin_lock_init (&context.lock);
+	context.dev = dev;
+	init_completion (&context.complete);
+	context.count = param->sglen * param->iterations;
+	context.pending = 0;
+	context.status = -ENOMEM;
+	context.param = param;
+
+	/* allocate and init the urbs we'll queue.
+	 * as with bulk/intr sglists, sglen is the queue depth; it also
+	 * controls which subtests run (more tests than sglen) or rerun.
+	 */
+	urb = kmalloc (param->sglen * sizeof (struct urb *), SLAB_KERNEL);
+	if (!urb)
+		goto cleanup;
+	memset (urb, 0, param->sglen * sizeof (struct urb *));
+	for (i = 0; i < param->sglen; i++) {
+		int			pipe = usb_rcvctrlpipe (udev, 0);
+		unsigned		len;
+		struct urb		*u;
+		struct usb_ctrlrequest	req, *reqp;
+
+		/* requests here are mostly expected to succeed on any
+		 * device, but some are chosen to trigger protocol stalls
+		 * or short reads.
+		 */
+		memset (&req, 0, sizeof req);
+		req.bRequest = USB_REQ_GET_DESCRIPTOR;
+		req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+
+		switch (i % 12 /* number of subtest cases here */) {
+		case 0:		// get device descriptor
+			req.wValue = cpu_to_le16 (USB_DT_DEVICE << 8);
+			len = sizeof (struct usb_device_descriptor);
+			break;
+		case 1:		// get first config descriptor (only)
+			req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+			len = sizeof (struct usb_config_descriptor);
+			break;
+		case 2:		// get altsetting (OFTEN STALLS)
+			req.bRequest = USB_REQ_GET_INTERFACE;
+			req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+			// index = 0 means first interface
+			len = 1;
+			break;
+		case 3:		// get interface status
+			req.bRequest = USB_REQ_GET_STATUS;
+			req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+			// interface 0
+			len = 2;
+			break;
+		case 4:		// get device status
+			req.bRequest = USB_REQ_GET_STATUS;
+			req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+			len = 2;
+			break;
+		case 5:		// get device qualifier (MAY STALL)
+			req.wValue = cpu_to_le16 (USB_DT_DEVICE_QUALIFIER << 8);
+			len = sizeof (struct usb_qualifier_descriptor);
+			break;
+		case 6:		// get first config descriptor, plus interface
+			req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+			len = sizeof (struct usb_config_descriptor);
+			len += sizeof (struct usb_interface_descriptor);
+			break;
+		case 7:		// get interface descriptor (ALWAYS STALLS)
+			req.wValue = cpu_to_le16 (USB_DT_INTERFACE << 8);
+			// interface == 0
+			len = sizeof (struct usb_interface_descriptor);
+			break;
+		// NOTE: two consecutive stalls in the queue here.
+		// that tests fault recovery a bit more aggressively.
+		case 8:		// clear endpoint halt (USUALLY STALLS)
+			req.bRequest = USB_REQ_CLEAR_FEATURE;
+			req.bRequestType = USB_RECIP_ENDPOINT;
+			// wValue 0 == ep halt
+			// wIndex 0 == ep0 (shouldn't halt!)
+			len = 0;
+			pipe = usb_sndctrlpipe (udev, 0);
+			break;
+		case 9:		// get endpoint status
+			req.bRequest = USB_REQ_GET_STATUS;
+			req.bRequestType = USB_DIR_IN|USB_RECIP_ENDPOINT;
+			// endpoint 0
+			len = 2;
+			break;
+		case 10:	// trigger short read (EREMOTEIO)
+			req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+			len = 1024;
+			break;
+		// NOTE: two consecutive _different_ faults in the queue.
+		case 11:	// get endpoint descriptor (ALWAYS STALLS)
+			req.wValue = cpu_to_le16 (USB_DT_ENDPOINT << 8);
+			// endpoint == 0
+			len = sizeof (struct usb_interface_descriptor);
+			break;
+		// NOTE: sometimes even a third fault in the queue!
+		case 12:	// get string 0 descriptor (MAY STALL)
+			req.wValue = cpu_to_le16 (USB_DT_STRING << 8);
+			// string == 0, for language IDs
+			len = sizeof (struct usb_interface_descriptor);
+			break;
+		default:
+			err ("bogus number of ctrl queue testcases!");
+			context.status = -EINVAL;
+			goto cleanup;
+		}
+		req.wLength = cpu_to_le16 (len);
+		urb [i] = u = simple_alloc_urb (udev, pipe, len);
+		if (!u)
+			goto cleanup;
+
+		reqp = usb_buffer_alloc (udev, sizeof req, SLAB_KERNEL,
+				&u->setup_dma);
+		if (!reqp)
+			goto cleanup;
+		*reqp = req;
+		u->setup_packet = (char *) reqp;
+
+		u->context = &context;
+		u->complete = ctrl_complete;
+		u->transfer_flags |= URB_ASYNC_UNLINK;
+	}
+
+	/* queue the urbs */
+	context.urb = urb;
+	spin_lock_irq (&context.lock);
+	for (i = 0; i < param->sglen; i++) {
+		context.status = usb_submit_urb (urb [i], SLAB_ATOMIC);
+		if (context.status != 0) {
+			dbg ("can't submit urb[%d], status %d",
+					i, context.status);
+			context.count = context.pending;
+			break;
+		}
+		context.pending++;
+	}
+	spin_unlock_irq (&context.lock);
+
+	/* FIXME  set timer and time out; provide a disconnect hook */
+
+	/* wait for the last one to complete */
+	wait_for_completion (&context.complete);
+
+cleanup:
+	for (i = 0; i < param->sglen; i++) {
+		if (!urb [i])
+			continue;
+		urb [i]->dev = udev;
+		if (urb [i]->setup_packet)
+			usb_buffer_free (udev, sizeof (struct usb_ctrlrequest),
+					urb [i]->setup_packet,
+					urb [i]->setup_dma);
+		simple_free_urb (urb [i]);
+	}
+	kfree (urb);
+	return context.status;
+}
+
 
 /*-------------------------------------------------------------------------*/
 
@@ -830,7 +1123,16 @@
 			dbg ("ch9 subset failed, iterations left %d", i);
 		break;
 
-	// case 10: queued control
+	/* queued control messaging */
+	case 10:
+		if (param->sglen == 0)
+			break;
+		retval = 0;
+		dbg ("%s TEST 10:  queue %d control calls, %d times",
+				dev->id, param->sglen,
+				param->iterations);
+		retval = test_ctrl_queue (dev, param);
+		break;
 
 	/* simple non-queued unlinks (ring with one urb) */
 	case 11:
diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
--- a/drivers/usb/net/kaweth.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/net/kaweth.c	Fri Jan 10 12:12:38 2003
@@ -703,7 +703,7 @@
 		kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
 
 	netif_wake_queue(kaweth->net);
-	dev_kfree_skb(skb);
+	dev_kfree_skb_irq(skb);
 }
 
 /****************************************************************
@@ -721,7 +721,7 @@
 	if (kaweth->removed) {
 	/* our device is undergoing disconnection - we bail out */
 		spin_unlock(&kaweth->device_lock);
-		dev_kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 		return 0;
 	}
 
@@ -733,7 +733,7 @@
 		/* no such luck - we make our own */
 		struct sk_buff *copied_skb;
 		copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
-		dev_kfree_skb_any(skb);
+		dev_kfree_skb_irq(skb);
 		skb = copied_skb;
 		if (!copied_skb) {
 			kaweth->stats.tx_errors++;
@@ -763,7 +763,7 @@
 		kaweth->stats.tx_errors++;
 
 		netif_start_queue(net);
-		dev_kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 	}
 	else
 	{
diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
--- a/drivers/usb/net/pegasus.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/net/pegasus.c	Fri Jan 10 12:12:38 2003
@@ -45,7 +45,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.5.8 (2002/12/13)"
+#define DRIVER_VERSION "v0.5.9 (2002/12/31)"
 #define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
 #define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
 
@@ -866,6 +866,9 @@
 		return -ENOMEM;
 
 	down(&pegasus->sem);
+
+	set_registers(pegasus, EthID, 6, net->dev_addr);
+	
 	usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
 			  usb_rcvbulkpipe(pegasus->usb, 1),
 			  pegasus->rx_skb->data, PEGASUS_MTU + 8,
diff -Nru a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
--- a/drivers/usb/net/pegasus.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/net/pegasus.h	Fri Jan 10 12:12:38 2003
@@ -239,8 +239,8 @@
 		LINKSYS_GPIO_RESET )
 PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
 		LINKSYS_GPIO_RESET | HAS_HOME_PNA )
-PEGASUS_DEV( "Linksys USB Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
-		LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
+		LINKSYS_GPIO_RESET | PEGASUS_II)
 PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b,
 		LINKSYS_GPIO_RESET | PEGASUS_II )
 PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c,
diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
--- a/drivers/usb/net/rtl8150.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/net/rtl8150.c	Fri Jan 10 12:12:38 2003
@@ -21,7 +21,7 @@
 #include <asm/uaccess.h>
 
 /* Version Information */
-#define DRIVER_VERSION "v0.5.6 (2002/09/19)"
+#define DRIVER_VERSION "v0.5.7 (2002/12/31)"
 #define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
 #define DRIVER_DESC "rtl8150 based usb-ethernet driver"
 
@@ -640,6 +640,9 @@
 		return -ENOMEM;
 
 	down(&dev->sem);
+
+	set_registers(dev, IDR, 6, netdev->dev_addr);
+	
 	usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
 		      dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
 	if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL)))
diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/net/usbnet.c	Fri Jan 10 12:12:38 2003
@@ -1363,6 +1363,16 @@
 	.in = 1, .out = 2,
 	.epsize = 64,
 };
+static const struct driver_info	zaurus_slb500_info = {
+	/* Japanese B500 ~= US SL-5600 */
+	.description =	"Sharp Zaurus SL-B500",
+	.flags =	FLAG_FRAMING_Z,
+	.check_connect = always_connected,
+	.tx_fixup = 	zaurus_tx_fixup,
+
+	.in = 1, .out = 2,
+	.epsize = 64,
+};
 
 // SL-5600 and C-700 are PXA based; should resemble A300
 
@@ -2331,8 +2341,7 @@
 	.bInterfaceSubClass	= 0x00,
 	.bInterfaceProtocol	= 0x00,
 	.driver_info =  (unsigned long) &zaurus_sl5x00_info,
-},
-{
+}, {
 	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
 			  | USB_DEVICE_ID_MATCH_DEVICE, 
 	.idVendor		= 0x04DD,
@@ -2341,6 +2350,15 @@
 	.bInterfaceSubClass	= 0x0a,
 	.bInterfaceProtocol	= 0x00,
 	.driver_info =  (unsigned long) &zaurus_sla300_info,
+}, {
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8006,
+	.bInterfaceClass	= 0x02,
+	.bInterfaceSubClass	= 0x0a,
+	.bInterfaceProtocol	= 0x00,
+	.driver_info =  (unsigned long) &zaurus_slb500_info,
 },
 #endif
 
diff -Nru a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
--- a/drivers/usb/serial/bus.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/bus.c	Fri Jan 10 12:12:38 2003
@@ -66,7 +66,7 @@
 	driver = port->serial->type;
 	if (driver->port_probe) {
 		if (!try_module_get(driver->owner)) {
-			dev_err(*dev, "module get failed, exiting\n");
+			dev_err(dev, "module get failed, exiting\n");
 			retval = -EIO;
 			goto exit;
 		}
@@ -79,7 +79,8 @@
 	minor = port->number;
 
 	tty_register_device (&usb_serial_tty_driver, minor);
-	dev_info(*dev, "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
+	dev_info(&port->serial->dev->dev, 
+		 "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
 		 driver->name, minor, minor);
 
 exit:
@@ -101,7 +102,7 @@
 	driver = port->serial->type;
 	if (driver->port_remove) {
 		if (!try_module_get(driver->owner)) {
-			dev_err(*dev, "module get failed, exiting\n");
+			dev_err(dev, "module get failed, exiting\n");
 			retval = -EIO;
 			goto exit;
 		}
@@ -111,7 +112,7 @@
 exit:
 	minor = port->number;
 	tty_unregister_device (&usb_serial_tty_driver, minor);
-	dev_info(*dev, "%s converter now disconnected from ttyUSB%d\n",
+	dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
 		 driver->name, minor);
 
 	return retval;
diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
--- a/drivers/usb/serial/empeg.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/empeg.c	Fri Jan 10 12:12:38 2003
@@ -181,7 +181,7 @@
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 
 	if (result)
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
 
 	return result;
 }
@@ -205,7 +205,7 @@
 		usb_unlink_urb (port->read_urb);
 	}
 	/* Uncomment the following line if you want to see some statistics in your syslog */
-	/* dev_info (port->dev, "Bytes In = %d  Bytes Out = %d\n", bytes_in, bytes_out); */
+	/* dev_info (&port->dev, "Bytes In = %d  Bytes Out = %d\n", bytes_in, bytes_out); */
 }
 
 
@@ -248,7 +248,7 @@
 		if (urb->transfer_buffer == NULL) {
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
 			if (urb->transfer_buffer == NULL) {
-				dev_err(port->dev, "%s no more kernel memory...\n", __FUNCTION__);
+				dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__);
 				goto exit;
 			}
 		}
@@ -278,7 +278,7 @@
 		/* send it down the pipe */
 		status = usb_submit_urb(urb, GFP_ATOMIC);
 		if (status) {
-			dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
+			dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
 			bytes_sent = status;
 			break;
 		}
@@ -426,7 +426,7 @@
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 
 	if (result)
-		dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 
 	return;
 
@@ -451,7 +451,7 @@
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 
 	if (result)
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
 
 	return;
 }
diff -Nru a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
--- a/drivers/usb/serial/ezusb.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/serial/ezusb.c	Fri Jan 10 12:12:37 2003
@@ -41,7 +41,7 @@
 
 	transfer_buffer =  kmalloc (length, GFP_KERNEL);
 	if (!transfer_buffer) {
-		dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
+		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
 		return -ENOMEM;
 	}
 	memcpy (transfer_buffer, data, length);
@@ -56,7 +56,7 @@
 	dbg("%s - %d", __FUNCTION__, reset_bit);
 	response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
 	if (response < 0) {
-		dev_err(serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
+		dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
 	}
 	return response;
 }
diff -Nru a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
--- a/drivers/usb/serial/generic.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/serial/generic.c	Fri Jan 10 12:12:37 2003
@@ -106,7 +106,7 @@
 				   port);
 		result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 		if (result)
-			dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 	}
 
 	return result;
@@ -176,7 +176,7 @@
 		/* send the data out the bulk port */
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result)
-			dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
 		else
 			result = count;
 
@@ -266,7 +266,7 @@
 			     usb_serial_generic_read_bulk_callback), port);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 }
 
 void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
--- a/drivers/usb/serial/io_edgeport.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/serial/io_edgeport.c	Fri Jan 10 12:12:37 2003
@@ -572,7 +572,7 @@
 			record = (struct edge_firmware_image_record *)firmware;
 			response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
 			if (response < 0) {
-				dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
+				dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
 				break;
 			}
 			firmware += sizeof (struct edge_firmware_image_record) + record->Len;
@@ -840,7 +840,7 @@
 exit:
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	if (result) {
-		dev_err(urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
+		dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
 	}
 }
 
@@ -889,7 +889,7 @@
 			edge_serial->read_urb->dev = edge_serial->serial->dev;
 			status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
 			if (status) {
-				dev_err(urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
+				dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
 			}
 		}
 	}
@@ -1057,7 +1057,7 @@
 		 * this interrupt will continue as long as the edgeport is connected */
 		response = usb_submit_urb (edge_serial->interrupt_read_urb, GFP_KERNEL);
 		if (response) {
-			dev_err(port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
+			dev_err(&port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
 		}
 	}
 	
@@ -1081,7 +1081,7 @@
 	response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
 
 	if (response < 0) {
-		dev_err(port->dev, "%s - error sending open port command\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - error sending open port command\n", __FUNCTION__);
 		edge_port->openPending = FALSE;
 		return -ENODEV;
 	}
@@ -1450,7 +1450,7 @@
 	count = fifo->count;
 	buffer = kmalloc (count+2, GFP_ATOMIC);
 	if (buffer == NULL) {
-		dev_err(edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
+		dev_err(&edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
 		edge_port->write_in_progress = FALSE;
 		return;
 	}
@@ -2143,7 +2143,7 @@
 	}
         edge_port = usb_get_serial_port_data(port);
 	if (edge_port == NULL) {
-		dev_err(edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
+		dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
 		return;
 	}
 
@@ -2330,7 +2330,7 @@
 
 	transfer_buffer =  kmalloc (64, GFP_KERNEL);
 	if (!transfer_buffer) {
-		dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
 		return -ENOMEM;
 	}
 
@@ -2375,7 +2375,7 @@
 
 	transfer_buffer =  kmalloc (64, GFP_KERNEL);
 	if (!transfer_buffer) {
-		dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
 		return -ENOMEM;
 	}
 
@@ -2420,7 +2420,7 @@
 
 	transfer_buffer =  kmalloc (64, GFP_KERNEL);
 	if (!transfer_buffer) {
-		dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
 		return -ENOMEM;
 	}
 
@@ -2463,7 +2463,7 @@
 
 	buffer =  kmalloc (10, GFP_ATOMIC);
 	if (!buffer) {
-		dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
+		dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
 		return -ENOMEM;
 	}
 
@@ -2554,14 +2554,14 @@
 
 	status = calc_baud_rate_divisor (baudRate, &divisor);
 	if (status) {
-		dev_err(edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
+		dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
 		return status;
 	}
 
 	// Alloc memory for the string of commands.
 	cmdBuffer =  kmalloc (0x100, GFP_ATOMIC);
 	if (!cmdBuffer) {
-		dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
+		dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
 		return -ENOMEM;
 	}
 	currCmd = cmdBuffer;
@@ -2838,7 +2838,7 @@
 			    (__u8 *)(&edge_serial->manuf_descriptor));
 
 	if (response < 1) {
-		dev_err(edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
+		dev_err(&edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
 	} else {
 		char string[30];
 		dbg("**Manufacturer Descriptor");
@@ -2877,7 +2877,7 @@
 			    (__u8 *)(&edge_serial->boot_descriptor));
 
 	if (response < 1) {
-		dev_err(edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
+		dev_err(&edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
 	} else {
 		dbg("**Boot Descriptor:");
 		dbg("  BootCodeLength: %d", edge_serial->boot_descriptor.BootCodeLength);
@@ -2938,7 +2938,7 @@
 		record = (struct edge_firmware_image_record *)firmware;
 		response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
 		if (response < 0) {
-			dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
+			dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
 			break;
 		}
 		firmware += sizeof (struct edge_firmware_image_record) + record->Len;
@@ -2974,7 +2974,7 @@
 	/* create our private serial structure */
 	edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
 	if (edge_serial == NULL) {
-		dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
+		dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
 		return -ENOMEM;
 	}
 	memset (edge_serial, 0, sizeof(struct edgeport_serial));
@@ -2988,7 +2988,7 @@
 
 	get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
 
-	dev_info(serial->dev->dev, "%s detected\n", edge_serial->name);
+	dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name);
 
 	/* get the manufacturing descriptor for this device */
 	get_manufacturing_desc (edge_serial);
@@ -3030,7 +3030,7 @@
 	for (i = 0; i < serial->num_ports; ++i) {
 		edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
 		if (edge_port == NULL) {
-			dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
+			dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
 			usb_set_serial_data(serial, NULL);
 			kfree(edge_serial);
 			return -ENOMEM;
diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/io_ti.c	Fri Jan 10 12:12:38 2003
@@ -473,7 +473,7 @@
 
 	oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
 	if (!oedb) {
-		dev_err (port->port->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__);
 		return -ENOMEM;
 	}
 
@@ -592,7 +592,7 @@
 	dbg ("%s - MAX Power            = %d", __FUNCTION__, dev->config->desc.bMaxPower*2);
 
 	if (dev->config->desc.bNumInterfaces != 1) {
-		dev_err (dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__);
+		dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__);
 		return -ENODEV;
 	}
 
@@ -692,12 +692,12 @@
 
 	rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
 	if (!rom_desc) {
-		dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err (dev, "%s - out of memory\n", __FUNCTION__);
 		return -ENOMEM;
 	}
 	buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
 	if (!buffer) {
-		dev_err (*dev, "%s - out of memory when allocating buffer\n", __FUNCTION__);
+		dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__);
 		kfree (rom_desc);
 		return -ENOMEM;
 	}
@@ -708,7 +708,7 @@
 		goto ExitTiValidateI2cImage; 
 
 	if (*buffer != 0x52) {
-		dev_err (*dev, "%s - invalid buffer signature\n", __FUNCTION__);
+		dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__);
 		status = -ENODEV;
 		goto ExitTiValidateI2cImage;
 	}
@@ -766,7 +766,7 @@
 
 	rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
 	if (!rom_desc) {
-		dev_err (serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__);
 		return -ENOMEM;
 	}
 	start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
@@ -823,7 +823,7 @@
 
 	buffer = kmalloc (buffer_size, GFP_KERNEL);
 	if (!buffer) {
-		dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err (dev, "%s - out of memory\n", __FUNCTION__);
 		return -ENOMEM;
 	}
 	
@@ -984,7 +984,7 @@
 
 	interface = &serial->serial->dev->config->interface->altsetting->desc;
 	if (!interface) {
-		dev_err (serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
+		dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
 		return -ENODEV;
 	}
 
@@ -1021,7 +1021,7 @@
 		 */
 		ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
 		if (!ti_manuf_desc) {
-			dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1040,7 +1040,7 @@
 
 		rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
 		if (!rom_desc) {
-			dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 			kfree (ti_manuf_desc);
 			return -ENOMEM;
 		}
@@ -1054,7 +1054,7 @@
 
 			firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
 			if (!firmware_version) {
-				dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+				dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 				kfree (rom_desc);
 				kfree (ti_manuf_desc);
 				return -ENOMEM;
@@ -1131,7 +1131,7 @@
 				}
 
 				if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
-					dev_err (*dev, "%s - error resetting device\n", __FUNCTION__);
+					dev_err (dev, "%s - error resetting device\n", __FUNCTION__);
 					kfree (firmware_version);
 					kfree (rom_desc);
 					kfree (ti_manuf_desc);
@@ -1162,7 +1162,7 @@
 
 			header  = kmalloc (HEADER_SIZE, GFP_KERNEL);
 			if (!header) {
-				dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+				dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 				kfree (rom_desc);
 				kfree (ti_manuf_desc);
 				return -ENOMEM;
@@ -1170,7 +1170,7 @@
 				
 			vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
 			if (!vheader) {
-				dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+				dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 				kfree (header);
 				kfree (rom_desc);
 				kfree (ti_manuf_desc);
@@ -1302,7 +1302,7 @@
 		 */
 		ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
 		if (!ti_manuf_desc) {
-			dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1337,7 +1337,7 @@
 		buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!buffer) {
-			dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+			dev_err (dev, "%s - out of memory\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		
@@ -1702,7 +1702,7 @@
 		break;
 
 	default:
-		dev_err (urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
+		dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
 			 __FUNCTION__, data[1]);
 		break;
 		
@@ -1711,7 +1711,7 @@
 exit:
 	status = usb_submit_urb (urb, GFP_ATOMIC);
 	if (status)
-		dev_err (urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+		dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
 			 __FUNCTION__, status);
 }
 
@@ -1779,7 +1779,7 @@
 	/* continue always trying to read */
 	status = usb_submit_urb (urb, GFP_ATOMIC);
 	if (status)
-		dev_err (urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+		dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
 			 __FUNCTION__, status);
 }
 
@@ -1855,7 +1855,7 @@
 			edge_port->dma_address = UMPD_OEDB2_ADDRESS;
 			break;
 		default:
-			dev_err (port->dev, "Unknown port number!!!\n");
+			dev_err (&port->dev, "Unknown port number!!!\n");
 			return -ENODEV;
 	}
 
@@ -1931,7 +1931,7 @@
 		/* we are the first port to be opened, let's post the interrupt urb */
 		urb = edge_serial->serial->port[0].interrupt_in_urb;
 		if (!urb) {
-			dev_err (port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__);
+			dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__);
 			return -EINVAL;
 		}
 		urb->complete = edge_interrupt_callback;
@@ -1939,7 +1939,7 @@
 		urb->dev = dev;
 		status = usb_submit_urb (urb, GFP_KERNEL);
 		if (status) {
-			dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+			dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
 			return status;
 		}
 	}
@@ -1954,7 +1954,7 @@
 	/* start up our bulk read urb */
 	urb = port->read_urb;
 	if (!urb) {
-		dev_err (port->dev, "%s - no read urb present, exiting\n", __FUNCTION__);
+		dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__);
 		return -EINVAL;
 	}
 	urb->complete = edge_bulk_in_callback;
@@ -1962,7 +1962,7 @@
 	urb->dev = dev;
 	status = usb_submit_urb (urb, GFP_KERNEL);
 	if (status) {
-		dev_err (port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+		dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
 		return status;
 	}
 
@@ -2072,7 +2072,7 @@
 	/* send the data out the bulk port */
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
 	else
 		result = count;
 
@@ -2191,7 +2191,7 @@
 	port->read_urb->dev = port->serial->dev;
 	status = usb_submit_urb (port->read_urb, GFP_ATOMIC);
 	if (status) {
-		dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+		dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
 	}
 }
 
@@ -2217,7 +2217,7 @@
 
 	config = kmalloc (sizeof (*config), GFP_KERNEL);
 	if (!config) {
-		dev_err (edge_port->port->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__);
 		return;
 	}
 
@@ -2590,7 +2590,7 @@
 	/* create our private serial structure */
 	edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
 	if (edge_serial == NULL) {
-		dev_err(serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+		dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
 		return -ENOMEM;
 	}
 	memset (edge_serial, 0, sizeof(struct edgeport_serial));
@@ -2607,7 +2607,7 @@
 	for (i = 0; i < serial->num_ports; ++i) {
 		edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
 		if (edge_port == NULL) {
-			dev_err(serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+			dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		memset (edge_port, 0, sizeof(struct edgeport_port));
diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
--- a/drivers/usb/serial/ir-usb.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/ir-usb.c	Fri Jan 10 12:12:38 2003
@@ -243,7 +243,7 @@
 
 	irda_desc = irda_usb_find_class_desc (serial->dev, 0);
 	if (irda_desc == NULL) {
-		dev_err (serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
+		dev_err (&serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
 		return -ENODEV;
 	}
 
@@ -291,7 +291,7 @@
 		/* override the default buffer sizes */
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!buffer) {
-			dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		kfree (port->read_urb->transfer_buffer);
@@ -300,7 +300,7 @@
 
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!buffer) {
-			dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
 			return -ENOMEM;
 		}
 		kfree (port->write_urb->transfer_buffer);
@@ -320,7 +320,7 @@
 		port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result)
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
 
 	return result;
 }
@@ -353,7 +353,7 @@
 	dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count);
 
 	if (!port->tty) {
-		dev_err (port->dev, "%s - no tty???\n", __FUNCTION__);
+		dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__);
 		return 0;
 	}
 
@@ -399,7 +399,7 @@
 
 	result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
 	else
 		result = transfer_size;
 
@@ -504,7 +504,7 @@
 
 			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 			if (result)
-				dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n",
+				dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
 					__FUNCTION__, result);
 
 			break ;
@@ -599,7 +599,7 @@
 
 		result = usb_submit_urb (port->write_urb, GFP_KERNEL);
 		if (result)
-			dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
 	}
 	return;
 }
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c	Fri Jan 10 12:12:37 2003
+++ b/drivers/usb/serial/keyspan.c	Fri Jan 10 12:12:37 2003
@@ -1035,7 +1035,7 @@
 	}
 
 	if (record == NULL) {
-		dev_err(serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
+		dev_err(&serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
 		return(1);
 	}
 
@@ -1049,7 +1049,7 @@
 					     (unsigned char *)record->data,
 					     record->data_size, 0xa0);
 		if (response < 0) {
-			dev_err(serial->dev->dev, "ezusb_writememory failed for Keyspan"
+			dev_err(&serial->dev->dev, "ezusb_writememory failed for Keyspan"
 				"firmware (%d %04X %p %d)\n",
 				response, 
 				record->address, record->data, record->data_size);
@@ -1847,7 +1847,7 @@
 		if (d_details->product_id == serial->dev->descriptor.idProduct)
 			break;
 	if (d_details == NULL) {
-		dev_err(serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
+		dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
 		return 1;
 	}
 
diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/pl2303.c	Fri Jan 10 12:12:38 2003
@@ -204,7 +204,7 @@
 	port->write_urb->dev = port->serial->dev;
 	result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
 	else
 		result = count;
 
@@ -246,7 +246,7 @@
 
 	buf = kmalloc (7, GFP_KERNEL);
 	if (!buf) {
-		dev_err(port->dev, "%s - out of memory.\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
 		return;
 	}
 	memset (buf, 0x00, 0x07);
@@ -294,7 +294,7 @@
 		case B230400:	baud = 230400;	break;
 		case B460800:	baud = 460800;	break;
 		default:
-			dev_err(port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
+			dev_err(&port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
 			break;
 	}
 	dbg("%s - baud = %d", __FUNCTION__, baud);
@@ -411,7 +411,7 @@
 	port->read_urb->dev = serial->dev;
 	result = usb_submit_urb (port->read_urb, GFP_KERNEL);
 	if (result) {
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
 		pl2303_close (port, NULL);
 		return -EPROTO;
 	}
@@ -420,7 +420,7 @@
 	port->interrupt_in_urb->dev = serial->dev;
 	result = usb_submit_urb (port->interrupt_in_urb, GFP_KERNEL);
 	if (result) {
-		dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
 		pl2303_close (port, NULL);
 		return -EPROTO;
 	}
@@ -621,7 +621,7 @@
 exit:
 	status = usb_submit_urb (urb, GFP_ATOMIC);
 	if (status)
-		dev_err(urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+		dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
 			__FUNCTION__, status);
 }
 
@@ -658,7 +658,7 @@
 			urb->dev = serial->dev;
 			result = usb_submit_urb(urb, GFP_ATOMIC);
 			if (result)
-				dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+				dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 			return;
 		}
 		dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
@@ -683,7 +683,7 @@
 		urb->dev = serial->dev;
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result)
-			dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+			dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 	}
 
 	return;
@@ -712,7 +712,7 @@
 		port->write_urb->dev = port->serial->dev;
 		result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 		if (result)
-			dev_err(urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
+			dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
 
 		return;
 	}
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/usb-serial.c	Fri Jan 10 12:12:38 2003
@@ -841,7 +841,7 @@
 
 	serial = kmalloc (sizeof (*serial), GFP_KERNEL);
 	if (!serial) {
-		dev_err(dev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
 		return NULL;
 	}
 	memset (serial, 0, sizeof(*serial));
@@ -899,18 +899,18 @@
 
 	serial = create_serial (dev, interface, type);
 	if (!serial) {
-		dev_err(interface->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
 		return -ENODEV;
 	}
 
 	/* if this device type has a probe function, call it */
 	if (type->probe) {
 		if (!try_module_get(type->owner)) {
-			dev_err(interface->dev, "module get failed, exiting\n");
+			dev_err(&interface->dev, "module get failed, exiting\n");
 			kfree (serial);
 			return -EIO;
 		}
-		retval = type->probe (serial);
+		retval = type->probe (serial, id);
 		module_put(type->owner);
 
 		if (retval < 0) {
@@ -960,9 +960,7 @@
 	     (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
 		if (interface != &dev->actconfig->interface[0]) {
 			/* check out the endpoints of the other interface*/
-			//interface = &dev->actconfig->interface[ifnum ^ 1];
-			interface = &dev->actconfig->interface[0];
-			iface_desc = &interface->altsetting[0];
+			iface_desc = &dev->actconfig->interface[0].altsetting[0];
 			for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
 				endpoint = &iface_desc->endpoint[i].desc;
 				if ((endpoint->bEndpointAddress & 0x80) &&
@@ -980,7 +978,7 @@
 		 * properly during a later invocation of usb_serial_probe
 		 */
 		if (num_bulk_in == 0 || num_bulk_out == 0) {
-			dev_info(interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
+			dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
 			kfree (serial);
 			return -ENODEV;
 		}
@@ -989,13 +987,13 @@
 #endif
 
 	/* found all that we need */
-	dev_info(interface->dev, "%s converter detected\n", type->name);
+	dev_info(&interface->dev, "%s converter detected\n", type->name);
 
 #ifdef CONFIG_USB_SERIAL_GENERIC
 	if (type == &usb_serial_generic_device) {
 		num_ports = num_bulk_out;
 		if (num_ports == 0) {
-			dev_err(interface->dev, "Generic device with no bulk out, not allowed.\n");
+			dev_err(&interface->dev, "Generic device with no bulk out, not allowed.\n");
 			kfree (serial);
 			return -EIO;
 		}
@@ -1005,7 +1003,7 @@
 		/* if this device type has a calc_num_ports function, call it */
 		if (type->calc_num_ports) {
 			if (!try_module_get(type->owner)) {
-				dev_err(interface->dev, "module get failed, exiting\n");
+				dev_err(&interface->dev, "module get failed, exiting\n");
 				kfree (serial);
 				return -EIO;
 			}
@@ -1017,7 +1015,7 @@
 	}
 
 	if (get_free_serial (serial, num_ports, &minor) == NULL) {
-		dev_err(interface->dev, "No more free serial devices\n");
+		dev_err(&interface->dev, "No more free serial devices\n");
 		kfree (serial);
 		return -ENOMEM;
 	}
@@ -1034,14 +1032,14 @@
 		port = &serial->port[i];
 		port->read_urb = usb_alloc_urb (0, GFP_KERNEL);
 		if (!port->read_urb) {
-			dev_err(interface->dev, "No free urbs available\n");
+			dev_err(&interface->dev, "No free urbs available\n");
 			goto probe_error;
 		}
 		buffer_size = endpoint->wMaxPacketSize;
 		port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
 		port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!port->bulk_in_buffer) {
-			dev_err(interface->dev, "Couldn't allocate bulk_in_buffer\n");
+			dev_err(&interface->dev, "Couldn't allocate bulk_in_buffer\n");
 			goto probe_error;
 		}
 		usb_fill_bulk_urb (port->read_urb, dev,
@@ -1059,7 +1057,7 @@
 		port = &serial->port[i];
 		port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
 		if (!port->write_urb) {
-			dev_err(interface->dev, "No free urbs available\n");
+			dev_err(&interface->dev, "No free urbs available\n");
 			goto probe_error;
 		}
 		buffer_size = endpoint->wMaxPacketSize;
@@ -1067,7 +1065,7 @@
 		port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
 		port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!port->bulk_out_buffer) {
-			dev_err(interface->dev, "Couldn't allocate bulk_out_buffer\n");
+			dev_err(&interface->dev, "Couldn't allocate bulk_out_buffer\n");
 			goto probe_error;
 		}
 		usb_fill_bulk_urb (port->write_urb, dev,
@@ -1085,14 +1083,14 @@
 		port = &serial->port[i];
 		port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
 		if (!port->interrupt_in_urb) {
-			dev_err(interface->dev, "No free urbs available\n");
+			dev_err(&interface->dev, "No free urbs available\n");
 			goto probe_error;
 		}
 		buffer_size = endpoint->wMaxPacketSize;
 		port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
 		port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!port->interrupt_in_buffer) {
-			dev_err(interface->dev, "Couldn't allocate interrupt_in_buffer\n");
+			dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n");
 			goto probe_error;
 		}
 		usb_fill_int_urb (port->interrupt_in_urb, dev, 
@@ -1121,7 +1119,7 @@
 	/* if this device type has an attach function, call it */
 	if (type->attach) {
 		if (!try_module_get(type->owner)) {
-			dev_err(interface->dev, "module get failed, exiting\n");
+			dev_err(&interface->dev, "module get failed, exiting\n");
 			goto probe_error;
 		}
 		retval = type->attach (serial);
@@ -1253,7 +1251,7 @@
 		/* free up any memory that we allocated */
 		kfree (serial);
 	}
-	dev_info(*dev, "device disconnected\n");
+	dev_info(dev, "device disconnected\n");
 }
 
 
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/usb-serial.h	Fri Jan 10 12:12:38 2003
@@ -231,7 +231,7 @@
 	struct list_head	driver_list;
 	struct device_driver	driver;
 
-	int (*probe) (struct usb_serial *serial);
+	int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
 	int (*attach) (struct usb_serial *serial);
 	int (*calc_num_ports) (struct usb_serial *serial);
 
diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/visor.c	Fri Jan 10 12:12:38 2003
@@ -168,7 +168,7 @@
 static int  visor_chars_in_buffer	(struct usb_serial_port *port);
 static void visor_throttle	(struct usb_serial_port *port);
 static void visor_unthrottle	(struct usb_serial_port *port);
-static int  visor_probe		(struct usb_serial *serial);
+static int  visor_probe		(struct usb_serial *serial, const struct usb_device_id *id);
 static int  visor_calc_num_ports(struct usb_serial *serial);
 static void visor_shutdown	(struct usb_serial *serial);
 static int  visor_ioctl		(struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
@@ -303,7 +303,7 @@
 
 	if (!port->read_urb) {
 		/* this is needed for some brain dead Sony devices */
-		dev_err(port->dev, "Device lied about number of ports, please use a lower one.\n");
+		dev_err(&port->dev, "Device lied about number of ports, please use a lower one.\n");
 		return -ENODEV;
 	}
 
@@ -327,7 +327,7 @@
 			   visor_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n",
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
 			__FUNCTION__, result);
 		goto exit;
 	}
@@ -336,7 +336,7 @@
 		dbg("%s - adding interrupt input for treo", __FUNCTION__);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		if (result)
-			dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n",
+			dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
 				__FUNCTION__, result);
 	}
 exit:	
@@ -363,7 +363,7 @@
 		 * device is still here */
 		transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
 		if (!transfer_buffer) {
-			dev_err(port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
+			dev_err(&port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
 		} else {
 			/* send a shutdown message to the device */
 			usb_control_msg (serial->dev,
@@ -380,7 +380,7 @@
 			usb_unlink_urb (port->interrupt_in_urb);
 	}
 	/* Uncomment the following line if you want to see some statistics in your syslog */
-	/* dev_info (port->dev, "Bytes In = %d  Bytes Out = %d\n", bytes_in, bytes_out); */
+	/* dev_info (&port->dev, "Bytes In = %d  Bytes Out = %d\n", bytes_in, bytes_out); */
 }
 
 
@@ -395,13 +395,13 @@
 
 	buffer = kmalloc (count, GFP_ATOMIC);
 	if (!buffer) {
-		dev_err(port->dev, "out of memory\n");
+		dev_err(&port->dev, "out of memory\n");
 		return -ENOMEM;
 	}
 
 	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!urb) {
-		dev_err(port->dev, "no more free urbs\n");
+		dev_err(&port->dev, "no more free urbs\n");
 		kfree (buffer);
 		return -ENOMEM;
 	}
@@ -427,7 +427,7 @@
 	/* send it down the pipe */
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
-		dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
+		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
 			__FUNCTION__, status);
 		count = status;
 	} else {
@@ -539,7 +539,7 @@
 			   visor_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 	return;
 }
 
@@ -577,7 +577,7 @@
 exit:
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	if (result)
-		dev_err(urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
+		dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
 			__FUNCTION__, result);
 }
 
@@ -597,10 +597,10 @@
 	port->read_urb->dev = port->serial->dev;
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
-		dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
 }
 
-static int visor_probe (struct usb_serial *serial)
+static int visor_probe (struct usb_serial *serial, const struct usb_device_id *id)
 {
 	struct device *dev = &serial->dev->dev;
 	int response;
@@ -609,7 +609,7 @@
 	unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
 
 	if (!transfer_buffer) {
-		dev_err(*dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
+		dev_err(dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
 		return -ENOMEM;
 	}
 
@@ -622,14 +622,14 @@
 	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
 					0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
 	if (response < 0) {
-		dev_err(*dev, "%s - error getting connection information\n", __FUNCTION__);
+		dev_err(dev, "%s - error getting connection information\n", __FUNCTION__);
 	} else {
 		struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
 		char *string;
 
 		le16_to_cpus(&connection_info->num_ports);
 		num_ports = connection_info->num_ports;
-		dev_info(*dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
+		dev_info(dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
 		for (i = 0; i < num_ports; ++i) {
 			switch (connection_info->connections[i].port_function_id) {
 				case VISOR_FUNCTION_GENERIC:
@@ -651,7 +651,7 @@
 					string = "unknown";
 					break;	
 			}
-			dev_info(*dev, "%s: port %d, is for %s use\n", serial->type->name,
+			dev_info(dev, "%s: port %d, is for %s use\n", serial->type->name,
 				 connection_info->connections[i].port, string);
 		/* save off our num_ports info so that we can use it in the calc_num_ports call */
 		usb_set_serial_data(serial, (void *)(long)num_ports);
@@ -667,7 +667,7 @@
 					    0xc2, 0x0000, 0x0000, transfer_buffer, 
 					    0x14, 300);
 		if (response < 0) {
-			dev_err(*dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
+			dev_err(dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
 		} else {
 			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
 		}
@@ -676,7 +676,7 @@
 					    0xc2, 0x0000, 0x0000, transfer_buffer, 
 					    0x14, 300);
 		if (response < 0) {
-			dev_err(*dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
+			dev_err(dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
 		} else {
 			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
 		}
@@ -686,7 +686,7 @@
 	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
 					0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
 	if (response < 0) {
-		dev_err(*dev, "%s - error getting bytes available request\n", __FUNCTION__);
+		dev_err(dev, "%s - error getting bytes available request\n", __FUNCTION__);
 	}
 
 	kfree (transfer_buffer);
@@ -722,11 +722,11 @@
 				  USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
 				  0, 0, &data, 1, HZ * 3);
 	if (result < 0) {
-		dev_err(*dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
 		return result;
 	}
 	if (result != 1) {
-		dev_err(*dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
 		return -EIO;
 	}
 
@@ -736,11 +736,11 @@
 				  USB_DIR_IN | USB_RECIP_INTERFACE,
 				  0, 0, &data, 1, HZ * 3);
 	if (result < 0) {
-		dev_err(*dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
 		return result;
 	}
 	if (result != 1) {
-		dev_err(*dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
 		return -EIO;
 	}
 
diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
--- a/drivers/usb/serial/whiteheat.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/serial/whiteheat.c	Fri Jan 10 12:12:38 2003
@@ -134,7 +134,7 @@
 };
 
 /* function prototypes for the Connect Tech WhiteHEAT prerenumeration device */
-static int  whiteheat_firmware_download	(struct usb_serial *serial);
+static int  whiteheat_firmware_download	(struct usb_serial *serial, const struct usb_device_id *id);
 static int  whiteheat_firmware_attach	(struct usb_serial *serial);
 
 /* function prototypes for the Connect Tech WhiteHEAT serial converter */
@@ -269,7 +269,7 @@
  - device renumerated itself and comes up as new device id with all
    firmware download completed.
 */
-static int whiteheat_firmware_download (struct usb_serial *serial)
+static int whiteheat_firmware_download (struct usb_serial *serial, const struct usb_device_id *id)
 {
 	int response;
 	const struct whiteheat_hex_record *record;
diff -Nru a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
--- a/drivers/usb/storage/freecom.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/storage/freecom.c	Fri Jan 10 12:12:38 2003
@@ -285,7 +285,7 @@
          * and such will hang. */
         US_DEBUGP("Device indicates that it has %d bytes available\n",
                         le16_to_cpu (fst->Count));
-        US_DEBUGP("SCSI requested %d\n", usb_stor_transfer_length(srb));
+        US_DEBUGP("SCSI requested %d\n", srb->request_bufflen);
 
         /* Find the length we desire to read. */
 	switch (srb->cmnd[0]) {
@@ -296,7 +296,7 @@
 			length = fst->Count;
 			break;
 		default:
- 			length = usb_stor_transfer_length (srb);
+ 			length = srb->request_bufflen;
 	}
 
 	/* verify that this amount is legal */
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/storage/transport.c	Fri Jan 10 12:12:38 2003
@@ -56,307 +56,6 @@
 #include <linux/slab.h>
 
 /***********************************************************************
- * Helper routines
- ***********************************************************************/
-
-/* Calculate the length of the data transfer (not the command) for any
- * given SCSI command
- */
-unsigned int usb_stor_transfer_length(Scsi_Cmnd *srb)
-{
-      	int i;
-	int doDefault = 0;
-	unsigned int len = 0;
-	unsigned int total = 0;
-	struct scatterlist *sg;
-
-	/* This table tells us:
-	   X = command not supported
-	   L = return length in cmnd[4] (8 bits).
-	   M = return length in cmnd[8] (8 bits).
-	   G = return length in cmnd[3] and cmnd[4] (16 bits)
-	   H = return length in cmnd[7] and cmnd[8] (16 bits)
-	   I = return length in cmnd[8] and cmnd[9] (16 bits)
-	   C = return length in cmnd[2] to cmnd[5] (32 bits)
-	   D = return length in cmnd[6] to cmnd[9] (32 bits)
-	   B = return length in blocksize so we use buff_len
-	   R = return length in cmnd[2] to cmnd[4] (24 bits)
-	   S = return length in cmnd[3] to cmnd[5] (24 bits)
-	   T = return length in cmnd[6] to cmnd[8] (24 bits)
-	   U = return length in cmnd[7] to cmnd[9] (24 bits)
-	   0-9 = fixed return length
-	   V = 20 bytes
-	   W = 24 bytes
-	   Z = return length is mode dependant or not in command, use buff_len
-	*/
-
-	static char *lengths =
-
-	      /* 0123456789ABCDEF   0123456789ABCDEF */
-
-		"00XLZ6XZBXBBXXXB" "00LBBLG0R0L0GG0X"  /* 00-1F */
-		"XXXXT8XXB4B0BBBB" "ZZZ0B00HCSSZTBHH"  /* 20-3F */
-		"M0HHB0X000H0HH0X" "XHH0HHXX0TH0H0XX"  /* 40-5F */
-		"XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX"  /* 60-7F */
-		"XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX"  /* 80-9F */
-		"X0XXX00XB0BXBXBB" "ZZZ0XUIDU000XHBX"  /* A0-BF */
-		"XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX"  /* C0-DF */
-		"XDXXXXXXXXXXXXXX" "XXW00HXXXXXXXXXX"; /* E0-FF */
-
-	/* Commands checked in table:
-
-	   CHANGE_DEFINITION 40
-	   COMPARE 39
-	   COPY 18
-	   COPY_AND_VERIFY 3a
-	   ERASE 19
-	   ERASE_10 2c
-	   ERASE_12 ac
-	   EXCHANGE_MEDIUM a6
-	   FORMAT_UNIT 04
-	   GET_DATA_BUFFER_STATUS 34
-	   GET_MESSAGE_10 28
-	   GET_MESSAGE_12 a8
-	   GET_WINDOW 25   !!! Has more data than READ_CAPACITY, need to fix table
-	   INITIALIZE_ELEMENT_STATUS 07 !!! REASSIGN_BLOCKS luckily uses buff_len
-	   INQUIRY 12
-	   LOAD_UNLOAD 1b
-	   LOCATE 2b
-	   LOCK_UNLOCK_CACHE 36
-	   LOG_SELECT 4c
-	   LOG_SENSE 4d
-	   MEDIUM_SCAN 38     !!! This was M
-	   MODE_SELECT6 15
-	   MODE_SELECT_10 55
-	   MODE_SENSE_6 1a
-	   MODE_SENSE_10 5a
-	   MOVE_MEDIUM a5
-	   OBJECT_POSITION 31  !!! Same as SEARCH_DATA_EQUAL
-	   PAUSE_RESUME 4b
-	   PLAY_AUDIO_10 45
-	   PLAY_AUDIO_12 a5
-	   PLAY_AUDIO_MSF 47
-	   PLAY_AUDIO_TRACK_INDEX 48
-   	   PLAY_AUDIO_TRACK_RELATIVE_10 49
-	   PLAY_AUDIO_TRACK_RELATIVE_12 a9
-	   POSITION_TO_ELEMENT 2b
-      	   PRE-FETCH 34
-	   PREVENT_ALLOW_MEDIUM_REMOVAL 1e
-	   PRINT 0a             !!! Same as WRITE_6 but is always in bytes
-	   READ_6 08
-	   READ_10 28
-	   READ_12 a8
-	   READ_BLOCK_LIMITS 05
-	   READ_BUFFER 3c
-	   READ_CAPACITY 25
-	   READ_CDROM_CAPACITY 25
-	   READ_DEFECT_DATA 37
-	   READ_DEFECT_DATA_12 b7
-	   READ_ELEMENT_STATUS b8 !!! Think this is in bytes
-	   READ_GENERATION 29 !!! Could also be M?
-	   READ_HEADER 44     !!! This was L
-	   READ_LONG 3e
-	   READ_POSITION 34   !!! This should be V but conflicts with PRE-FETCH
-	   READ_REVERSE 0f
-	   READ_SUB-CHANNEL 42 !!! Is this in bytes?
-	   READ_TOC 43         !!! Is this in bytes?
-	   READ_UPDATED_BLOCK 2d
-	   REASSIGN_BLOCKS 07
-	   RECEIVE 08        !!! Same as READ_6 probably in bytes though
-	   RECEIVE_DIAGNOSTIC_RESULTS 1c
-	   RECOVER_BUFFERED_DATA 14 !!! For PRINTERs this is bytes
-	   RELEASE_UNIT 17
-	   REQUEST_SENSE 03
-	   REQUEST_VOLUME_ELEMENT_ADDRESS b5 !!! Think this is in bytes
-	   RESERVE_UNIT 16
-	   REWIND 01
-	   REZERO_UNIT 01
-	   SCAN 1b          !!! Conflicts with various commands, should be L
-	   SEARCH_DATA_EQUAL 31
-	   SEARCH_DATA_EQUAL_12 b1
-	   SEARCH_DATA_LOW 30
-	   SEARCH_DATA_LOW_12 b0
-	   SEARCH_DATA_HIGH 32
-	   SEARCH_DATA_HIGH_12 b2
-	   SEEK_6 0b         !!! Conflicts with SLEW_AND_PRINT
-	   SEEK_10 2b
-	   SEND 0a           !!! Same as WRITE_6, probably in bytes though
-	   SEND 2a           !!! Similar to WRITE_10 but for scanners
-	   SEND_DIAGNOSTIC 1d
-	   SEND_MESSAGE_6 0a   !!! Same as WRITE_6 - is in bytes
-	   SEND_MESSAGE_10 2a  !!! Same as WRITE_10 - is in bytes
-	   SEND_MESSAGE_12 aa  !!! Same as WRITE_12 - is in bytes
-	   SEND_OPC 54
-	   SEND_VOLUME_TAG b6 !!! Think this is in bytes
-	   SET_LIMITS 33
-	   SET_LIMITS_12 b3
-	   SET_WINDOW 24
-	   SLEW_AND_PRINT 0b !!! Conflicts with SEEK_6
-	   SPACE 11
-	   START_STOP_UNIT 1b
-	   STOP_PRINT 1b
-	   SYNCHRONIZE_BUFFER 10
-	   SYNCHRONIZE_CACHE 35
-	   TEST_UNIT_READY 00
-	   UPDATE_BLOCK 3d
-	   VERIFY 13
-	   VERIFY 2f
-	   VERIFY_12 af
-	   WRITE_6 0a
-	   WRITE_10 2a
-	   WRITE_12 aa
-	   WRITE_AND_VERIFY 2e
-	   WRITE_AND_VERIFY_12 ae
-	   WRITE_BUFFER 3b
-	   WRITE_FILEMARKS 10
-	   WRITE_LONG 3f
-	   WRITE_SAME 41
-	*/
-
-	if (srb->sc_data_direction == SCSI_DATA_WRITE) {
-		doDefault = 1;
-	}
-	else
-		switch (lengths[srb->cmnd[0]]) {
-			case 'L':
-				len = srb->cmnd[4];
-				break;
-
-			case 'M':
-				len = srb->cmnd[8];
-				break;
-
-			case '0':
-			case '1':
-			case '2':
-			case '3':
-			case '4':
-			case '5':
-			case '6':
-			case '7':
-			case '8':
-			case '9':
-				len = lengths[srb->cmnd[0]]-'0';
-				break;
-
-			case 'G':
-				len = (((unsigned int)srb->cmnd[3])<<8) |
-					srb->cmnd[4];
-				break;
-
-			case 'H':
-				len = (((unsigned int)srb->cmnd[7])<<8) |
-					srb->cmnd[8];
-				break;
-
-			case 'I':
-				len = (((unsigned int)srb->cmnd[8])<<8) |
-					srb->cmnd[9];
-				break;
-
-			case 'R':
-				len = (((unsigned int)srb->cmnd[2])<<16) |
-					(((unsigned int)srb->cmnd[3])<<8) |
-					srb->cmnd[4];
-				break;
-
-			case 'S':
-				len = (((unsigned int)srb->cmnd[3])<<16) |
-					(((unsigned int)srb->cmnd[4])<<8) |
-					srb->cmnd[5];
-				break;
-
-			case 'T':
-				len = (((unsigned int)srb->cmnd[6])<<16) |
-					(((unsigned int)srb->cmnd[7])<<8) |
-					srb->cmnd[8];
-				break;
-
-			case 'U':
-				len = (((unsigned int)srb->cmnd[7])<<16) |
-					(((unsigned int)srb->cmnd[8])<<8) |
-					srb->cmnd[9];
-				break;
-
-			case 'C':
-				len = (((unsigned int)srb->cmnd[2])<<24) |
-					(((unsigned int)srb->cmnd[3])<<16) |
-					(((unsigned int)srb->cmnd[4])<<8) |
-					srb->cmnd[5];
-				break;
-
-			case 'D':
-				len = (((unsigned int)srb->cmnd[6])<<24) |
-					(((unsigned int)srb->cmnd[7])<<16) |
-					(((unsigned int)srb->cmnd[8])<<8) |
-					srb->cmnd[9];
-				break;
-
-			case 'V':
-				len = 20;
-				break;
-
-			case 'W':
-				len = 24;
-				break;
-
-			case 'B':
-				/* Use buffer size due to different block sizes */
-				doDefault = 1;
-				break;
-
-			case 'X':
-				US_DEBUGP("Error: UNSUPPORTED COMMAND %02X\n",
-						srb->cmnd[0]);
-				doDefault = 1;
-				break;
-
-			case 'Z':
-				/* Use buffer size due to mode dependence */
-				doDefault = 1;
-				break;
-
-			default:
-				US_DEBUGP("Error: COMMAND %02X out of range or table inconsistent (%c).\n",
-						srb->cmnd[0], lengths[srb->cmnd[0]] );
-				doDefault = 1;
-		}
-	   
-	   if ( doDefault == 1 ) {
-		   /* Are we going to scatter gather? */
-		   if (srb->use_sg) {
-			   /* Add up the sizes of all the sg segments */
-			   sg = (struct scatterlist *) srb->request_buffer;
-			   for (i = 0; i < srb->use_sg; i++)
-				   total += sg[i].length;
-			   len = total;
-
-			   /* Double-check to see if the advertised buffer
-			    * length less than the actual buffer length --
-			    * in other words, we should tend towards the
-			    * conservative side for data transfers.
-			    */
-			   if (len > srb->request_bufflen)
-				   len = srb->request_bufflen;
-		   }
-		   else
-			   /* Just return the length of the buffer */
-			   len = srb->request_bufflen;
-	   }
-
-	/* According to the linux-scsi people, any command sent which
-	 * violates this invariant is a bug.  In the hopes of removing
-	 * all the complex logic above, let's find them and eliminate them.
-	 */
-	if (len != srb->request_bufflen) {
-		printk(KERN_ERR "USB len=%d, request_bufflen=%d\n", len, srb->request_bufflen);
-		dump_stack();
-	}
-
-	return len;
-}
-
-/***********************************************************************
  * Data transfer routines
  ***********************************************************************/
 
@@ -1031,7 +730,7 @@
 
 int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
 {
-	unsigned int transfer_length = usb_stor_transfer_length(srb);
+	unsigned int transfer_length = srb->request_bufflen;
 	int result;
 
 	/* COMMAND STAGE */
@@ -1115,7 +814,7 @@
  */
 int usb_stor_CB_transport(Scsi_Cmnd *srb, struct us_data *us)
 {
-	unsigned int transfer_length = usb_stor_transfer_length(srb);
+	unsigned int transfer_length = srb->request_bufflen;
 	int result;
 
 	/* COMMAND STAGE */
@@ -1186,7 +885,7 @@
 {
 	struct bulk_cb_wrap bcb;
 	struct bulk_cs_wrap bcs;
-	unsigned int transfer_length = usb_stor_transfer_length(srb);
+	unsigned int transfer_length = srb->request_bufflen;
 	int result;
 
 	/* set up the command wrapper */
diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
--- a/drivers/usb/storage/transport.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/storage/transport.h	Fri Jan 10 12:12:38 2003
@@ -154,7 +154,6 @@
 extern int usb_stor_Bulk_max_lun(struct us_data*);
 extern int usb_stor_Bulk_reset(struct us_data*);
 
-extern unsigned int usb_stor_transfer_length(Scsi_Cmnd*);
 extern void usb_stor_invoke_transport(Scsi_Cmnd*, struct us_data*);
 extern void usb_stor_abort_transport(struct us_data*);
 
diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h	Fri Jan 10 12:12:38 2003
+++ b/drivers/usb/storage/unusual_devs.h	Fri Jan 10 12:12:38 2003
@@ -97,6 +97,22 @@
 		"DVD-CAM DZ-MV100A Camcorder",
 		US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN),
 
+/* Reported by Khalid Aziz <khalid@gonehiking.org>
+ * This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV(  0x04b8, 0x0602, 0x0110, 0x0110,
+		"Epson",
+		"785EPX Storage",
+		US_SC_SCSI, US_PR_BULK, NULL, US_FL_SINGLE_LUN),
+
+/* Reported by Jan Willamowius <jan@willamowius.de>
+ * The device needs the flags only.
+ */
+UNUSUAL_DEV(  0x04c8, 0x0723, 0x0000, 0x9999,
+		"Konica",
+		"KD-200Z",
+		US_SC_SCSI, US_PR_BULK, NULL,
+		US_FL_START_STOP),
+
 UNUSUAL_DEV(  0x04cb, 0x0100, 0x0000, 0x2210,
 		"Fujifilm",
 		"FinePix 1400Zoom",
@@ -547,6 +563,12 @@
 		US_SC_SCSI, US_PR_BULK, NULL,
 		US_FL_FIX_INQUIRY ),
 
+UNUSUAL_DEV(  0x0a16, 0x8888, 0x0100, 0x0100,
+		"IBM",
+		"IBM USB Memory Key",
+		US_SC_SCSI, US_PR_BULK, NULL,
+		US_FL_FIX_INQUIRY ),
+		
 #ifdef CONFIG_USB_STORAGE_ISD200
 UNUSUAL_DEV(  0x0bf6, 0xa001, 0x0100, 0x0110,
 		"ATI",
diff -Nru a/fs/exec.c b/fs/exec.c
--- a/fs/exec.c	Fri Jan 10 12:12:38 2003
+++ b/fs/exec.c	Fri Jan 10 12:12:38 2003
@@ -497,6 +497,7 @@
 
 static int exec_mmap(struct mm_struct *mm)
 {
+	struct task_struct *tsk;
 	struct mm_struct * old_mm, *active_mm;
 
 	/* Add it to the list of mm's */
@@ -505,14 +506,17 @@
 	mmlist_nr++;
 	spin_unlock(&mmlist_lock);
 
-	task_lock(current);
+	/* Notify parent that we're no longer interested in the old VM */
+	tsk = current;
 	old_mm = current->mm;
-	active_mm = current->active_mm;
-	current->mm = mm;
-	current->active_mm = mm;
+	mm_release(tsk, old_mm);
+
+	task_lock(tsk);
+	active_mm = tsk->active_mm;
+	tsk->mm = mm;
+	tsk->active_mm = mm;
 	activate_mm(active_mm, mm);
-	task_unlock(current);
-	mm_release();
+	task_unlock(tsk);
 	if (old_mm) {
 		if (active_mm != old_mm) BUG();
 		mmput(old_mm);
diff -Nru a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
--- a/include/asm-alpha/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-alpha/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -209,6 +209,8 @@
 	tbiap();
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 #ifdef CONFIG_ALPHA_GENERIC
 # define switch_mm(a,b,c,d)	alpha_mv.mv_switch_mm((a),(b),(c),(d))
 # define activate_mm(x,y)	alpha_mv.mv_activate_mm((x),(y))
diff -Nru a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
--- a/include/asm-arm/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-arm/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -47,6 +47,8 @@
 	}
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
 {
 	cpu_switch_mm(next->pgd, next);
diff -Nru a/include/asm-cris/mmu_context.h b/include/asm-cris/mmu_context.h
--- a/include/asm-cris/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-cris/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -7,6 +7,8 @@
 extern void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 		      struct task_struct *tsk, int cpu);
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 #define activate_mm(prev,next) switch_mm((prev),(next),NULL,smp_processor_id())
 
 /* current active pgd - this is similar to other processors pgd 
diff -Nru a/include/asm-i386/mmu_context.h b/include/asm-i386/mmu_context.h
--- a/include/asm-i386/mmu_context.h	Fri Jan 10 12:12:37 2003
+++ b/include/asm-i386/mmu_context.h	Fri Jan 10 12:12:37 2003
@@ -62,6 +62,9 @@
 #endif
 }
 
+#define deactivate_mm(tsk, mm) \
+	asm("movl %0,%%fs ; movl %0,%%gs": :"r" (0))
+
 #define activate_mm(prev, next) \
 	switch_mm((prev),(next),NULL,smp_processor_id())
 
diff -Nru a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h
--- a/include/asm-ia64/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-ia64/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -143,6 +143,8 @@
 	} while (unlikely(context != mm->context));
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /*
  * Switch from address space PREV to address space NEXT.
  */
diff -Nru a/include/asm-m68k/mmu_context.h b/include/asm-m68k/mmu_context.h
--- a/include/asm-m68k/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-m68k/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -89,6 +89,8 @@
 	}
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 extern inline void activate_mm(struct mm_struct *prev_mm,
 			       struct mm_struct *next_mm)
 {
diff -Nru a/include/asm-m68knommu/mmu_context.h b/include/asm-m68knommu/mmu_context.h
--- a/include/asm-m68knommu/mmu_context.h	Fri Jan 10 12:12:37 2003
+++ b/include/asm-m68knommu/mmu_context.h	Fri Jan 10 12:12:37 2003
@@ -23,6 +23,8 @@
 {
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 extern inline void activate_mm(struct mm_struct *prev_mm,
 			       struct mm_struct *next_mm)
 {
diff -Nru a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h
--- a/include/asm-mips/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-mips/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -98,6 +98,8 @@
 	/* Nothing to do.  */
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /*
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
diff -Nru a/include/asm-mips64/mmu_context.h b/include/asm-mips64/mmu_context.h
--- a/include/asm-mips64/mmu_context.h	Fri Jan 10 12:12:37 2003
+++ b/include/asm-mips64/mmu_context.h	Fri Jan 10 12:12:37 2003
@@ -111,6 +111,8 @@
 #endif
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /*
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
diff -Nru a/include/asm-parisc/mmu_context.h b/include/asm-parisc/mmu_context.h
--- a/include/asm-parisc/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-parisc/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -52,6 +52,8 @@
 	}
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
 {
 	/*
diff -Nru a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
--- a/include/asm-ppc/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-ppc/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -160,6 +160,8 @@
 	set_context(next->context, next->pgd);
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /*
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
diff -Nru a/include/asm-ppc64/mmu_context.h b/include/asm-ppc64/mmu_context.h
--- a/include/asm-ppc64/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-ppc64/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -146,6 +146,8 @@
 	set_bit(cpu, &next->cpu_vm_mask);
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /*
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
diff -Nru a/include/asm-s390/mmu_context.h b/include/asm-s390/mmu_context.h
--- a/include/asm-s390/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-s390/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -37,6 +37,8 @@
 	set_bit(cpu, &next->cpu_vm_mask);
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 extern inline void activate_mm(struct mm_struct *prev,
                                struct mm_struct *next)
 {
diff -Nru a/include/asm-s390x/mmu_context.h b/include/asm-s390x/mmu_context.h
--- a/include/asm-s390x/mmu_context.h	Fri Jan 10 12:12:37 2003
+++ b/include/asm-s390x/mmu_context.h	Fri Jan 10 12:12:37 2003
@@ -36,6 +36,8 @@
 	set_bit(cpu, &next->cpu_vm_mask);
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 extern inline void activate_mm(struct mm_struct *prev,
                                struct mm_struct *next)
 {
diff -Nru a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h
--- a/include/asm-sh/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-sh/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -178,6 +178,8 @@
 	}
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 #define activate_mm(prev, next) \
 	switch_mm((prev),(next),NULL,smp_processor_id())
 
diff -Nru a/include/asm-sparc/mmu_context.h b/include/asm-sparc/mmu_context.h
--- a/include/asm-sparc/mmu_context.h	Fri Jan 10 12:12:37 2003
+++ b/include/asm-sparc/mmu_context.h	Fri Jan 10 12:12:37 2003
@@ -30,6 +30,8 @@
 
 #define switch_mm(old_mm, mm, tsk, cpu) BTFIXUP_CALL(switch_mm)(old_mm, mm, tsk, cpu)
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /* Activate a new MM instance for the current task. */
 #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL, smp_processor_id())
 
diff -Nru a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
--- a/include/asm-sparc/uaccess.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-sparc/uaccess.h	Fri Jan 10 12:12:38 2003
@@ -78,7 +78,7 @@
 };
 
 /* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long, unsigned long *);
+extern unsigned long search_extables_range(unsigned long addr, unsigned long *g2);
 
 extern void __ret_efault(void);
 
diff -Nru a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
--- a/include/asm-sparc64/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-sparc64/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -143,6 +143,8 @@
 
 extern void __flush_tlb_mm(unsigned long, unsigned long);
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 /* Activate a new MM instance for the current task. */
 static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm)
 {
diff -Nru a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
--- a/include/asm-um/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-um/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -12,6 +12,8 @@
 #define get_mmu_context(task) do ; while(0)
 #define activate_context(tsk) do ; while(0)
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
 {
 }
diff -Nru a/include/asm-v850/mmu_context.h b/include/asm-v850/mmu_context.h
--- a/include/asm-v850/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-v850/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -4,6 +4,7 @@
 #define destroy_context(mm)		((void)0)
 #define init_new_context(tsk,mm)	0
 #define switch_mm(prev,next,tsk,cpu)	((void)0)
+#define deactivate_mm(tsk,mm)		do { } while (0)
 #define activate_mm(prev,next)		((void)0)
 #define enter_lazy_tlb(mm,tsk,cpu)	((void)0)
 
diff -Nru a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h
--- a/include/asm-x86_64/mmu_context.h	Fri Jan 10 12:12:38 2003
+++ b/include/asm-x86_64/mmu_context.h	Fri Jan 10 12:12:38 2003
@@ -62,6 +62,8 @@
 #endif
 }
 
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
 #define activate_mm(prev, next) \
 	switch_mm((prev),(next),NULL,smp_processor_id())
 
diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h
--- a/include/linux/acpi.h	Fri Jan 10 12:12:37 2003
+++ b/include/linux/acpi.h	Fri Jan 10 12:12:37 2003
@@ -73,20 +73,6 @@
 	u8			reserved[3];
 } __attribute__ ((packed));
 
-/* Common table header */
-
-struct acpi_table_header {
-	char			signature[4];
-	u32			length;
-	u8			revision;
-	u8			checksum;
-	char			oem_id[6];
-	char			oem_table_id[8];
-	u32			oem_revision;
-	char			asl_compiler_id[4];
-	u32			asl_compiler_revision;
-} __attribute__ ((packed));
-
 typedef struct {
 	u8			type;
 	u8			length;
@@ -325,12 +311,12 @@
 /* Embedded Controller Boot Resources Table (ECDT) */
 
 struct acpi_table_ecdt {
-	struct acpi_table_header header;
-	acpi_generic_address	ec_control;
-	acpi_generic_address	ec_data;
-	u32			uid;
-	u8			gpe_bit;
-	char			ec_id[0];
+	struct acpi_table_header 	header;
+	struct acpi_generic_address	ec_control;
+	struct acpi_generic_address	ec_data;
+	u32				uid;
+	u8				gpe_bit;
+	char				ec_id[0];
 } __attribute__ ((packed));
 
 /* Table Handlers */
@@ -396,7 +382,7 @@
 
 struct acpi_prt_entry {
 	struct list_head	node;
-	acpi_pci_id		id;
+	struct acpi_pci_id	id;
 	u8			pin;
 	struct {
 		acpi_handle		handle;
diff -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h	Fri Jan 10 12:12:38 2003
+++ b/include/linux/device.h	Fri Jan 10 12:12:38 2003
@@ -400,21 +400,21 @@
 extern void firmware_unregister(struct subsystem *);
 
 /* debugging and troubleshooting/diagnostic helpers. */
-#define dev_printk(sev, dev, format, arg...)	\
-	printk(sev "%s %s: " format , (dev).driver->name , (dev).bus_id , ## arg)
+#define dev_printk(level, dev, format, arg...)	\
+	printk(level "%s %s: " format , (dev)->driver->name , (dev)->bus_id , ## arg)
 
 #ifdef DEBUG
 #define dev_dbg(dev, format, arg...)		\
-	dev_printk(KERN_DEBUG , (dev) , format , ## arg)
+	dev_printk(KERN_DEBUG , dev , format , ## arg)
 #else
 #define dev_dbg(dev, format, arg...) do {} while (0)
 #endif
 
 #define dev_err(dev, format, arg...)		\
-	dev_printk(KERN_ERR , (dev) , format , ## arg)
+	dev_printk(KERN_ERR , dev , format , ## arg)
 #define dev_info(dev, format, arg...)		\
-	dev_printk(KERN_INFO , (dev) , format , ## arg)
+	dev_printk(KERN_INFO , dev , format , ## arg)
 #define dev_warn(dev, format, arg...)		\
-	dev_printk(KERN_WARNING , (dev) , format , ## arg)
+	dev_printk(KERN_WARNING , dev , format , ## arg)
 
 #endif /* _DEVICE_H_ */
diff -Nru a/include/linux/netfilter_ipv4/ip_nat_helper.h b/include/linux/netfilter_ipv4/ip_nat_helper.h
--- a/include/linux/netfilter_ipv4/ip_nat_helper.h	Fri Jan 10 12:12:38 2003
+++ b/include/linux/netfilter_ipv4/ip_nat_helper.h	Fri Jan 10 12:12:38 2003
@@ -50,6 +50,13 @@
 				unsigned int match_len,
 				char *rep_buffer,
 				unsigned int rep_len);
+extern int ip_nat_mangle_udp_packet(struct sk_buff **skb,
+				struct ip_conntrack *ct,
+				enum ip_conntrack_info ctinfo,
+				unsigned int match_offset,
+				unsigned int match_len,
+				char *rep_buffer,
+				unsigned int rep_len);
 extern int ip_nat_seq_adjust(struct sk_buff *skb,
 				struct ip_conntrack *ct,
 				enum ip_conntrack_info ctinfo);
diff -Nru a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
--- a/include/linux/pfkeyv2.h	Fri Jan 10 12:12:38 2003
+++ b/include/linux/pfkeyv2.h	Fri Jan 10 12:12:38 2003
@@ -242,17 +242,25 @@
 #define SADB_SATYPE_MAX		9
 
 /* Authentication algorithms */
-#define SADB_AALG_NONE		0
-#define SADB_AALG_MD5HMAC	2
-#define SADB_AALG_SHA1HMAC	3
-#define SADB_AALG_MAX		3
+#define SADB_AALG_NONE			0
+#define SADB_AALG_MD5HMAC		2
+#define SADB_AALG_SHA1HMAC		3
+#define SADB_X_AALG_SHA2_256HMAC	5
+#define SADB_X_AALG_SHA2_384HMAC	6
+#define SADB_X_AALG_SHA2_512HMAC	7
+#define SADB_X_AALG_RIPEMD160HMAC	8
+#define SADB_X_AALG_NULL		251	/* kame */
+#define SADB_AALG_MAX			251
 
 /* Encryption algorithms */
-#define SADB_EALG_NONE		0
-#define SADB_EALG_DESCBC	1
-#define SADB_EALG_3DESCBC	2
-#define SADB_EALG_NULL		11
-#define SADB_EALG_MAX		11
+#define SADB_EALG_NONE			0
+#define SADB_EALG_DESCBC		1
+#define SADB_EALG_3DESCBC		2
+#define SADB_X_EALG_CASTCBC		6
+#define SADB_X_EALG_BLOWFISHCBC		7
+#define SADB_EALG_NULL			11
+#define SADB_X_EALG_AESCBC		12
+#define SADB_EALG_MAX			12
 
 /* Extension Header values */
 #define SADB_EXT_RESERVED		0
diff -Nru a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h	Fri Jan 10 12:12:37 2003
+++ b/include/linux/sched.h	Fri Jan 10 12:12:37 2003
@@ -566,7 +566,7 @@
 /* mmput gets rid of the mappings and all user-space */
 extern void mmput(struct mm_struct *);
 /* Remove the current tasks stale references to the old mm_struct */
-extern void mm_release(void);
+extern void mm_release(struct task_struct *, struct mm_struct *);
 
 extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
 extern void flush_thread(void);
diff -Nru a/include/linux/serial_core.h b/include/linux/serial_core.h
--- a/include/linux/serial_core.h	Fri Jan 10 12:12:38 2003
+++ b/include/linux/serial_core.h	Fri Jan 10 12:12:38 2003
@@ -86,8 +86,8 @@
 	void		(*break_ctl)(struct uart_port *, int ctl);
 	int		(*startup)(struct uart_port *);
 	void		(*shutdown)(struct uart_port *);
-	void		(*change_speed)(struct uart_port *, unsigned int cflag,
-				        unsigned int iflag, unsigned int quot);
+	void		(*set_termios)(struct uart_port *, struct termios *new,
+				       struct termios *old);
 	void		(*pm)(struct uart_port *, unsigned int state,
 			      unsigned int oldstate);
 	int		(*set_wake)(struct uart_port *, unsigned int state);
@@ -179,7 +179,7 @@
 #define UPF_RESOURCES		(1 << 30)
 #define UPF_IOREMAP		(1 << 31)
 
-#define UPF_FLAGS		(0x7fff)
+#define UPF_CHANGE_MASK		(0x7fff)
 #define UPF_USR_MASK		(UPF_SPD_MASK|UPF_LOW_LATENCY)
 
 	unsigned int		mctrl;			/* current modem ctrl settings */
@@ -242,7 +242,6 @@
 	unsigned char		*tmpbuf;
 	struct semaphore	tmpbuf_sem;
 
-	unsigned long		event;
 	int			blocked_open;
 
 	struct tasklet_struct	tlet;
@@ -275,12 +274,31 @@
 };
 
 void uart_write_wakeup(struct uart_port *port);
+
+/*
+ * Baud rate helpers.
+ */
+void uart_update_timeout(struct uart_port *port, unsigned int cflag,
+			 unsigned int quot);
+unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios,
+				struct termios *old, unsigned int min,
+				unsigned int max);
+unsigned int uart_get_divisor(struct uart_port *port, struct termios *termios,
+			      struct termios *old_termios);
+
+/*
+ * Console helpers.
+ */
 struct uart_port *uart_get_console(struct uart_port *ports, int nr,
 				   struct console *c);
 void uart_parse_options(char *options, int *baud, int *parity, int *bits,
 			int *flow);
 int uart_set_options(struct uart_port *port, struct console *co, int baud,
 		     int parity, int bits, int flow);
+
+/*
+ * Port/driver registration/removal
+ */
 int uart_register_driver(struct uart_driver *uart);
 void uart_unregister_driver(struct uart_driver *uart);
 void uart_unregister_port(struct uart_driver *reg, int line);
diff -Nru a/include/linux/watchdog.h b/include/linux/watchdog.h
--- a/include/linux/watchdog.h	Fri Jan 10 12:12:38 2003
+++ b/include/linux/watchdog.h	Fri Jan 10 12:12:38 2003
@@ -39,6 +39,7 @@
 #define	WDIOF_CARDRESET		0x0020	/* Card previously reset the CPU */
 #define WDIOF_POWEROVER		0x0040	/* Power over voltage */
 #define WDIOF_SETTIMEOUT	0x0080  /* Set timeout (in seconds) */
+#define WDIOF_MAGICCLOSE	0x0100	/* Supports magic close char */
 #define	WDIOF_KEEPALIVEPING	0x8000	/* Keep alive ping reply */
 
 #define	WDIOS_DISABLECARD	0x0001	/* Turn off the watchdog timer */
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h	Fri Jan 10 12:12:38 2003
+++ b/include/net/tcp.h	Fri Jan 10 12:12:38 2003
@@ -637,8 +637,7 @@
 #define TCP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(tcp_statistics, field)
 #define TCP_DEC_STATS(field)		SNMP_DEC_STATS(tcp_statistics, field)
 
-extern void			tcp_put_port(struct sock *sk);
-extern void			__tcp_put_port(struct sock *sk);
+extern __inline__ void		tcp_put_port(struct sock *sk);
 extern void			tcp_inherit_port(struct sock *sk, struct sock *child);
 
 extern void			tcp_v4_err(struct sk_buff *skb, u32);
diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
--- a/include/net/xfrm.h	Fri Jan 10 12:12:38 2003
+++ b/include/net/xfrm.h	Fri Jan 10 12:12:38 2003
@@ -1,13 +1,19 @@
+#ifndef _NET_XFRM_H
+#define _NET_XFRM_H
+
 #include <linux/xfrm.h>
 #include <linux/spinlock.h>
 #include <linux/list.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/crypto.h>
+#include <linux/pfkeyv2.h>
 
 #include <net/dst.h>
 #include <net/route.h>
 
+#define XFRM_ALIGN8(len)	(((len) + 7) & ~7)
+
 extern struct semaphore xfrm_cfg_sem;
 
 /* Organization of SPD aka "XFRM rules"
@@ -347,6 +353,29 @@
 	}
 }
 
+/*
+ * xfrm algorithm information
+ */
+struct xfrm_algo_auth_info {
+	u16 icv_truncbits;
+	u16 icv_fullbits;
+};
+
+struct xfrm_algo_encr_info {
+	u16 blockbits;
+	u16 defkeybits;
+};
+
+struct xfrm_algo_desc {
+	char *name;
+	u8 available:1;
+	union {
+		struct xfrm_algo_auth_info auth;
+		struct xfrm_algo_encr_info encr;
+	} uinfo;
+	struct sadb_alg desc;
+};
+
 extern void xfrm_state_init(void);
 extern void xfrm_input_init(void);
 extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *);
@@ -385,3 +414,15 @@
 extern void km_warn_expired(struct xfrm_state *x);
 extern void km_expired(struct xfrm_state *x);
 extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *pol);
+
+extern void xfrm_probe_algs(void);
+extern int xfrm_count_auth_supported(void);
+extern int xfrm_count_enc_supported(void);
+extern struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx);
+extern struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx);
+extern struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id);
+extern struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id);
+extern struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name);
+extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name);
+
+#endif	/* _NET_XFRM_H */
diff -Nru a/kernel/exit.c b/kernel/exit.c
--- a/kernel/exit.c	Fri Jan 10 12:12:38 2003
+++ b/kernel/exit.c	Fri Jan 10 12:12:38 2003
@@ -419,7 +419,7 @@
 {
 	struct mm_struct *mm = tsk->mm;
 
-	mm_release();
+	mm_release(tsk, mm);
 	if (!mm)
 		return;
 	/*
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c	Fri Jan 10 12:12:37 2003
+++ b/kernel/fork.c	Fri Jan 10 12:12:37 2003
@@ -399,17 +399,19 @@
  * restoring the old one. . .
  * Eric Biederman 10 January 1998
  */
-void mm_release(void)
+void mm_release(struct task_struct *tsk, struct mm_struct *mm)
 {
-	struct task_struct *tsk = current;
 	struct completion *vfork_done = tsk->vfork_done;
 
+	/* Get rid of any cached register state */
+	deactivate_mm(tsk, mm);
+
 	/* notify parent sleeping on vfork() */
 	if (vfork_done) {
 		tsk->vfork_done = NULL;
 		complete(vfork_done);
 	}
-	if (tsk->clear_child_tid) {
+	if (tsk->clear_child_tid && atomic_read(&mm->mm_users) > 1) {
 		int * tidptr = tsk->clear_child_tid;
 		tsk->clear_child_tid = NULL;
 
diff -Nru a/kernel/kallsyms.c b/kernel/kallsyms.c
--- a/kernel/kallsyms.c	Fri Jan 10 12:12:38 2003
+++ b/kernel/kallsyms.c	Fri Jan 10 12:12:38 2003
@@ -46,7 +46,7 @@
 		}
 
 		/* Grab name */
-		for (i = 0; i < best; i++) { 
+		for (i = 0; i <= best; i++) { 
 			unsigned prefix = *name++;
 			strncpy(namebuf + prefix, name, 127 - prefix);
 			name += strlen(name) + 1;
diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c	Fri Jan 10 12:12:38 2003
+++ b/kernel/sched.c	Fri Jan 10 12:12:38 2003
@@ -2108,7 +2108,7 @@
 		spin_unlock_irqrestore(&rq->lock, flags);
 
 		p = req->task;
-		cpu_dest = __ffs(p->cpus_allowed);
+		cpu_dest = __ffs(p->cpus_allowed & cpu_online_map);
 		rq_dest = cpu_rq(cpu_dest);
 repeat:
 		cpu_src = task_cpu(p);
diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c
--- a/net/core/skbuff.c	Fri Jan 10 12:12:38 2003
+++ b/net/core/skbuff.c	Fri Jan 10 12:12:38 2003
@@ -225,8 +225,8 @@
 /*
  *	Slab constructor for a skb head.
  */
-static inline void skb_headerinit(void *p, kmem_cache_t *cache,
-				  unsigned long flags)
+static void skb_headerinit(void *p, kmem_cache_t *cache,
+			   unsigned long flags)
 {
 	struct sk_buff *skb = p;
 
diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile
--- a/net/ipv4/Makefile	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/Makefile	Fri Jan 10 12:12:38 2003
@@ -22,4 +22,4 @@
 obj-$(CONFIG_NETFILTER)	+= netfilter/
 obj-$(CONFIG_XFRM_USER) += xfrm_user.o
 
-obj-y += xfrm_policy.o xfrm_state.o xfrm_input.o
+obj-y += xfrm_policy.o xfrm_state.o xfrm_input.o xfrm_algo.o
diff -Nru a/net/ipv4/ah.c b/net/ipv4/ah.c
--- a/net/ipv4/ah.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/ah.c	Fri Jan 10 12:12:38 2003
@@ -7,26 +7,31 @@
 #include <net/icmp.h>
 #include <asm/scatterlist.h>
 
+#define AH_HLEN_NOICV	12
+
+typedef void (icv_update_fn_t)(struct crypto_tfm *,
+                               struct scatterlist *, unsigned int);
+
 struct ah_data
 {
 	u8			*key;
 	int			key_len;
-	u8			*work_digest;
-	int			digest_len;
+	u8			*work_icv;
+	int			icv_full_len;
+	int			icv_trunc_len;
 
-	void			(*digest)(struct ah_data*,
-					  struct sk_buff *skb,
-					  u8 *digest);
+	void			(*icv)(struct ah_data*,
+	                               struct sk_buff *skb, u8 *icv);
 
 	struct crypto_tfm	*tfm;
 };
 
 
 /* Clear mutable options and find final destination to substitute
- * into IP header for digest calculation. Options are already checked
+ * into IP header for icv calculation. Options are already checked
  * for validity, so paranoia is not required. */
 
-int ip_clear_mutable_options(struct iphdr *iph, u32 *daddr)
+static int ip_clear_mutable_options(struct iphdr *iph, u32 *daddr)
 {
 	unsigned char * optptr = (unsigned char*)(iph+1);
 	int  l = iph->ihl*4 - 20;
@@ -66,7 +71,8 @@
 	return 0;
 }
 
-void skb_ah_walk(const struct sk_buff *skb, struct crypto_tfm *tfm)
+static void skb_ah_walk(const struct sk_buff *skb,
+                        struct crypto_tfm *tfm, icv_update_fn_t icv_update)
 {
 	int offset = 0;
 	int len = skb->len;
@@ -83,7 +89,7 @@
 		sg.offset = (unsigned long)(skb->data + offset) % PAGE_SIZE;
 		sg.length = copy;
 		
-		crypto_hmac_update(tfm, &sg, 1);
+		icv_update(tfm, &sg, 1);
 		
 		if ((len -= copy) == 0)
 			return;
@@ -106,7 +112,7 @@
 			sg.offset = frag->page_offset + offset-start;
 			sg.length = copy;
 			
-			crypto_hmac_update(tfm, &sg, 1);
+			icv_update(tfm, &sg, 1);
 			
 			if (!(len -= copy))
 				return;
@@ -127,7 +133,7 @@
 			if ((copy = end - offset) > 0) {
 				if (copy > len)
 					copy = len;
-				skb_ah_walk(list, tfm);
+				skb_ah_walk(list, tfm, icv_update);
 				if ((len -= copy) == 0)
 					return;
 				offset += copy;
@@ -144,14 +150,14 @@
 {
 	struct crypto_tfm *tfm = ahp->tfm;
 
-	memset(auth_data, 0, ahp->digest_len);
+	memset(auth_data, 0, ahp->icv_trunc_len);
  	crypto_hmac_init(tfm, ahp->key, &ahp->key_len);
-  	skb_ah_walk(skb, tfm);
-	crypto_hmac_final(tfm, ahp->key, &ahp->key_len, ahp->work_digest);
-	memcpy(auth_data, ahp->work_digest, ahp->digest_len);
+  	skb_ah_walk(skb, tfm, crypto_hmac_update);
+	crypto_hmac_final(tfm, ahp->key, &ahp->key_len, ahp->work_icv);
+	memcpy(auth_data, ahp->work_icv, ahp->icv_trunc_len);
 }
 
-int ah_output(struct sk_buff *skb)
+static int ah_output(struct sk_buff *skb)
 {
 	int err;
 	struct dst_entry *dst = skb->dst;
@@ -210,11 +216,13 @@
 		ah->nexthdr = iph->protocol;
 	}
 	ahp = x->data;
-	ah->hdrlen  = (((ahp->digest_len + 12 + 7)&~7)>>2)-2;
+	ah->hdrlen  = (XFRM_ALIGN8(ahp->icv_trunc_len +
+			AH_HLEN_NOICV) >> 2) - 2;
+
 	ah->reserved = 0;
 	ah->spi = x->id.spi;
 	ah->seq_no = htonl(++x->replay.oseq);
-	ahp->digest(ahp, skb, ah->auth_data);
+	ahp->icv(ahp, skb, ah->auth_data);
 	top_iph->tos = iph->tos;
 	top_iph->ttl = iph->ttl;
 	if (x->props.mode) {
@@ -246,6 +254,7 @@
 
 int ah_input(struct xfrm_state *x, struct sk_buff *skb)
 {
+	int ah_hlen;
 	struct iphdr *iph;
 	struct ip_auth_hdr *ah;
 	struct ah_data *ahp;
@@ -255,13 +264,14 @@
 		goto out;
 
 	ah = (struct ip_auth_hdr*)skb->data;
-
 	ahp = x->data;
-
-	if (((ah->hdrlen+2)<<2) != ((ahp->digest_len + 12 + 7)&~7))
+	ah_hlen = (ah->hdrlen + 2) << 2;
+	
+	if (ah_hlen != XFRM_ALIGN8(ahp->icv_full_len + AH_HLEN_NOICV) &&
+	    ah_hlen != XFRM_ALIGN8(ahp->icv_trunc_len + AH_HLEN_NOICV)) 
 		goto out;
 
-	if (!pskb_may_pull(skb, (ah->hdrlen+2)<<2))
+	if (!pskb_may_pull(skb, ah_hlen))
 		goto out;
 
 	/* We are going to _remove_ AH header to keep sockets happy,
@@ -285,17 +295,18 @@
 			goto out;
 	}
         {
-		u8 auth_data[ahp->digest_len];
-		memcpy(auth_data, ah->auth_data, ahp->digest_len);
+		u8 auth_data[ahp->icv_trunc_len];
+		
+		memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
 		skb_push(skb, skb->data - skb->nh.raw);
-		ahp->digest(ahp, skb, ah->auth_data);
-		if (memcmp(ah->auth_data, auth_data, ahp->digest_len)) {
+		ahp->icv(ahp, skb, ah->auth_data);
+		if (memcmp(ah->auth_data, auth_data, ahp->icv_trunc_len)) {
 			x->stats.integrity_failed++;
 			goto out;
 		}
 	}
 	((struct iphdr*)work_buf)->protocol = ah->nexthdr;
-	skb->nh.raw = skb_pull(skb, (ah->hdrlen+2)<<2);
+	skb->nh.raw = skb_pull(skb, ah_hlen);
 	memcpy(skb->nh.raw, work_buf, iph->ihl*4);
 	skb->nh.iph->tot_len = htons(skb->len);
 	skb_pull(skb, skb->nh.iph->ihl*4);
@@ -325,12 +336,13 @@
 	xfrm_state_put(x);
 }
 
-int ah_init_state(struct xfrm_state *x, void *args)
+static int ah_init_state(struct xfrm_state *x, void *args)
 {
 	struct ah_data *ahp = NULL;
+	struct xfrm_algo_desc *aalg_desc;
 
-	if (x->aalg == NULL || x->aalg->alg_key_len == 0 ||
-	    x->aalg->alg_key_len > 512)
+	/* null auth can use a zero length key */
+	if (x->aalg->alg_key_len > 512)
 		goto error;
 
 	ahp = kmalloc(sizeof(*ahp), GFP_KERNEL);
@@ -344,13 +356,33 @@
 	ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0);
 	if (!ahp->tfm)
 		goto error;
-	ahp->digest = ah_hmac_digest;
-	ahp->digest_len = 12;
-	ahp->work_digest = kmalloc(crypto_tfm_alg_digestsize(ahp->tfm),
-				   GFP_KERNEL);
-	if (!ahp->work_digest)
+	ahp->icv = ah_hmac_digest;
+	
+	/*
+	 * Lookup the algorithm description maintained by pfkey,
+	 * verify crypto transform properties, and store information
+	 * we need for AH processing.  This lookup cannot fail here
+	 * after a successful crypto_alloc_tfm().
+	 */
+	aalg_desc = xfrm_aalg_get_byname(x->aalg->alg_name);
+	BUG_ON(!aalg_desc);
+
+	if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
+	    crypto_tfm_alg_digestsize(ahp->tfm)) {
+		printk(KERN_INFO "AH: %s digestsize %u != %hu\n",
+		       x->aalg->alg_name, crypto_tfm_alg_digestsize(ahp->tfm),
+		       aalg_desc->uinfo.auth.icv_fullbits/8);
+		goto error;
+	}
+	
+	ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
+	ahp->icv_trunc_len = aalg_desc->uinfo.auth.icv_truncbits/8;
+	
+	ahp->work_icv = kmalloc(ahp->icv_full_len, GFP_KERNEL);
+	if (!ahp->work_icv)
 		goto error;
-	x->props.header_len = (12 + ahp->digest_len + 7)&~7;
+	
+	x->props.header_len = XFRM_ALIGN8(ahp->icv_trunc_len + AH_HLEN_NOICV);
 	if (x->props.mode)
 		x->props.header_len += 20;
 	x->data = ahp;
@@ -359,8 +391,8 @@
 
 error:
 	if (ahp) {
-		if (ahp->work_digest)
-			kfree(ahp->work_digest);
+		if (ahp->work_icv)
+			kfree(ahp->work_icv);
 		if (ahp->tfm)
 			crypto_free_tfm(ahp->tfm);
 		kfree(ahp);
@@ -368,13 +400,13 @@
 	return -EINVAL;
 }
 
-void ah_destroy(struct xfrm_state *x)
+static void ah_destroy(struct xfrm_state *x)
 {
 	struct ah_data *ahp = x->data;
 
-	if (ahp->work_digest) {
-		kfree(ahp->work_digest);
-		ahp->work_digest = NULL;
+	if (ahp->work_icv) {
+		kfree(ahp->work_icv);
+		ahp->work_icv = NULL;
 	}
 	if (ahp->tfm) {
 		crypto_free_tfm(ahp->tfm);
@@ -399,7 +431,7 @@
 	.no_policy	=	1,
 };
 
-int __init ah4_init(void)
+static int __init ah4_init(void)
 {
 	SET_MODULE_OWNER(&ah_type);
 	if (xfrm_register_type(&ah_type) < 0) {
diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
--- a/net/ipv4/fib_hash.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/fib_hash.c	Fri Jan 10 12:12:38 2003
@@ -137,12 +137,12 @@
 	return fz->fz_hash[fn_hash(key, fz).datum];
 }
 
-extern __inline__ int fn_key_eq(fn_key_t a, fn_key_t b)
+static __inline__ int fn_key_eq(fn_key_t a, fn_key_t b)
 {
 	return a.datum == b.datum;
 }
 
-extern __inline__ int fn_key_leq(fn_key_t a, fn_key_t b)
+static __inline__ int fn_key_leq(fn_key_t a, fn_key_t b)
 {
 	return a.datum <= b.datum;
 }
@@ -703,7 +703,7 @@
 	return -ESRCH;
 }
 
-extern __inline__ int
+static __inline__ int
 fn_flush_list(struct fib_node ** fp, int z, struct fn_hash *table)
 {
 	int found = 0;
diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
--- a/net/ipv4/ip_fragment.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/ip_fragment.c	Fri Jan 10 12:12:38 2003
@@ -185,7 +185,7 @@
 /* Kill ipq entry. It is not destroyed immediately,
  * because caller (and someone more) holds reference count.
  */
-static __inline__ void ipq_kill(struct ipq *ipq)
+static void ipq_kill(struct ipq *ipq)
 {
 	if (del_timer(&ipq->timer))
 		atomic_dec(&ipq->refcnt);
diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
--- a/net/ipv4/ip_output.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/ip_output.c	Fri Jan 10 12:12:38 2003
@@ -198,7 +198,7 @@
 	return -EINVAL;
 }
 
-__inline__ int ip_finish_output(struct sk_buff *skb)
+int ip_finish_output(struct sk_buff *skb)
 {
 	struct net_device *dev = skb->dst->dev;
 
@@ -685,7 +685,7 @@
 	return 0;
 }
 
-static inline void
+static void
 skb_fill_page_desc(struct sk_buff *skb, int i, struct page *page, int off, int size)
 {
 	skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c	Fri Jan 10 12:12:37 2003
+++ b/net/ipv4/netfilter/ip_conntrack_core.c	Fri Jan 10 12:12:37 2003
@@ -967,23 +967,28 @@
 		   related_to->expecting >= related_to->helper->max_expected) {
 		struct list_head *cur_item;
 		/* old == NULL */
-	    	if (net_ratelimit())
-		    	printk(KERN_WARNING 
-		    	       "ip_conntrack: max number of expected "
-			       "connections %i of %s reached for "
-			       "%u.%u.%u.%u->%u.%u.%u.%u%s\n",
-		    	       related_to->helper->max_expected, 
-		    	       related_to->helper->name,
-		    	       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
-		    	       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip),
-		    	       related_to->helper->flags & IP_CT_HELPER_F_REUSE_EXPECT ?
-		    	       ", reusing" : "");
 		if (!(related_to->helper->flags & 
 		      IP_CT_HELPER_F_REUSE_EXPECT)) {
 			WRITE_UNLOCK(&ip_conntrack_lock);
+ 		    	if (net_ratelimit())
+ 			    	printk(KERN_WARNING
+				       "ip_conntrack: max number of expected "
+				       "connections %i of %s reached for "
+				       "%u.%u.%u.%u->%u.%u.%u.%u\n",
+				       related_to->helper->max_expected,
+				       related_to->helper->name,
+ 		    	       	       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
+ 		    	       	       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
 			return -EPERM;
 		}
-
+		DEBUGP("ip_conntrack: max number of expected "
+		       "connections %i of %s reached for "
+		       "%u.%u.%u.%u->%u.%u.%u.%u, reusing\n",
+ 		       related_to->helper->max_expected,
+		       related_to->helper->name,
+		       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
+		       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
+ 
 		/* choose the the oldest expectation to evict */
 		list_for_each(cur_item, &related_to->sibling_list) { 
 			struct ip_conntrack_expect *cur;
diff -Nru a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c	Fri Jan 10 12:12:38 2003
@@ -200,9 +200,9 @@
 
 		DEBUGP("ftp: string mismatch\n");
 		for (i = 0; i < plen; i++) {
-			DEBUGFTP("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
-				 i, data[i], data[i],
-				 pattern[i], pattern[i]);
+			DEBUGP("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
+				i, data[i], data[i],
+				pattern[i], pattern[i]);
 		}
 #endif
 		return 0;
diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	Fri Jan 10 12:12:38 2003
@@ -186,13 +186,13 @@
 	    && tcph->syn && tcph->ack)
 		conntrack->proto.tcp.handshake_ack
 			= htonl(ntohl(tcph->seq) + 1);
-	WRITE_UNLOCK(&tcp_lock);
 
 	/* If only reply is a RST, we can consider ourselves not to
 	   have an established connection: this is a fairly common
 	   problem case, so we can delete the conntrack
 	   immediately.  --RR */
 	if (!(conntrack->status & IPS_SEEN_REPLY) && tcph->rst) {
+		WRITE_UNLOCK(&tcp_lock);
 		if (del_timer(&conntrack->timeout))
 			conntrack->timeout.function((unsigned long)conntrack);
 	} else {
@@ -203,6 +203,7 @@
 		    && tcph->ack_seq == conntrack->proto.tcp.handshake_ack)
 			set_bit(IPS_ASSURED_BIT, &conntrack->status);
 
+		WRITE_UNLOCK(&tcp_lock);
 		ip_ct_refresh(conntrack, tcp_timeouts[newconntrack]);
 	}
 
diff -Nru a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c
--- a/net/ipv4/netfilter/ip_nat_helper.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ip_nat_helper.c	Fri Jan 10 12:12:38 2003
@@ -8,6 +8,9 @@
  *		- add support for SACK adjustment 
  *	14 Mar 2002 Harald Welte <laforge@gnumonks.org>:
  *		- merge SACK support into newnat API
+ *	16 Aug 2002 Brian J. Murrell <netfilter@interlinx.bc.ca>:
+ *		- make ip_nat_resize_packet more generic (TCP and UDP)
+ *		- add ip_nat_mangle_udp_packet
  */
 #include <linux/version.h>
 #include <linux/config.h>
@@ -22,6 +25,7 @@
 #include <net/icmp.h>
 #include <net/ip.h>
 #include <net/tcp.h>
+#include <net/udp.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_nat_lock)
 #define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_nat_lock)
@@ -51,18 +55,12 @@
 		     int new_size)
 {
 	struct iphdr *iph;
-	struct tcphdr *tcph;
-	void *data;
 	int dir;
 	struct ip_nat_seq *this_way, *other_way;
 
 	DEBUGP("ip_nat_resize_packet: old_size = %u, new_size = %u\n",
 		(*skb)->len, new_size);
 
-	iph = (*skb)->nh.iph;
-	tcph = (void *)iph + iph->ihl*4;
-	data = (void *)tcph + tcph->doff*4;
-
 	dir = CTINFO2DIR(ctinfo);
 
 	this_way = &ct->nat.info.seq[dir];
@@ -84,37 +82,41 @@
 	}
 
 	iph = (*skb)->nh.iph;
-	tcph = (void *)iph + iph->ihl*4;
-	data = (void *)tcph + tcph->doff*4;
-
-	DEBUGP("ip_nat_resize_packet: Seq_offset before: ");
-	DUMP_OFFSET(this_way);
+	if (iph->protocol == IPPROTO_TCP) {
+		struct tcphdr *tcph = (void *)iph + iph->ihl*4;
+		void *data = (void *)tcph + tcph->doff*4;
+
+		DEBUGP("ip_nat_resize_packet: Seq_offset before: ");
+		DUMP_OFFSET(this_way);
+
+		LOCK_BH(&ip_nat_seqofs_lock);
+
+		/* SYN adjust. If it's uninitialized, of this is after last 
+		 * correction, record it: we don't handle more than one 
+		 * adjustment in the window, but do deal with common case of a 
+		 * retransmit */
+		if (this_way->offset_before == this_way->offset_after
+		    || before(this_way->correction_pos, ntohl(tcph->seq))) {
+			this_way->correction_pos = ntohl(tcph->seq);
+			this_way->offset_before = this_way->offset_after;
+			this_way->offset_after = (int32_t)
+				this_way->offset_before + new_size -
+				(*skb)->len;
+		}
 
-	LOCK_BH(&ip_nat_seqofs_lock);
+		UNLOCK_BH(&ip_nat_seqofs_lock);
 
-	/* SYN adjust. If it's uninitialized, of this is after last 
-	 * correction, record it: we don't handle more than one 
-	 * adjustment in the window, but do deal with common case of a 
-	 * retransmit */
-	if (this_way->offset_before == this_way->offset_after
-	    || before(this_way->correction_pos, ntohl(tcph->seq))) {
-		this_way->correction_pos = ntohl(tcph->seq);
-		this_way->offset_before = this_way->offset_after;
-		this_way->offset_after = (int32_t)
-			this_way->offset_before + new_size - (*skb)->len;
+		DEBUGP("ip_nat_resize_packet: Seq_offset after: ");
+		DUMP_OFFSET(this_way);
 	}
-
-	UNLOCK_BH(&ip_nat_seqofs_lock);
-
-	DEBUGP("ip_nat_resize_packet: Seq_offset after: ");
-	DUMP_OFFSET(this_way);
 	
 	return 1;
 }
 
 
 /* Generic function for mangling variable-length address changes inside
- * NATed connections (like the PORT XXX,XXX,XXX,XXX,XXX,XXX command in FTP).
+ * NATed TCP connections (like the PORT XXX,XXX,XXX,XXX,XXX,XXX
+ * command in FTP).
  *
  * Takes care about all the nasty sequence number changes, checksumming,
  * skb enlargement, ...
@@ -174,10 +176,11 @@
 	tcph = (void *)iph + iph->ihl*4;
 	data = (void *)tcph + tcph->doff*4;
 
-	/* move post-replacement */
-	memmove(data + match_offset + rep_len,
-		 data + match_offset + match_len,
-		 (*skb)->tail - (data + match_offset + match_len));
+	if (rep_len != match_len)
+		/* move post-replacement */
+		memmove(data + match_offset + rep_len,
+			data + match_offset + match_len,
+			(*skb)->tail - (data + match_offset + match_len));
 
 	/* insert data from buffer */
 	memcpy(data + match_offset, rep_buffer, rep_len);
@@ -203,6 +206,114 @@
 	tcph->check = tcp_v4_check(tcph, newtcplen, iph->saddr, iph->daddr,
 				   csum_partial((char *)tcph, tcph->doff*4,
 					   (*skb)->csum));
+	ip_send_check(iph);
+
+	return 1;
+}
+			
+/* Generic function for mangling variable-length address changes inside
+ * NATed UDP connections (like the CONNECT DATA XXXXX MESG XXXXX INDEX XXXXX
+ * command in the Amanda protocol)
+ *
+ * Takes care about all the nasty sequence number changes, checksumming,
+ * skb enlargement, ...
+ *
+ * XXX - This function could be merged with ip_nat_mangle_tcp_packet which
+ *       should be fairly easy to do.
+ */
+int 
+ip_nat_mangle_udp_packet(struct sk_buff **skb,
+			 struct ip_conntrack *ct,
+			 enum ip_conntrack_info ctinfo,
+			 unsigned int match_offset,
+			 unsigned int match_len,
+			 char *rep_buffer,
+			 unsigned int rep_len)
+{
+	struct iphdr *iph = (*skb)->nh.iph;
+	struct udphdr *udph = (void *)iph + iph->ihl * 4;
+	unsigned char *data;
+	u_int32_t udplen, newlen, newudplen;
+
+	udplen = (*skb)->len - iph->ihl*4;
+	newudplen = udplen - match_len + rep_len;
+	newlen = iph->ihl*4 + newudplen;
+
+	if (newlen > 65535) {
+		if (net_ratelimit())
+			printk("ip_nat_mangle_udp_packet: nat'ed packet "
+				"exceeds maximum packet size\n");
+		return 0;
+	}
+
+	if ((*skb)->len != newlen) {
+		if (!ip_nat_resize_packet(skb, ct, ctinfo, newlen)) {
+			printk("resize_packet failed!!\n");
+			return 0;
+		}
+	}
+
+	/* Alexey says: if a hook changes _data_ ... it can break
+	   original packet sitting in tcp queue and this is fatal */
+	if (skb_cloned(*skb)) {
+		struct sk_buff *nskb = skb_copy(*skb, GFP_ATOMIC);
+		if (!nskb) {
+			if (net_ratelimit())
+				printk("Out of memory cloning TCP packet\n");
+			return 0;
+		}
+		/* Rest of kernel will get very unhappy if we pass it
+		   a suddenly-orphaned skbuff */
+		if ((*skb)->sk)
+			skb_set_owner_w(nskb, (*skb)->sk);
+		kfree_skb(*skb);
+		*skb = nskb;
+	}
+
+	/* skb may be copied !! */
+	iph = (*skb)->nh.iph;
+	udph = (void *)iph + iph->ihl*4;
+	data = (void *)udph + sizeof(struct udphdr);
+
+	if (rep_len != match_len)
+		/* move post-replacement */
+		memmove(data + match_offset + rep_len,
+			data + match_offset + match_len,
+			(*skb)->tail - (data + match_offset + match_len));
+
+	/* insert data from buffer */
+	memcpy(data + match_offset, rep_buffer, rep_len);
+
+	/* update skb info */
+	if (newlen > (*skb)->len) {
+		DEBUGP("ip_nat_mangle_udp_packet: Extending packet by "
+			"%u to %u bytes\n", newlen - (*skb)->len, newlen);
+		skb_put(*skb, newlen - (*skb)->len);
+	} else {
+		DEBUGP("ip_nat_mangle_udp_packet: Shrinking packet from "
+			"%u to %u bytes\n", (*skb)->len, newlen);
+		skb_trim(*skb, newlen);
+	}
+
+	/* update the length of the UDP and IP packets to the new values*/
+	udph->len = htons((*skb)->len - iph->ihl*4);
+	iph->tot_len = htons(newlen);
+
+	/* fix udp checksum if udp checksum was previously calculated */
+	if ((*skb)->csum != 0) {
+		(*skb)->csum = csum_partial((char *)udph +
+					    sizeof(struct udphdr),
+					    newudplen - sizeof(struct udphdr),
+					    0);
+
+		udph->check = 0;
+		udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr,
+						newudplen, IPPROTO_UDP,
+						csum_partial((char *)udph,
+							 sizeof(struct udphdr),
+							(*skb)->csum));
+	}
+
 	ip_send_check(iph);
 
 	return 1;
diff -Nru a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
--- a/net/ipv4/netfilter/ip_nat_standalone.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ip_nat_standalone.c	Fri Jan 10 12:12:38 2003
@@ -359,5 +359,6 @@
 EXPORT_SYMBOL(ip_nat_helper_unregister);
 EXPORT_SYMBOL(ip_nat_cheat_check);
 EXPORT_SYMBOL(ip_nat_mangle_tcp_packet);
+EXPORT_SYMBOL(ip_nat_mangle_udp_packet);
 EXPORT_SYMBOL(ip_nat_used_tuple);
 MODULE_LICENSE("GPL");
diff -Nru a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
--- a/net/ipv4/netfilter/ipt_ECN.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ipt_ECN.c	Fri Jan 10 12:12:38 2003
@@ -88,8 +88,8 @@
 	}
 	
 	if (diffs[0] != *tcpflags) {
-		diffs[0] = htons(diffs[0]) ^ 0xFFFF;
-		diffs[1] = htons(*tcpflags);
+		diffs[0] = diffs[0] ^ 0xFFFF;
+		diffs[1] = *tcpflags;
 		tcph->check = csum_fold(csum_partial((char *)diffs,
 		                                    sizeof(diffs),
 		                                    tcph->check^0xFFFF));
diff -Nru a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
--- a/net/ipv4/netfilter/ipt_REJECT.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ipt_REJECT.c	Fri Jan 10 12:12:38 2003
@@ -6,6 +6,8 @@
 #include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/ip.h>
+#include <linux/udp.h>
+#include <linux/icmp.h>
 #include <net/icmp.h>
 #include <net/ip.h>
 #include <net/tcp.h>
@@ -164,6 +166,7 @@
 static void send_unreach(struct sk_buff *skb_in, int code)
 {
 	struct iphdr *iph;
+	struct udphdr *udph;
 	struct icmphdr *icmph;
 	struct sk_buff *nskb;
 	u32 saddr;
@@ -193,6 +196,19 @@
 	if (iph->frag_off&htons(IP_OFFSET))
 		return;
 
+	/* if UDP checksum is set, verify it's correct */
+	if (iph->protocol == IPPROTO_UDP
+	    && skb_in->tail-(u8*)iph >= sizeof(struct udphdr)) {
+		int datalen = skb_in->len - (iph->ihl<<2);
+		udph = (struct udphdr *)((char *)iph + (iph->ihl<<2));
+		if (udph->check
+		    && csum_tcpudp_magic(iph->saddr, iph->daddr,
+		                         datalen, IPPROTO_UDP,
+		                         csum_partial((char *)udph, datalen,
+		                                      0)) != 0)
+			return;
+	}
+		    
 	/* If we send an ICMP error to an ICMP error a mess would result.. */
 	if (iph->protocol == IPPROTO_ICMP
 	    && skb_in->tail-(u8*)iph >= sizeof(struct icmphdr)) {
diff -Nru a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
--- a/net/ipv4/netfilter/ipt_ULOG.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ipt_ULOG.c	Fri Jan 10 12:12:38 2003
@@ -12,6 +12,7 @@
  * 	      module loadtime -HW
  * 2002/07/07 remove broken nflog_rcv() function -HW
  * 2002/08/29 fix shifted/unshifted nlgroup bug -HW
+ * 2002/10/30 fix uninitialized mac_len field - <Anders K. Pedersen>
  *
  * Released under the terms of the GPL
  *
@@ -31,7 +32,7 @@
  *   Specify, after how many clock ticks (intel: 100 per second) the queue
  * should be flushed even if it is not full yet.
  *
- * ipt_ULOG.c,v 1.21 2002/08/29 10:54:34 laforge Exp
+ * ipt_ULOG.c,v 1.22 2002/10/30 09:07:31 laforge Exp
  */
 
 #include <linux/module.h>
@@ -224,7 +225,8 @@
 	    && in->hard_header_len <= ULOG_MAC_LEN) {
 		memcpy(pm->mac, (*pskb)->mac.raw, in->hard_header_len);
 		pm->mac_len = in->hard_header_len;
-	}
+	} else
+		pm->mac_len = 0;
 
 	if (in)
 		strncpy(pm->indev_name, in->name, sizeof(pm->indev_name));
diff -Nru a/net/ipv4/netfilter/ipt_multiport.c b/net/ipv4/netfilter/ipt_multiport.c
--- a/net/ipv4/netfilter/ipt_multiport.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/netfilter/ipt_multiport.c	Fri Jan 10 12:12:38 2003
@@ -78,7 +78,7 @@
 
 	/* Must specify proto == TCP/UDP, no unknown flags or bad count */
 	return (ip->proto == IPPROTO_TCP || ip->proto == IPPROTO_UDP)
-		&& !(ip->flags & IPT_INV_PROTO)
+		&& !(ip->invflags & IPT_INV_PROTO)
 		&& matchsize == IPT_ALIGN(sizeof(struct ipt_multiport))
 		&& (multiinfo->flags == IPT_MULTIPORT_SOURCE
 		    || multiinfo->flags == IPT_MULTIPORT_DESTINATION
diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c
--- a/net/ipv4/route.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/route.c	Fri Jan 10 12:12:38 2003
@@ -201,7 +201,7 @@
 static int rt_intern_hash(unsigned hash, struct rtable *rth,
 				struct rtable **res);
 
-static __inline__ unsigned rt_hash_code(u32 daddr, u32 saddr, u8 tos)
+static unsigned rt_hash_code(u32 daddr, u32 saddr, u8 tos)
 {
 	unsigned hash = ((daddr & 0xF0F0F0F0) >> 4) |
 			((daddr & 0x0F0F0F0F) << 4);
@@ -430,7 +430,7 @@
 		rth->u.dst.expires;
 }
 
-static __inline__ int rt_may_expire(struct rtable *rth, int tmo1, int tmo2)
+static int rt_may_expire(struct rtable *rth, int tmo1, int tmo2)
 {
 	int age;
 	int ret = 0;
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/tcp_input.c	Fri Jan 10 12:12:38 2003
@@ -412,7 +412,7 @@
  * To save cycles in the RFC 1323 implementation it was better to break
  * it up into three procedures. -- erics
  */
-static __inline__ void tcp_rtt_estimator(struct tcp_opt *tp, __u32 mrtt)
+static void tcp_rtt_estimator(struct tcp_opt *tp, __u32 mrtt)
 {
 	long m = mrtt; /* RTT */
 
@@ -2243,14 +2243,14 @@
 	return 1;
 }
 
-extern __inline__ void
+static __inline__ void
 tcp_store_ts_recent(struct tcp_opt *tp)
 {
 	tp->ts_recent = tp->rcv_tsval;
 	tp->ts_recent_stamp = xtime.tv_sec;
 }
 
-extern __inline__ void
+static __inline__ void
 tcp_replace_ts_recent(struct tcp_opt *tp, u32 seq)
 {
 	if (tp->saw_tstamp && !after(seq, tp->rcv_wup)) {
@@ -2309,7 +2309,7 @@
 		(s32)(tp->ts_recent - tp->rcv_tsval) <= (tp->rto*1024)/HZ);
 }
 
-extern __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct sk_buff *skb)
+static __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct sk_buff *skb)
 {
 	return ((s32)(tp->ts_recent - tp->rcv_tsval) > TCP_PAWS_WINDOW &&
 		xtime.tv_sec < tp->ts_recent_stamp + TCP_PAWS_24DAYS &&
@@ -3155,7 +3155,7 @@
 /*
  * Check if sending an ack is needed.
  */
-static __inline__ void __tcp_ack_snd_check(struct sock *sk, int ofo_possible)
+static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
 
@@ -3265,7 +3265,7 @@
 }
 
 /* This is the 'fast' part of urgent handling. */
-static inline void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
+static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
 
diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/tcp_ipv4.c	Fri Jan 10 12:12:38 2003
@@ -286,7 +286,7 @@
 /* Get rid of any references to a local port held by the
  * given sock.
  */
-__inline__ void __tcp_put_port(struct sock *sk)
+static void __tcp_put_port(struct sock *sk)
 {
 	struct inet_opt *inet = inet_sk(sk);
 	struct tcp_bind_hashbucket *head = &tcp_bhash[tcp_bhashfn(inet->num)];
@@ -308,7 +308,7 @@
 	spin_unlock(&head->lock);
 }
 
-void tcp_put_port(struct sock *sk)
+__inline__ void tcp_put_port(struct sock *sk)
 {
 	local_bh_disable();
 	__tcp_put_port(sk);
diff -Nru a/net/ipv4/xfrm_algo.c b/net/ipv4/xfrm_algo.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/xfrm_algo.c	Fri Jan 10 12:12:38 2003
@@ -0,0 +1,350 @@
+/* 
+ * xfrm algorithm interface
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
+ * any later version.
+ */
+#include <linux/kernel.h>
+#include <linux/pfkeyv2.h>
+#include <net/xfrm.h>
+
+/*
+ * Algorithms supported by IPsec.  These entries contain properties which
+ * are used in key negotiation and xfrm processing, and are used to verify
+ * that instantiated crypto transforms have correct parameters for IPsec
+ * purposes.
+ */
+static struct xfrm_algo_desc aalg_list[] = {
+{
+	.name = "digest_null",
+	
+	.uinfo = {
+		.auth = {
+			.icv_truncbits = 0,
+			.icv_fullbits = 0,
+		}
+	},
+	
+	.desc = {
+		.sadb_alg_id = SADB_X_AALG_NULL,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 0,
+		.sadb_alg_maxbits = 0
+	}
+},
+{
+	.name = "md5",
+
+	.uinfo = {
+		.auth = {
+			.icv_truncbits = 96,
+			.icv_fullbits = 128,
+		}
+	},
+	
+	.desc = {
+		.sadb_alg_id = SADB_AALG_MD5HMAC,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 128,
+		.sadb_alg_maxbits = 128
+	}
+},
+{
+	.name = "sha1",
+
+	.uinfo = {
+		.auth = {
+			.icv_truncbits = 96,
+			.icv_fullbits = 160,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_AALG_SHA1HMAC,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 160,
+		.sadb_alg_maxbits = 160
+	}
+},
+{
+	.name = "sha256",
+
+	.uinfo = {
+		.auth = {
+			.icv_truncbits = 128,
+			.icv_fullbits = 256,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_X_AALG_SHA2_256HMAC,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 256,
+		.sadb_alg_maxbits = 256
+	}
+},
+{
+	.name = "ripemd160",
+
+	.uinfo = {
+		.auth = {
+			.icv_truncbits = 96,
+			.icv_fullbits = 160,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_X_AALG_RIPEMD160HMAC,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 160,
+		.sadb_alg_maxbits = 160
+	}
+},
+};
+
+static struct xfrm_algo_desc ealg_list[] = {
+{
+	.name = "cipher_null",
+	
+	.uinfo = {
+		.encr = {
+			.blockbits = 8,
+			.defkeybits = 0,
+		}
+	},
+	
+	.desc = {
+		.sadb_alg_id =	SADB_EALG_NULL,
+		.sadb_alg_ivlen = 0,
+		.sadb_alg_minbits = 0,
+		.sadb_alg_maxbits = 0
+	}
+},
+{
+	.name = "des",
+
+	.uinfo = {
+		.encr = {
+			.blockbits = 64,
+			.defkeybits = 64,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_EALG_DESCBC,
+		.sadb_alg_ivlen = 8,
+		.sadb_alg_minbits = 64,
+		.sadb_alg_maxbits = 64
+	}
+},
+{
+	.name = "des3_ede",
+
+	.uinfo = {
+		.encr = {
+			.blockbits = 64,
+			.defkeybits = 192,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_EALG_3DESCBC,
+		.sadb_alg_ivlen = 8,
+		.sadb_alg_minbits = 192,
+		.sadb_alg_maxbits = 192
+	}
+},
+{
+	.name = "cast128",
+
+	.uinfo = {
+		.encr = {
+			.blockbits = 64,
+			.defkeybits = 128,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_X_EALG_CASTCBC,
+		.sadb_alg_ivlen = 8,
+		.sadb_alg_minbits = 40,
+		.sadb_alg_maxbits = 128
+	}
+},
+{
+	.name = "blowfish",
+
+	.uinfo = {
+		.encr = {
+			.blockbits = 64,
+			.defkeybits = 128,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_X_EALG_BLOWFISHCBC,
+		.sadb_alg_ivlen = 8,
+		.sadb_alg_minbits = 40,
+		.sadb_alg_maxbits = 448
+	}
+},
+{
+	.name = "aes",
+
+	.uinfo = {
+		.encr = {
+			.blockbits = 128,
+			.defkeybits = 128,
+		}
+	},
+
+	.desc = {
+		.sadb_alg_id = SADB_X_EALG_AESCBC,
+		.sadb_alg_ivlen = 8,
+		.sadb_alg_minbits = 128,
+		.sadb_alg_maxbits = 256
+	}
+},
+};
+
+static inline int aalg_entries(void)
+{
+	return sizeof(aalg_list) / sizeof(aalg_list[0]);
+}
+
+static inline int ealg_entries(void)
+{
+	return sizeof(ealg_list) / sizeof(ealg_list[0]);
+}
+
+struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id)
+{
+	int i;
+
+	for (i = 0; i < aalg_entries(); i++) {
+		if (aalg_list[i].desc.sadb_alg_id == alg_id) {
+			if (aalg_list[i].available)
+				return &aalg_list[i];
+			else
+				break;
+		}
+	}
+	return NULL;
+}
+
+struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id)
+{
+	int i;
+
+	for (i = 0; i < ealg_entries(); i++) {
+		if (ealg_list[i].desc.sadb_alg_id == alg_id) {
+			if (ealg_list[i].available)
+				return &ealg_list[i];
+			else
+				break;
+		}
+	}
+	return NULL;
+}
+
+struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name)
+{
+	int i;
+
+	if (!name)
+		return NULL;
+
+	for (i=0; i < aalg_entries(); i++) {
+		if (strcmp(name, aalg_list[i].name) == 0) {
+			if (aalg_list[i].available)
+				return &aalg_list[i];
+			else
+				break;
+		}
+	}
+	return NULL;
+}
+
+struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name)
+{
+	int i;
+
+	if (!name)
+		return NULL;
+
+	for (i=0; i < ealg_entries(); i++) {
+		if (strcmp(name, ealg_list[i].name) == 0) {
+			if (ealg_list[i].available)
+				return &ealg_list[i];
+			else
+				break;
+		}
+	}
+	return NULL;
+}
+
+struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx)
+{
+	if (idx >= aalg_entries())
+		return NULL;
+
+	return &aalg_list[idx];
+}
+
+struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx)
+{
+	if (idx >= ealg_entries())
+		return NULL;
+
+	return &ealg_list[idx];
+}
+
+/*
+ * Probe for the availability of crypto algorithms, and set the available
+ * flag for any algorithms found on the system.  This is typically called by
+ * pfkey during userspace SA add, update or register.
+ */
+void xfrm_probe_algs(void)
+{
+#ifdef CONFIG_CRYPTO
+	int i, status;
+	
+	BUG_ON(in_softirq());
+
+	for (i = 0; i < aalg_entries(); i++) {
+		status = crypto_alg_available(aalg_list[i].name, 0);
+		if (aalg_list[i].available != status)
+			aalg_list[i].available = status;
+	}
+	
+	for (i = 0; i < ealg_entries(); i++) {
+		status = crypto_alg_available(ealg_list[i].name, 0);
+		if (ealg_list[i].available != status)
+			ealg_list[i].available = status;
+	}
+#endif
+}
+
+int xfrm_count_auth_supported(void)
+{
+	int i, n;
+
+	for (i = 0, n = 0; i < aalg_entries(); i++)
+		if (aalg_list[i].available)
+			n++;
+	return n;
+}
+
+int xfrm_count_enc_supported(void)
+{
+	int i, n;
+
+	for (i = 0, n = 0; i < ealg_entries(); i++)
+		if (ealg_list[i].available)
+			n++;
+	return n;
+}
diff -Nru a/net/ipv4/xfrm_policy.c b/net/ipv4/xfrm_policy.c
--- a/net/ipv4/xfrm_policy.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv4/xfrm_policy.c	Fri Jan 10 12:12:38 2003
@@ -917,7 +917,7 @@
 	return -1;
 }
 
-static inline void
+static void
 _decode_session(struct sk_buff *skb, struct flowi *fl)
 {
 	struct iphdr *iph = skb->nh.iph;
diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c	Fri Jan 10 12:12:38 2003
+++ b/net/ipv6/af_inet6.c	Fri Jan 10 12:12:38 2003
@@ -684,7 +684,7 @@
 	
 }
 
-static void __exit cleanup_ipv6_mibs(void)
+static void cleanup_ipv6_mibs(void)
 {
 	kfree_percpu(ipv6_statistics[0]);
 	kfree_percpu(ipv6_statistics[1]);
diff -Nru a/net/key/af_key.c b/net/key/af_key.c
--- a/net/key/af_key.c	Fri Jan 10 12:12:38 2003
+++ b/net/key/af_key.c	Fri Jan 10 12:12:38 2003
@@ -553,118 +553,6 @@
 	return x;
 }
 
-/* Table of algos supported by pfkeyv2 interface. */
-
-struct algo_desc {
-	char		*id;
-	struct sadb_alg desc;
-};
-
-struct algo_desc aalg_list[] = {
-{ .id	= NULL,
-	  .desc	= {
-		  .sadb_alg_id =	SADB_AALG_NONE,
-		  .sadb_alg_ivlen = 0,
-		  .sadb_alg_minbits = 0,
-		  .sadb_alg_maxbits = 0
-	  }
-},
-{ .id	= "md5",
-	  .desc	= {
-		  .sadb_alg_id =	SADB_AALG_MD5HMAC,
-		  .sadb_alg_ivlen = 0,
-		  .sadb_alg_minbits = 128,
-		  .sadb_alg_maxbits = 128
-	  }
-},
-{ .id	= "sha1",
-	  .desc	= {
-		  .sadb_alg_id =	SADB_AALG_SHA1HMAC,
-		  .sadb_alg_ivlen = 0,
-		  .sadb_alg_minbits = 160,
-		  .sadb_alg_maxbits = 160
-	  }
-}
-};
-
-struct algo_desc ealg_list[] = {
-{ .id	= NULL,
-	  .desc	= {
-		  .sadb_alg_id =	SADB_EALG_NONE,
-		  .sadb_alg_ivlen = 0,
-		  .sadb_alg_minbits = 0,
-		  .sadb_alg_maxbits = 2048
-	  }
-},
-{ .id	= "des",
-	  .desc	= {
-		  .sadb_alg_id =	SADB_EALG_DESCBC,
-		  .sadb_alg_ivlen = 8,
-		  .sadb_alg_minbits = 64,
-		  .sadb_alg_maxbits = 64
-	  }
-},
-{ .id	= "des3_ede",
-	  .desc	= {
-		  .sadb_alg_id =	SADB_EALG_3DESCBC,
-		  .sadb_alg_ivlen = 8,
-		  .sadb_alg_minbits = 192,
-		  .sadb_alg_maxbits = 192
-	  }
-}
-};
-
-static struct algo_desc *aalg_get_byid(int alg_id)	
-{
-	int i;
-
-	for (i=0; i<sizeof(aalg_list)/sizeof(aalg_list[0]); i++) {
-		if (aalg_list[i].desc.sadb_alg_id == alg_id)
-			return &aalg_list[i];
-	}
-	return NULL;
-}
-
-static struct algo_desc *ealg_get_byid(int alg_id)	
-{
-	int i;
-
-	for (i=0; i<sizeof(ealg_list)/sizeof(ealg_list[0]); i++) {
-		if (ealg_list[i].desc.sadb_alg_id == alg_id)
-			return &ealg_list[i];
-	}
-	return NULL;
-}
-
-static struct algo_desc *aalg_get_byname(char *name)	
-{
-	int i;
-
-	if (!name)
-		return NULL;
-
-	for (i=1; i<sizeof(aalg_list)/sizeof(aalg_list[0]); i++) {
-		if (strcmp(name, aalg_list[i].id) == 0)
-			return &aalg_list[i];
-	}
-	return NULL;
-}
-
-static struct algo_desc *ealg_get_byname(char *name)	
-{
-	int i;
-
-	if (!name)
-		return NULL;
-
-	for (i=1; i<sizeof(ealg_list)/sizeof(ealg_list[0]); i++) {
-		if (strcmp(name, ealg_list[i].id) == 0)
-			return &ealg_list[i];
-	}
-	return NULL;
-}
-
-
 #define PFKEY_ALIGN8(a) (1 + (((a) - 1) | (8 - 1)))
 static struct sk_buff * pfkey_xfrm_state2msg(struct xfrm_state *x, int add_keys, int hsc)
 {
@@ -730,12 +618,12 @@
 		sa->sadb_sa_state = SADB_SASTATE_DEAD;
 	sa->sadb_sa_auth = 0;
 	if (x->aalg) {
-		struct algo_desc *a = aalg_get_byname(x->aalg->alg_name);
+		struct xfrm_algo_desc *a = xfrm_aalg_get_byname(x->aalg->alg_name);
 		sa->sadb_sa_auth = a ? a->desc.sadb_alg_id : 0;
 	}
 	sa->sadb_sa_encrypt = 0;
 	if (x->ealg) {
-		struct algo_desc *a = ealg_get_byname(x->ealg->alg_name);
+		struct xfrm_algo_desc *a = xfrm_ealg_get_byname(x->ealg->alg_name);
 		sa->sadb_sa_encrypt = a ? a->desc.sadb_alg_id : 0;
 	}
 	sa->sadb_sa_flags = 0;
@@ -938,7 +826,7 @@
 	key = (struct sadb_key*) ext_hdrs[SADB_EXT_KEY_AUTH-1];
 	if (sa->sadb_sa_auth) {
 		int keysize = 0;
-		struct algo_desc *a = aalg_get_byid(sa->sadb_sa_auth);
+		struct xfrm_algo_desc *a = xfrm_aalg_get_byid(sa->sadb_sa_auth);
 		if (!a)
 			goto out;
 		if (key)
@@ -946,7 +834,7 @@
 		x->aalg = kmalloc(sizeof(*x->aalg) + keysize, GFP_KERNEL);
 		if (!x->aalg)
 			goto out;
-		strcpy(x->aalg->alg_name, a->id);
+		strcpy(x->aalg->alg_name, a->name);
 		x->aalg->alg_key_len = 0;
 		if (key) {
 			x->aalg->alg_key_len = key->sadb_key_bits;
@@ -958,7 +846,7 @@
 	key = (struct sadb_key*) ext_hdrs[SADB_EXT_KEY_ENCRYPT-1];
 	if (sa->sadb_sa_encrypt) {
 		int keysize = 0;
-		struct algo_desc *a = ealg_get_byid(sa->sadb_sa_encrypt);
+		struct xfrm_algo_desc *a = xfrm_ealg_get_byid(sa->sadb_sa_encrypt);
 		if (!a)
 			goto out;
 		if (key)
@@ -966,7 +854,7 @@
 		x->ealg = kmalloc(sizeof(*x->ealg) + keysize, GFP_KERNEL);
 		if (!x->ealg)
 			goto out;
-		strcpy(x->ealg->alg_name, a->id);
+		strcpy(x->ealg->alg_name, a->name);
 		x->ealg->alg_key_len = 0;
 		if (key) {
 			x->ealg->alg_key_len = key->sadb_key_bits;
@@ -1131,6 +1019,8 @@
 	struct xfrm_state *x;
 	struct xfrm_state *x1;
 
+	xfrm_probe_algs();
+	
 	x = pfkey_msg2xfrm_state(hdr, ext_hdrs);
 	if (IS_ERR(x))
 		return PTR_ERR(x);
@@ -1238,17 +1128,21 @@
 {
 	struct sk_buff *skb;
 	struct sadb_msg *hdr;
-	int len, ah_len, esp_len, i;
+	int len, auth_len, enc_len, i;
 
-	ah_len = sizeof(aalg_list)/sizeof(aalg_list[0]) - 1;
-	ah_len *= sizeof(struct sadb_alg);
-	esp_len = sizeof(ealg_list)/sizeof(ealg_list[0]) - 1;
-	esp_len *= sizeof(struct sadb_alg);
-	if (ah_len)
-		ah_len += sizeof(struct sadb_supported);
-	if (esp_len)
-		esp_len += sizeof(struct sadb_supported);
-	len = esp_len + ah_len + sizeof(struct sadb_msg);
+	auth_len = xfrm_count_auth_supported();
+	if (auth_len) {
+		auth_len *= sizeof(struct sadb_alg);
+		auth_len += sizeof(struct sadb_supported);
+	}
+	
+	enc_len = xfrm_count_enc_supported();
+	if (enc_len) {
+		enc_len *= sizeof(struct sadb_alg);
+		enc_len += sizeof(struct sadb_supported);
+	}
+	
+	len = enc_len + auth_len + sizeof(struct sadb_msg);
 
 	skb = alloc_skb(len + 16, allocation);
 	if (!skb)
@@ -1259,32 +1153,42 @@
 	hdr->sadb_msg_errno = 0;
 	hdr->sadb_msg_len = len / sizeof(uint64_t);
 
-	if (ah_len) {
+	if (auth_len) {
 		struct sadb_supported *sp;
 		struct sadb_alg *ap;
 
-		sp = (struct sadb_supported *) skb_put(skb, ah_len);
+		sp = (struct sadb_supported *) skb_put(skb, auth_len);
 		ap = (struct sadb_alg *) (sp + 1);
 
-		sp->sadb_supported_len = ah_len / sizeof(uint64_t);
+		sp->sadb_supported_len = auth_len / sizeof(uint64_t);
 		sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_AUTH;
 
-		for (i=1; i<sizeof(aalg_list)/sizeof(aalg_list[0]); i++)
-			*ap++ = aalg_list[i].desc;
+		for (i = 0; ; i++) {
+			struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i);
+			if (!aalg)
+				break;
+			if (aalg->available)
+				*ap++ = aalg->desc;
+		}
 	}
 
-	if (esp_len) {
+	if (enc_len) {
 		struct sadb_supported *sp;
 		struct sadb_alg *ap;
 
-		sp = (struct sadb_supported *) skb_put(skb, esp_len);
+		sp = (struct sadb_supported *) skb_put(skb, enc_len);
 		ap = (struct sadb_alg *) (sp + 1);
 
-		sp->sadb_supported_len = esp_len / sizeof(uint64_t);
+		sp->sadb_supported_len = enc_len / sizeof(uint64_t);
 		sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_ENCRYPT;
 
-		for (i=1; i<sizeof(ealg_list)/sizeof(ealg_list[0]); i++)
-			*ap++ = ealg_list[i].desc;
+		for (i = 0; ; i++) {
+			struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);
+			if (!ealg)
+				break;
+			if (ealg->available)
+				*ap++ = ealg->desc;
+		}
 	}
 
 out_put_algs:
@@ -1305,6 +1209,8 @@
 		pfk->registered |= (1<<hdr->sadb_msg_satype);
 	}
 
+	xfrm_probe_algs();
+	
 	supp_skb = compose_sadb_supported(hdr, GFP_KERNEL);
 	if (!supp_skb) {
 		if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)
@@ -1955,35 +1861,55 @@
 	return hdr;
 }
 
-int count_ah_combs(struct xfrm_tmpl *t)
+static inline int aalg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
 {
-	int sz = 0;
-	int i;
+	return t->aalgos & (1 << d->desc.sadb_alg_id);
+}
 
-	for (i=1; i<sizeof(aalg_list)/sizeof(aalg_list[0]); i++) {
-		if (t->aalgos&(1<<aalg_list[i].desc.sadb_alg_id))
+static inline int ealg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
+{
+	return t->ealgos & (1 << d->desc.sadb_alg_id);
+}
+
+static int count_ah_combs(struct xfrm_tmpl *t)
+{
+	int i, sz = 0;
+
+	for (i = 0; ; i++) {
+		struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i);
+		if (!aalg)
+			break;
+		if (aalg_tmpl_set(t, aalg) && aalg->available)
 			sz += sizeof(struct sadb_comb);
 	}
 	return sz + sizeof(struct sadb_prop);
 }
 
-int count_esp_combs(struct xfrm_tmpl *t)
+static int count_esp_combs(struct xfrm_tmpl *t)
 {
-	int sz = 0;
-	int i, k;
+	int i, k, sz = 0;
 
-	for (i=1; i<sizeof(ealg_list)/sizeof(ealg_list[0]); i++) {
-		if (!(t->ealgos&(1<<ealg_list[i].desc.sadb_alg_id)))
+	for (i = 0; ; i++) {
+		struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);
+		if (!ealg)
+			break;
+			
+		if (!(ealg_tmpl_set(t, ealg) && ealg->available))
 			continue;
-		for (k=1; k<sizeof(aalg_list)/sizeof(aalg_list[0]); k++) {
-			if (t->aalgos&(1<<aalg_list[i].desc.sadb_alg_id))
+			
+		for (k = 1; ; k++) {
+			struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(k);
+			if (!aalg)
+				break;
+				
+			if (aalg_tmpl_set(t, aalg) && aalg->available)
 				sz += sizeof(struct sadb_comb);
 		}
 	}
 	return sz + sizeof(struct sadb_prop);
 }
 
-void dump_ah_combs(struct sk_buff *skb, struct xfrm_tmpl *t)
+static void dump_ah_combs(struct sk_buff *skb, struct xfrm_tmpl *t)
 {
 	struct sadb_prop *p;
 	int i;
@@ -1993,15 +1919,19 @@
 	p->sadb_prop_exttype = SADB_EXT_PROPOSAL;
 	p->sadb_prop_replay = 32;
 
-	for (i=1; i<sizeof(aalg_list)/sizeof(aalg_list[0]); i++) {
-		if (t->aalgos&(1<<aalg_list[i].desc.sadb_alg_id)) {
+	for (i = 0; ; i++) {
+		struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i);
+		if (!aalg)
+			break;
+
+		if (aalg_tmpl_set(t, aalg) && aalg->available) {
 			struct sadb_comb *c;
 			c = (struct sadb_comb*)skb_put(skb, sizeof(struct sadb_comb));
 			memset(c, 0, sizeof(*c));
 			p->sadb_prop_len += sizeof(struct sadb_comb)/8;
-			c->sadb_comb_auth = aalg_list[i].desc.sadb_alg_id;
-			c->sadb_comb_auth_minbits = aalg_list[i].desc.sadb_alg_minbits;
-			c->sadb_comb_auth_maxbits = aalg_list[i].desc.sadb_alg_maxbits;
+			c->sadb_comb_auth = aalg->desc.sadb_alg_id;
+			c->sadb_comb_auth_minbits = aalg->desc.sadb_alg_minbits;
+			c->sadb_comb_auth_maxbits = aalg->desc.sadb_alg_maxbits;
 			c->sadb_comb_hard_addtime = 24*60*60;
 			c->sadb_comb_soft_addtime = 20*60*60;
 			c->sadb_comb_hard_usetime = 8*60*60;
@@ -2010,7 +1940,7 @@
 	}
 }
 
-void dump_esp_combs(struct sk_buff *skb, struct xfrm_tmpl *t)
+static void dump_esp_combs(struct sk_buff *skb, struct xfrm_tmpl *t)
 {
 	struct sadb_prop *p;
 	int i, k;
@@ -2020,22 +1950,30 @@
 	p->sadb_prop_exttype = SADB_EXT_PROPOSAL;
 	p->sadb_prop_replay = 32;
 
-	for (i=1; i<sizeof(ealg_list)/sizeof(ealg_list[0]); i++) {
-		if (!(t->ealgos&(1<<ealg_list[i].desc.sadb_alg_id)))
+	for (i=0; ; i++) {
+		struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);
+		if (!ealg)
+			break;
+	
+		if (!(ealg_tmpl_set(t, ealg) && ealg->available))
 			continue;
-		for (k=1; k<sizeof(aalg_list)/sizeof(aalg_list[0]); k++) {
+			
+		for (k = 1; ; k++) {
 			struct sadb_comb *c;
-			if (!(t->aalgos&(1<<aalg_list[i].desc.sadb_alg_id)))
+			struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(k);
+			if (!aalg)
+				break;
+			if (!(aalg_tmpl_set(t, aalg) && aalg->available))
 				continue;
 			c = (struct sadb_comb*)skb_put(skb, sizeof(struct sadb_comb));
 			memset(c, 0, sizeof(*c));
 			p->sadb_prop_len += sizeof(struct sadb_comb)/8;
-			c->sadb_comb_auth = aalg_list[k].desc.sadb_alg_id;
-			c->sadb_comb_auth_minbits = aalg_list[k].desc.sadb_alg_minbits;
-			c->sadb_comb_auth_maxbits = aalg_list[k].desc.sadb_alg_maxbits;
-			c->sadb_comb_encrypt = ealg_list[i].desc.sadb_alg_id;
-			c->sadb_comb_encrypt_minbits = ealg_list[i].desc.sadb_alg_minbits;
-			c->sadb_comb_encrypt_maxbits = ealg_list[i].desc.sadb_alg_maxbits;
+			c->sadb_comb_auth = aalg->desc.sadb_alg_id;
+			c->sadb_comb_auth_minbits = aalg->desc.sadb_alg_minbits;
+			c->sadb_comb_auth_maxbits = aalg->desc.sadb_alg_maxbits;
+			c->sadb_comb_encrypt = ealg->desc.sadb_alg_id;
+			c->sadb_comb_encrypt_minbits = ealg->desc.sadb_alg_minbits;
+			c->sadb_comb_encrypt_maxbits = ealg->desc.sadb_alg_maxbits;
 			c->sadb_comb_hard_addtime = 24*60*60;
 			c->sadb_comb_soft_addtime = 20*60*60;
 			c->sadb_comb_hard_usetime = 8*60*60;
diff -Nru a/net/netsyms.c b/net/netsyms.c
--- a/net/netsyms.c	Fri Jan 10 12:12:38 2003
+++ b/net/netsyms.c	Fri Jan 10 12:12:38 2003
@@ -323,6 +323,15 @@
 EXPORT_SYMBOL(xfrm_policy_byid);
 EXPORT_SYMBOL(xfrm_policy_list);
 
+EXPORT_SYMBOL_GPL(xfrm_probe_algs);
+EXPORT_SYMBOL_GPL(xfrm_count_auth_supported);
+EXPORT_SYMBOL_GPL(xfrm_count_enc_supported);
+EXPORT_SYMBOL_GPL(xfrm_aalg_get_byidx);
+EXPORT_SYMBOL_GPL(xfrm_ealg_get_byidx);
+EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid);
+EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid);
+EXPORT_SYMBOL_GPL(xfrm_aalg_get_byname);
+EXPORT_SYMBOL_GPL(xfrm_ealg_get_byname);
 
 #if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_IP_SCTP_MODULE)
 /* inet functions common to v4 and v6 */
@@ -388,7 +397,6 @@
 EXPORT_SYMBOL(tcp_v4_conn_request);
 EXPORT_SYMBOL(tcp_create_openreq_child);
 EXPORT_SYMBOL(tcp_bucket_create);
-EXPORT_SYMBOL(__tcp_put_port);
 EXPORT_SYMBOL(tcp_put_port);
 EXPORT_SYMBOL(tcp_inherit_port);
 EXPORT_SYMBOL(tcp_v4_syn_recv_sock);
diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c
--- a/net/unix/af_unix.c	Fri Jan 10 12:12:38 2003
+++ b/net/unix/af_unix.c	Fri Jan 10 12:12:38 2003
@@ -153,7 +153,7 @@
 	return (unix_peer(osk) == NULL || unix_our_peer(sk, osk));
 }
 
-static inline unix_socket * unix_peer_get(unix_socket *s)
+static unix_socket *unix_peer_get(unix_socket *s)
 {
 	unix_socket *peer;
 
diff -Nru a/net/unix/garbage.c b/net/unix/garbage.c
--- a/net/unix/garbage.c	Fri Jan 10 12:12:38 2003
+++ b/net/unix/garbage.c	Fri Jan 10 12:12:38 2003
@@ -92,7 +92,7 @@
 atomic_t unix_tot_inflight = ATOMIC_INIT(0);
 
 
-extern inline unix_socket *unix_get_socket(struct file *filp)
+static unix_socket *unix_get_socket(struct file *filp)
 {
 	unix_socket * u_sock = NULL;
 	struct inode *inode = filp->f_dentry->d_inode;
@@ -141,19 +141,19 @@
  *	Garbage Collector Support Functions
  */
 
-extern inline unix_socket *pop_stack(void)
+static inline unix_socket *pop_stack(void)
 {
 	unix_socket *p=gc_current;
 	gc_current = unix_sk(p)->gc_tree;
 	return p;
 }
 
-extern inline int empty_stack(void)
+static inline int empty_stack(void)
 {
 	return gc_current == GC_HEAD;
 }
 
-extern inline void maybe_unmark_and_push(unix_socket *x)
+static void maybe_unmark_and_push(unix_socket *x)
 {
 	struct unix_sock *u = unix_sk(x);
 
