iio: accel: bma220: publish the SPI driver ACPI alias
Subsystems (2)
PATCH v2 1/1 iio: accel: bma220: publish the SPI driver ACPI alias
The SPI driver advertises an ACPI match for BMA0220 but does not export that table. A modular build therefore lacks the ACPI alias used to load the driver when the device is enumerated through ACPI.
Export the ACPI table. Move the existing SPI export next to its SPI ID table so each export is adjacent to the table it describes.
The issue was found by our static-analysis tool.
---
Changes since v1:
https://lore.kernel.org/all/[email protected]/
Place the SPI export immediately after the SPI table as Jonathan and Andy requested; use the full author name.
drivers/iio/accel/bma220_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/accel/bma220_spi.c +2 -1
@@ -28,12 +28,13 @@ static const struct spi_device_id bma220_spi_id[] = { { .name = "bma220" }, { } }; +MODULE_DEVICE_TABLE (spi, bma220_spi_id);static const struct acpi_device_id bma220_acpi_id[] = { {"BMA0220" ,0 }, { } }; -MODULE_DEVICE_TABLE (spi, bma220_spi_id); +MODULE_DEVICE_TABLE (acpi, bma220_acpi_id);static const struct of_device_id bma220_of_spi_match[] = { { .compatible ="bosch,bma220" },
base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137
Signature · 1 line
2.50.1 (Apple Git-155)
Jonathan Cameron
maintainerQuoted 11 lines · On Sun, 20 Sep 2026 11:33:58 +0800 Pengpeng Hou <[email protected]> wrote:
The SPI driver advertises an ACPI match for BMA0220 but does not export that table. A modular build therefore lacks the ACPI alias used to load the driver when the device is enumerated through ACPI.
Export the ACPI table. Move the existing SPI export next to its SPI ID table so each export is adjacent to the table it describes.
The issue was found by our static-analysis tool.
Fixes bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")Assisted-by gpt 5
Updated to LLM and patch applied.
Quoted 31 lines
Signed-off-by Pengpeng Hou <[email protected]>---
Changes since v1:
https://lore.kernel.org/all/[email protected]/
Place the SPI export immediately after the SPI table as Jonathan and Andy requested; use the full author name.drivers/iio/accel/bma220_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iio/accel/bma220_spi.c +2
-1@@ -28,12 +28,13 @@ static const struct spi_device_id bma220_spi_id[] = { { .name = "bma220" }, { } }; +MODULE_DEVICE_TABLE (spi, bma220_spi_id);static const struct acpi_device_id bma220_acpi_id[] = { {"BMA0220" ,0 }, { } }; -MODULE_DEVICE_TABLE (spi, bma220_spi_id); +MODULE_DEVICE_TABLE (acpi, bma220_acpi_id);static const struct of_device_id bma220_of_spi_match[] = { { .compatible ="bosch,bma220" },base-commit:
518e5b794c06c0f0eb40df3e202274a66202c137