diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-09-05 12:17:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-09-05 12:17:43 +0300 |
commit | 95c13662b65c562d4902ad9f810378261347a749 (patch) | |
tree | 036091f8615fdf2d00021709993b00790a630250 /include/linux/spi/spi.h | |
parent | fe826cc2654e8561b64246325e6a51b62bf2488c (diff) | |
parent | 2ab9d830262c132ab5db2f571003d80850d56b2a (diff) | |
download | linux-95c13662b65c562d4902ad9f810378261347a749.tar.xz |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
This also refreshes the -rc1 based branch to -rc5.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r-- | include/linux/spi/spi.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index e4f3f3d30a03..d47d5f14ff99 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -902,12 +902,29 @@ extern int devm_spi_register_controller(struct device *dev, struct spi_controller *ctlr); extern void spi_unregister_controller(struct spi_controller *ctlr); -#if IS_ENABLED(CONFIG_ACPI) +#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SPI_MASTER) extern struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev); extern struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, struct acpi_device *adev, int index); int acpi_spi_count_resources(struct acpi_device *adev); +#else +static inline struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev) +{ + return NULL; +} + +static inline struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, + struct acpi_device *adev, + int index) +{ + return ERR_PTR(-ENODEV); +} + +static inline int acpi_spi_count_resources(struct acpi_device *adev) +{ + return 0; +} #endif /* |