Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Thu, 12 Jun 2003 11:02:53 +0200 | From | Stelian Pop <> | Subject | Export 'acpi_disabled' symbol to modules... |
| |
Hi,
The ACPI subsystem can be today (from a driver point of view) in three configurations: not compiled (CONFIG_ACPI=n), compiled and running or compiled and disabled (with acpi=off).
A driver which wants to use some ACPI exported routines (in my case it's the sonypi driver which wants to use ec_read/ec_write), needs to know exactly what the ACPI state is.
The only way to do this today (from what I've seen) is to do:
#ifdef CONFIG_ACPI if (!acpi_disabled) return ec_write(addr, value); #endif return my_ec_emulated_write(...);
This way on doing things needs however that the 'acpi_disabled' variable be exported to modules.
Please apply the attached patch or advise on a better way to know if ACPI is enabled or not (patch generated against the today 2.5 BK tree).
Thanks,
Stelian.
===== arch/i386/kernel/setup.c 1.84 vs edited ===== --- 1.84/arch/i386/kernel/setup.c Sun Jun 8 00:17:53 2003 +++ edited/arch/i386/kernel/setup.c Tue Jun 10 10:02:00 2003 @@ -61,7 +61,8 @@ unsigned long mmu_cr4_features; EXPORT_SYMBOL_GPL(mmu_cr4_features); -int acpi_disabled __initdata = 0; +int acpi_disabled; +EXPORT_SYMBOL(acpi_disabled); int MCA_bus; /* for MCA, but anyone else can use it if they want */ -- Stelian Pop <stelian.pop@fr.alcove.com> Alcove - http://www.alcove.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |