Skip to content

Commit 85ed0f6

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi-amd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,13 @@ static int amd_spi_probe(struct platform_device *pdev)
294294
return err;
295295
}
296296

297+
#ifdef CONFIG_ACPI
297298
static const struct acpi_device_id spi_acpi_match[] = {
298299
{ "AMDI0061", 0 },
299300
{},
300301
};
301302
MODULE_DEVICE_TABLE(acpi, spi_acpi_match);
303+
#endif
302304

303305
static struct platform_driver amd_spi_driver = {
304306
.driver = {

0 commit comments

Comments
 (0)