[ACPI] acpi_register_gsi() can return error
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Thu, 28 Jul 2005 18:42:00 +0000 (14:42 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 5 Aug 2005 02:12:08 +0000 (22:12 -0400)
commit1f3a6a15771ed70d3b2581663dcc6b9bc134baa5
tree3ff04aafd6c5ea69a0011662b6aa5ed2a6a2d623
parentbd6dbdf3c7b9784fbf5d8500e427a954e27a976a
[ACPI] acpi_register_gsi() can return error

Current acpi_register_gsi() function has no way to indicate errors to its
callers even though acpi_register_gsi() can fail to register gsi because of
some reasons (out of memory, lack of interrupt vectors, incorrect BIOS, and so
on).  As a result, caller of acpi_register_gsi() cannot handle the case that
acpi_register_gsi() fails.  I think failure of acpi_register_gsi() should be
handled properly.

This series of patches changes acpi_register_gsi() to return negative value on
error, and also changes callers of acpi_register_gsi() to handle failure of
acpi_register_gsi().

This patch changes the type of return value of acpi_register_gsi() from
"unsigned int" to "int" to indicate an error.  If acpi_register_gsi() fails to
register gsi, it returns negative value.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
arch/i386/kernel/acpi/boot.c
arch/ia64/kernel/acpi.c
include/linux/acpi.h