[PATCH v2] iio: accel: bma220: publish the SPI driver ACPI alias
From: Pengpeng Hou
Date: Sat Sep 19 2026 - 23:34:42 EST
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
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
Changes since v1:
https://lore.kernel.org/all/20260905133901.66016-1-hppiscas@xxxxxxx/
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(-)
diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index d6c1087cc3c0..d7a95289df48 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -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
--
2.50.1 (Apple Git-155)