Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: hisi-sfc-v3xx: drop unnecessary ACPI_PTR and related ifendif protection

We use ACPI_PTR() and related ifendif protection for the id table.
This is unnecessary as the struct acpi_device_id is defined in
mod_devicetable.h and doesn't rely on ACPI. The driver doesn't
use any ACPI apis, so it can be compiled in the ACPI=n case
with no warnings.

So remove the ACPI_PTR and related ifendif protection, also
replace the header acpi.h with mod_devicetable.h.

Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/1618228708-37949-3-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Yicong Yang and committed by
Mark Brown
4a46f886 4c84e42d

+2 -4
+2 -4
drivers/spi/spi-hisi-sfc-v3xx.c
··· 5 5 // Copyright (c) 2019 HiSilicon Technologies Co., Ltd. 6 6 // Author: John Garry <john.garry@huawei.com> 7 7 8 - #include <linux/acpi.h> 9 8 #include <linux/bitops.h> 10 9 #include <linux/completion.h> 11 10 #include <linux/dmi.h> 12 11 #include <linux/interrupt.h> 13 12 #include <linux/iopoll.h> 14 13 #include <linux/module.h> 14 + #include <linux/mod_devicetable.h> 15 15 #include <linux/platform_device.h> 16 16 #include <linux/slab.h> 17 17 #include <linux/spi/spi.h> ··· 508 508 return ret; 509 509 } 510 510 511 - #if IS_ENABLED(CONFIG_ACPI) 512 511 static const struct acpi_device_id hisi_sfc_v3xx_acpi_ids[] = { 513 512 {"HISI0341", 0}, 514 513 {} 515 514 }; 516 515 MODULE_DEVICE_TABLE(acpi, hisi_sfc_v3xx_acpi_ids); 517 - #endif 518 516 519 517 static struct platform_driver hisi_sfc_v3xx_spi_driver = { 520 518 .driver = { 521 519 .name = "hisi-sfc-v3xx", 522 - .acpi_match_table = ACPI_PTR(hisi_sfc_v3xx_acpi_ids), 520 + .acpi_match_table = hisi_sfc_v3xx_acpi_ids, 523 521 }, 524 522 .probe = hisi_sfc_v3xx_probe, 525 523 };