Commit 4dd227a5 authored by Jay Fang's avatar Jay Fang Committed by Mark Brown

spi: dw-mmio: Do not add acpi modalias when CONFIG_ACPI is not enabled

Reduce unnecessary static memory allocation when CONFIG_ACPI is not enabled.
Signed-off-by: default avatarJay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1588991392-24219-1-git-send-email-f.fangjian@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 74750e06
...@@ -283,11 +283,13 @@ static const struct of_device_id dw_spi_mmio_of_match[] = { ...@@ -283,11 +283,13 @@ static const struct of_device_id dw_spi_mmio_of_match[] = {
}; };
MODULE_DEVICE_TABLE(of, dw_spi_mmio_of_match); MODULE_DEVICE_TABLE(of, dw_spi_mmio_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id dw_spi_mmio_acpi_match[] = { static const struct acpi_device_id dw_spi_mmio_acpi_match[] = {
{"HISI0173", (kernel_ulong_t)dw_spi_dw_apb_init}, {"HISI0173", (kernel_ulong_t)dw_spi_dw_apb_init},
{}, {},
}; };
MODULE_DEVICE_TABLE(acpi, dw_spi_mmio_acpi_match); MODULE_DEVICE_TABLE(acpi, dw_spi_mmio_acpi_match);
#endif
static struct platform_driver dw_spi_mmio_driver = { static struct platform_driver dw_spi_mmio_driver = {
.probe = dw_spi_mmio_probe, .probe = dw_spi_mmio_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment