Skip to content

Commit 9b2d611

Browse files
Lee Jonesbroonie
authored andcommitted
spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'pxa2xx_spi_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=] 1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Haojian Zhuang <[email protected]> Cc: Robert Jarzmik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c894c26 commit 9b2d611

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@ static void cleanup(struct spi_device *spi)
14321432
kfree(chip);
14331433
}
14341434

1435+
#ifdef CONFIG_ACPI
14351436
static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
14361437
{ "INT33C0", LPSS_LPT_SSP },
14371438
{ "INT33C1", LPSS_LPT_SSP },
@@ -1442,6 +1443,7 @@ static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
14421443
{ },
14431444
};
14441445
MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match);
1446+
#endif
14451447

14461448
/*
14471449
* PCI IDs of compound devices that integrate both host controller and private

0 commit comments

Comments
 (0)