diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2024-08-02 18:22:14 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-08 08:52:59 +0300 |
| commit | 689e48ab87cdc16523030832cdb22eae8d1bc4a8 (patch) | |
| tree | 33f59870bd9082c9bcb3b1552441253da6f9918a /include/linux | |
| parent | 946446103317ff866152c07f57d695f9a0237368 (diff) | |
| download | linux-689e48ab87cdc16523030832cdb22eae8d1bc4a8.tar.xz | |
i2c: Fix conditional for substituting empty ACPI functions
[ Upstream commit f17c06c6608ad4ecd2ccf321753fb511812d821b ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cfc59c3371cb..aeb94241db52 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -1035,7 +1035,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); |
