From 1f3a6a15771ed70d3b2581663dcc6b9bc134baa5 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Thu, 28 Jul 2005 14:42:00 -0400 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/acpi.h') diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ca0cd240cee..9378bcde73a 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -432,7 +432,7 @@ static inline int acpi_boot_table_init(void) #endif /*!CONFIG_ACPI_BOOT*/ -unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); +int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); /* -- cgit v1.2.3