summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2024-08-02 16:22:14 +0100
committerWolfram Sang <wsa+renesas@sang-engineering.com>2024-08-04 16:33:31 +0200
commitf17c06c6608ad4ecd2ccf321753fb511812d821b (patch)
tree0c344807531c3633c13ad1f10d859725375365ba
parentf6c29f710c1ff2590109f83be3e212b86c01e0f3 (diff)
downloadlinux-stable-f17c06c6608ad4ecd2ccf321753fb511812d821b.tar.gz
linux-stable-f17c06c6608ad4ecd2ccf321753fb511812d821b.tar.bz2
linux-stable-f17c06c6608ad4ecd2ccf321753fb511812d821b.zip
i2c: Fix conditional for substituting empty ACPI functions
Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI functions. The conditional around these functions depended only on CONFIG_ACPI. But the functions are implemented in I2C core, so are only present if CONFIG_I2C is enabled. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-rw-r--r--include/linux/i2c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 07e33bbc9256..7eedd0c662da 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
struct acpi_resource;
struct acpi_resource_i2c_serialbus;
-#if IS_ENABLED(CONFIG_ACPI)
+#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
struct acpi_resource_i2c_serialbus **i2c);
int i2c_acpi_client_count(struct acpi_device *adev);