[PATCH 2.6.13-rc3 1/6] failure of acpi_register_gsi() should be handled properly - change acpi_register_gsi() interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>


---

 linux-2.6.13-rc3-kanesige/arch/i386/kernel/acpi/boot.c |    6 +++++-
 linux-2.6.13-rc3-kanesige/arch/ia64/kernel/acpi.c      |    6 +++++-
 linux-2.6.13-rc3-kanesige/include/linux/acpi.h         |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff -puN arch/i386/kernel/acpi/boot.c~handle-error-acpi_register_gsi arch/i386/kernel/acpi/boot.c
--- linux-2.6.13-rc3/arch/i386/kernel/acpi/boot.c~handle-error-acpi_register_gsi	2005-07-28 01:01:14.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/arch/i386/kernel/acpi/boot.c	2005-07-28 01:01:14.000000000 +0900
@@ -484,7 +484,11 @@ int acpi_gsi_to_irq(u32 gsi, unsigned in
 	return 0;
 }
 
-unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
+/*
+ * success: return IRQ number (>=0)
+ * failure: return < 0
+ */
+int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
 {
 	unsigned int irq;
 	unsigned int plat_gsi = gsi;
diff -puN arch/ia64/kernel/acpi.c~handle-error-acpi_register_gsi arch/ia64/kernel/acpi.c
--- linux-2.6.13-rc3/arch/ia64/kernel/acpi.c~handle-error-acpi_register_gsi	2005-07-28 01:01:14.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/arch/ia64/kernel/acpi.c	2005-07-28 01:01:14.000000000 +0900
@@ -563,7 +563,11 @@ acpi_numa_arch_fixup (void)
 }
 #endif /* CONFIG_ACPI_NUMA */
 
-unsigned int
+/*
+ * success: return IRQ number (>=0)
+ * failure: return < 0
+ */
+int
 acpi_register_gsi (u32 gsi, int edge_level, int active_high_low)
 {
 	if (has_8259 && gsi < 16)
diff -puN include/linux/acpi.h~handle-error-acpi_register_gsi include/linux/acpi.h
--- linux-2.6.13-rc3/include/linux/acpi.h~handle-error-acpi_register_gsi	2005-07-28 01:01:14.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/include/linux/acpi.h	2005-07-28 01:01:14.000000000 +0900
@@ -445,7 +445,7 @@ static inline int acpi_boot_table_init(v
 
 #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);
 
 /*

_


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux