ACPI: remove CONFIG_ACPI_EC
Remove CONFIG_ACPI_EC. It was always set the same as CONFIG_ACPI,
and it had no menu label, so there was no way to set it to anything
other than "y".
Per section 6.5.4 of the ACPI 3.0b specification,
OSPM must make Embedded Controller operation regions, accessed
via the Embedded Controllers described in ECDT, available before
executing any control method.
The ECDT table is optional, but if it is present, the above text
means that the EC it describes is a required part of the ACPI
subsystem, so CONFIG_ACPI_EC=n wouldn't make sense.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 4fa7866..90cb2a8 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -324,14 +324,6 @@
ACPI Debug Statements slow down ACPI processing. Function trace
is about half of the penalty and is rarely useful.
-config ACPI_EC
- bool
- default y
- help
- This driver is required on some systems for the proper operation of
- the battery and thermal drivers. If you are compiling for a
- mobile system, say Y.
-
config ACPI_PCI_SLOT
tristate "PCI slot detection driver"
default n
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 8017f63..fc62231 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -39,7 +39,7 @@
obj-y += bus.o glue.o
obj-y += scan.o
# Keep EC driver first. Initialization of others depend on it.
-obj-$(CONFIG_ACPI_EC) += ec.o
+obj-y += ec.o
obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index c797c64..765fd1c 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -774,7 +774,7 @@
"Unable to initialize ACPI OS objects\n");
goto error1;
}
-#ifdef CONFIG_ACPI_EC
+
/*
* ACPI 2.0 requires the EC driver to be loaded and work before
* the EC device is found in the namespace (i.e. before acpi_initialize_objects()
@@ -785,7 +785,6 @@
*/
status = acpi_ec_ecdt_probe();
/* Ignore result. Not having an ECDT is not fatal. */
-#endif
status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
if (ACPI_FAILURE(status)) {
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 85e0eb7..1b128d1 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -523,7 +523,7 @@
static int sonypi_ec_write(u8 addr, u8 value)
{
-#ifdef CONFIG_ACPI_EC
+#ifdef CONFIG_ACPI
if (SONYPI_ACPI_ACTIVE)
return ec_write(addr, value);
#endif
@@ -539,7 +539,7 @@
static int sonypi_ec_read(u8 addr, u8 *value)
{
-#ifdef CONFIG_ACPI_EC
+#ifdef CONFIG_ACPI
if (SONYPI_ACPI_ACTIVE)
return ec_read(addr, value);
#endif
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 9494400..4494ad2 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -230,7 +230,7 @@
config MSI_LAPTOP
tristate "MSI Laptop Extras"
depends on X86
- depends on ACPI_EC
+ depends on ACPI
depends on BACKLIGHT_CLASS_DEVICE
---help---
This is a driver for laptops built by MSI (MICRO-STAR
@@ -260,7 +260,7 @@
config COMPAL_LAPTOP
tristate "Compal Laptop Extras"
depends on X86
- depends on ACPI_EC
+ depends on ACPI
depends on BACKLIGHT_CLASS_DEVICE
---help---
This is a driver for laptops built by Compal:
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 818215f..b3c40dc 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -97,10 +97,8 @@
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_EC
int acpi_ec_ecdt_probe(void);
int acpi_boot_ec_enable(void);
-#endif
/* --------------------------------------------------------------------------
Processor
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index fd6a452..d7846bd 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -163,8 +163,6 @@
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
-#ifdef CONFIG_ACPI_EC
-
extern int ec_read(u8 addr, u8 *val);
extern int ec_write(u8 addr, u8 val);
extern int ec_transaction(u8 command,
@@ -172,8 +170,6 @@
u8 *rdata, unsigned rdata_len,
int force_poll);
-#endif /*CONFIG_ACPI_EC*/
-
#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
typedef void (*wmi_notify_handler) (u32 value, void *context);