]> Git Repo - linux.git/commitdiff
i2c: Fix conditional for substituting empty ACPI functions
authorRichard Fitzgerald <[email protected]>
Fri, 2 Aug 2024 15:22:14 +0000 (16:22 +0100)
committerWolfram Sang <[email protected]>
Sun, 4 Aug 2024 14:33:31 +0000 (16:33 +0200)
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 <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
include/linux/i2c.h

index 07e33bbc9256dd04ca9e60921c7663cd22845fe7..7eedd0c662dad29ae8be0334e5f4c2f7422dfca3 100644 (file)
@@ -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);
This page took 0.058937 seconds and 4 git commands to generate.