# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.757.13.15 -> 1.757.13.16
#	  drivers/acpi/bus.c	1.1     -> 1.2    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.34
# [PATCH] PATCH: pcmcia core updates from David Hinds
# 
# Plus ricoh performance fixes from Komuro
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.35
# [PATCH] PATCH: backport 2.5 advansys off by one fix
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.36
# [PATCH] -ac IDE merge
# 
# This will show a few initial troubles I'm sure.
# 
# IDE backport from 2.5
# 	Andre Hedrick, Jens Axboe, Mark Lord, me, and a few others
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.37
# [PATCH] PATCH: t128 compile fix if non modular
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.38
# [PATCH] PATCH: core code for new nsp32 driver
# 
# (in 2.5)
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.39
# [PATCH] PATCH: fix ac97 string formatting errors
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.40
# [PATCH] PATCH: fix mad16 bugs
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.41
# [PATCH] PATCH: some laptops need longer delay
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.42
# [PATCH] PATCH: make cdcether work
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.43
# [PATCH] PATCH: latest i810 audio update
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.44
# [PATCH] PATCH: BeOS fs updates
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.45
# [PATCH] PATCH: fix off by one in module loader rename of module
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.46
# [PATCH] PATCH: work around 8253 timer funnies
# 
# --------------------------------------------
# 02/12/05	alan@lxorguk.ukuu.org.uk	1.757.40.47
# [PATCH] PATCH: ensure memcpy_to/from_io don't prefetch
# 
# --------------------------------------------
# 02/12/05	stelian@popies.net	1.757.40.48
# [PATCH] sonypi driver update
# 
# Hi,
# 
# This is a rather large cumulative patch updating the sonypi driver.
# It superceeds the previous patch I send (during the 2.4.20-rc series),
# so please don't apply that one if you have it in your queue.
# 
# The most important changes are:
#         * add suspend/resume support to the sonypi driver (Florian Lohoff);
#         * add "Zoom" and "Thumbphrase" buttons (Francois Gurin);
#         * add camera and lid events for C1XE (Kunihiko IMAI);
#         * add a mask parameter letting the user choose what kind
#           of events he wants;
# 	* add Memory Stick events (Kunihiko IMAI);
#         * several source cleanups.
# 
# Marcelo, please apply.
# 
# Stelian.
# 
# ===== Documentation/sonypi.txt 1.8 vs edited =====
# --------------------------------------------
# 02/12/05	stelian@popies.net	1.757.40.49
# [PATCH] meye driver update
# 
# Hi,
# 
# This patch updates the MotionEye camera driver to the latest version.
# 
# The most important changes are:
#         - allocate buffers on open(), not module load;
#         - correct some failed allocation paths;
#         - use wait_event;
#         - C99 structs inits;
# 
# Marcelo, please apply.
# 
# Stelian.
# 
# 
# ===== Documentation/video4linux/meye.txt 1.4 vs edited =====
# --------------------------------------------
# 02/12/05	ink@jurassic.park.msu.ru	1.757.40.50
# [PATCH] alpha: alcor and sable fixes
# 
# - Fix for CIA rev 1 DMA window limitations (Richard's version)
# 
# >From Jay Estabrook:
# - add MAX_DMA_ADDR for SABLE and ALCOR
# - use ALCOR_MAX_DMA_ADDR because of the 1GB limit on ISA devices
# - prevent opDEC_check() from multiple calls (EV4 SMP SABLEs)
# - fix HAE usage
# - add S/G support and allow direct-map to handle 2GB of memory
# - make t2_pci_tbi() real
# - add T2_DEFAULT_MEM_BASE to help avoid HAE use
# - enable the full CROSS_64KB macro for all platforms
# - rework alignment requirements for ISA DMA, esp. for ACER platforms
# - fix ISA_DMA_MASK calculation, and force ISA alignment to 64KB
# 
# Ivan.
# --------------------------------------------
# 02/12/05	ink@jurassic.park.msu.ru	1.757.40.51
# [PATCH] alpha misc fixes
# 
# >From Jay.
# 
# arc/alpha/kernel/time.c:
# - shorten timeout delay, fix frequency ranges for ev4 and lca4,
#   don't break RTC settings on rawhide
# 
# arch/alpha/kernel/smp.c:
# - fix BogoMIPS bailout, remove obsolete smp_tune_scheduling(), fix totals
# 
# include/asm-alpha/timex.h:
# - remove extraneous extern
# 
# Ivan.
# --------------------------------------------
# 02/12/05	ink@jurassic.park.msu.ru	1.757.40.52
# [PATCH] alpha initrd fix
# 
# Make initrd usable when the memory size is limited with "mem=N" boot option.
# 
# Ivan.
# --------------------------------------------
# 02/12/05	ink@jurassic.park.msu.ru	1.757.40.53
# [PATCH] asm-alpha/regdef.h
# 
# This makes regdef.h part of the kernel source.
# 
# Ivan.
# --------------------------------------------
# 02/12/05	marcelo@freak.distro.conectiva	1.777
# Merge bk://linux-bt.bkbits.net/bt-2.4
# into freak.distro.conectiva:/home/marcelo/bk/linux-2.4
# --------------------------------------------
# 02/12/05	twaugh@redhat.com	1.778
# [PATCH] 2.4.20: fix aladdin card hang
# 
# Hi,
# 
# Here is a patch to fix a hang with Aladdin PCI parallel port cards.
# 
# Tim.
# */
# --------------------------------------------
# 02/12/05	marcelo@freak.distro.conectiva	1.779
# Merge http://jfs.bkbits.net/linux-2.4
# into freak.distro.conectiva:/home/marcelo/bk/linux-2.4
# --------------------------------------------
# 02/12/05	Charles.White@hp.com	1.780
# [PATCH] Add support for the SA641, SA642 and SA6400 controllers
# 
# I thought changing pci_ids.h should be a separate patch..
# But there is the patch again with the #ifdef CISSC removed, and
# pci_ids.h included.
# 
# The following patch adds support for the SA641, SA642 and SA6400
# controllers to the cciss driver in the 2.2.20 tree.
# 
# 
# 
# 
# diff -urN linux-2.4.20.orig/Documentation/cciss.txt
# linux-2.4.20.cciss_p01/Documentation/cciss.txt
# --------------------------------------------
# 02/12/05	marcelo@freak.distro.conectiva	1.781
# Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.4
# into freak.distro.conectiva:/home/marcelo/bk/linux-2.4
# --------------------------------------------
# 02/12/05	marcelo@freak.distro.conectiva	1.782
# Merge bk://kernel.bkbits.net/jgarzik/misc-2.4
# into freak.distro.conectiva:/home/marcelo/bk/linux-2.4
# --------------------------------------------
# 02/12/05	greg@kroah.com	1.757.11.2
# Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.4
# into kroah.com:/home/greg/linux/BK/gregkh-2.4
# --------------------------------------------
# 02/12/05	greg@kroah.com	1.757.11.3
# Merge bk://linuxusb@bkbits.net/marcelo-2.4
# into kroah.com:/home/greg/linux/BK/gregkh-2.4
# --------------------------------------------
# 02/12/05	joe@wavicle.org	1.757.11.4
# [PATCH] Vicam patch against 2.4.20-pre9
# 
# Hi Greg,
# 
# I'm not sure what the correct way to submit these patches is, so I'm going to
# send you this one, feel free to reject it because it's in the wrong format,
# you want a patch against 2.5.x first or you want a patch against 2.4.20
# instead.
# 
# -Joe
# 
# diff -urN linux-2.4.19/drivers/usb/Makefile
# linux-2.4.19-vicam/drivers/usb/Makefile
# --------------------------------------------
# 02/12/05	greg@kroah.com	1.757.11.5
# [PATCH] removed vicamurbs.h
# 
# --------------------------------------------
# 02/12/05	acme@conectiva.com.br	1.757.11.6
# [PATCH] Add support for JTEC FA8101 USB to Ethernet device
# 
#   o Add support for JTEC FA8101 USB to Ethernet device
# --------------------------------------------
# 02/12/05	plcl@telefonica.net	1.757.11.7
# [PATCH] usb-midi patch for 2.4.20-pre11
# 
# Please, apply the attached patch for usb-midi.c (Linux kernel 2.4.20-pre11)
# 
# This patch solves some problems with MIDI IN:
# - System exclusive messages corrupted.
# - Other MIDI messages lost (mainly simultaneous notes).
# --------------------------------------------
# 02/12/05	olh@suse.de	1.757.11.8
# [PATCH] minor fixes for compile warnings in 2.4.20pre11 , usb-2.4 tree
# 
# this patch fixes some compile warnings with the 2.4.20pre11 tree.
# The rtl8150.c does not compile on ppc32 because linux/init.h is missing,
# but the driver uses __init.
# 
# The MSR_RI is the machine state register on ppc, it seems to be a modem
# state register on the io edge port. The patch does just a rename, maybe
# it can be done in a better way..
# --------------------------------------------
# 02/12/05	erik@aarg.net	1.757.11.9
# [PATCH] USB: added support for Palm Tungsten T devices to visor driver
# 
# --------------------------------------------
# 02/12/05	david-b@pacbell.net	1.757.11.10
# [PATCH] usbnet talks to Zaurus
# 
# This more or less syncs the 2.4 version with the 2.5 one.
# 
# It teaches "usbnet" how to talk to the SL-5000D/SL-5500,
# and the A-300.  It's got some cleanups of how it talks
# to other StrongArm PDAs -- which is most of the patch by
# volume, other than making the GPL explicit.
# 
# This will make Zaurus interop easier, folk won't need to
# find and install the "usbdnet" version which, as Pavel
# put it, "eats disks".
# --------------------------------------------
# 02/12/05	henning@meier-geinitz.de	1.757.11.11
# [PATCH] [PATCH 2.4.20-rc1] scanner.h: add/fix vendor/product ids
# 
# This patch against 2.4.20-rc1 adds some vendor/product ids for Mustek
# and Lexmark scanners. Also, the names of the existing Mustek scanners
# were fixed and the product id of the Bearpaw 1200 F was corrected.
# 
# I think that's a rather low-risk patch that can be applied. That's why
# I splitted it from the patch that fixes the "two-endpoints-only" issue
# and the "can't unload" issue of the scanner driver (posted earlier on
# linux-usb-devel).
# --------------------------------------------
# 02/12/05	oliver@oenone.homelinux.org	1.757.11.12
# [PATCH] - use of unplugged scanner oops fix
# 
# --------------------------------------------
# 02/12/05	petkan@tequila.dce.bg	1.757.11.13
# [PATCH] USB: pegasus: the kmalloc/kfree crap removed from [get|set]_registers();
# 
# --------------------------------------------
# 02/12/05	baldrick@wanadoo.fr	1.757.11.14
# [PATCH] usbdevfs: finalize urbs on interface release
# 
# Description: When an urb has been submitted via usbdevfs, and is still
# pending when the interface it was submitted to is released, force the
# urb to be completed.  This is the correct behaviour.  It fixes an oops on
# system shutdown when using the user space driver for the speedtouch
# modem.
# --------------------------------------------
# 02/12/05	randy.dunlap@verizon.net	1.757.11.15
# [PATCH] USB: use time_before() to compare times
# 
# --------------------------------------------
# 02/12/05	ganesh@tuxtop.vxindia.veritas.com	1.757.11.16
# [PATCH] USB ipaq: brown paper bag bug - uninitialized spinlock fixed.
# 
# --------------------------------------------
# 02/12/05	baldrick@wanadoo.fr	1.757.11.17
# [PATCH] usbdevfs: finalize urbs on interface release
# 
# here is a patch for 2.4 that goes on top of the previous one.  It cleans up the
# list handling, in line with Dave's comment.
# --------------------------------------------
# 02/12/05	greg@kroah.com	1.757.11.18
# [PATCH] USB: added Palm Tungsten W support.
# 
# Thanks to Ralf Dietrich <ralle@envicon.de> for the information.
# --------------------------------------------
# 02/12/05	ganesh@tuxtop.vxindia.veritas.com	1.757.11.19
# [PATCH] USB ipaq: added support for insmod options to specify vendor/product id
# 
# this will allow people to try out new wince/pocketpc2k devices without
# having to recompile the module.
# --------------------------------------------
# 02/12/05	randy.dunlap@verizon.net	1.757.11.20
# [PATCH] tiglusb timeouts
# 
# It addresses the timeout parameter in the tiglusb driver.
# 
# 1.  timeout could be 0, causing a divide-by-zero.
# The patch prevents this.
# 
# 2.  The timeout value to usb_bulk_msg() could be rounded
# down to cause a divide-by-zero if timeout was < 10, e.g. 9,
# in:
# 	result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read,
# 			       &bytes_read, HZ / (timeout / 10));
# 9 / 10 == 0 => divide-by-zero !!
# 
# 3.  The timeout value above doesn't do very well on converting
# timeout to tenths of seconds.  Even for the default timeout
# value of 15 (1.5 seconds), it becomes:
# 	HZ / (15 / 10) == HZ / 1 == HZ, or 1 second.
# The patch corrects this formula to use:
# 	(HZ * 10) / timeout
# --------------------------------------------
# 02/12/05	baldrick@wanadoo.fr	1.757.11.21
# [PATCH] usbdevfs: more list cleanups
# 
# Here is a small cleanup patch for 2.4 that goes on top of my previous
# ones.  It makes devio.c use the list traversal macros from list.h.
# --------------------------------------------
# 02/12/05	tvrtko@net4u.hr	1.757.11.22
# [PATCH] usb-uhci, fixed memory leak with one-shot interrupt transfers
# 
# Credit goes to Georg Acher for the fix. I only reported the leak, and did the
# pre&post testing. Tested under 2.4.18 and 2.4.19.
# --------------------------------------------
# 02/12/05	will@sowerbutts.com	1.757.11.23
# [PATCH] USB: add USB powermate driver
# 
# Matches the existing 2.5 driver support.
# --------------------------------------------
# 02/12/05	dana.lacoste@peregrine.com	1.757.11.24
# [PATCH] RATOC USB-60 patch
# 
# Trivial patch to get the RATOC USB60 USB-Serial converter working :
# --------------------------------------------
# 02/12/05	marcel@holtmann.org	1.757.11.25
# [PATCH] Disable bluetooth.o if Bluetooth subsystem is used
# 
# This patch disables the USB Bluetooth driver (bluetooth.o) from
# the drivers/usb/ directory if the Linux Bluetooth subsystem is
# selected.
# --------------------------------------------
# 02/12/05	rddunlap@osdl.org	1.757.11.26
# [PATCH] USB requires MIDI
# 
# Driver has unresolved references to sound/MIDI symbols
# (linker problems) without this if USB_MIDI = Y and
# SOUND isn't in-kernel.
# --------------------------------------------
# 02/12/05	rlievin@free.fr	1.757.11.27
# [PATCH] USB: tiglusb sync with 2.5
# 
# --------------------------------------------
# 02/12/05	bjorn_helgaas@hp.com	1.757.13.16
# ACPI: (acpi_bus_add) Only check devices for presence, so we don't
# mistakenly skip things.
# --------------------------------------------
#
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c	Wed Oct  8 09:06:48 2003
+++ b/drivers/acpi/bus.c	Wed Oct  8 09:06:48 2003
@@ -1447,16 +1447,14 @@
 	switch (type) {
 	case ACPI_BUS_TYPE_DEVICE:
 		result = acpi_bus_get_status(device);
-		if (0 != result)
-			goto end;
-		break;
+		if (!result)
+			break;
+		if (!device->status.present)
+			result = -ENOENT;
+		goto end;
 	default:
 		STRUCT_TO_INT(device->status) = 0x0F;
 		break;
-	}
-	if (!device->status.present) {
-		result = -ENOENT;
-		goto end;
 	}
 
 	/*