summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2014-05-20 20:59:24 +0800
committerWolfram Sang <wsa@the-dreams.de>2014-06-27 14:50:41 +0200
commitda3c6647ee08711c7edc28d7fea4ad69fc5ffcca (patch)
tree47272da395818ecc9101b27b01808b8cf11f9b35 /include/linux/i2c.h
parent5d98e61d337c181f199a6cb864569cc4e116ef4c (diff)
I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI config
Clean up ACPI related code in the i2c core and add CONFIG_I2C_ACPI to enable I2C ACPI code. Current there is a race between removing I2C ACPI operation region and ACPI AML code accessing. So make i2c core built-in if CONFIG_I2C_ACPI is set. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index f7a939a2cb56..ea507665896c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -577,10 +577,12 @@ static inline struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node
}
#endif /* CONFIG_OF */
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_I2C_ACPI
int acpi_i2c_install_space_handler(struct i2c_adapter *adapter);
void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter);
+void acpi_i2c_register_devices(struct i2c_adapter *adap);
#else
+static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { }
static inline void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter)
{ }
static inline int acpi_i2c_install_space_handler(struct i2c_adapter *adapter)