Commit de4334f7 authored by Lee Jones's avatar Lee Jones Committed by Linus Walleij

pinctrl: pinctrl-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
'struct amd_gpio_acpi_match' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

 drivers/pinctrl/pinctrl-amd.c:959:36: warning: ‘amd_gpio_acpi_match’ defined but not used [-Wunused-const-variable=]
 959 | static const struct acpi_device_id amd_gpio_acpi_match[] = {
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Cc: Ken Xue <Ken.Xue@amd.com>
Cc: "Wu, Jeff" <Jeff.Wu@amd.com>
Cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
Cc: Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20200713144930.1034632-26-lee.jones@linaro.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 192b752e
...@@ -956,12 +956,14 @@ static int amd_gpio_remove(struct platform_device *pdev) ...@@ -956,12 +956,14 @@ static int amd_gpio_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_ACPI
static const struct acpi_device_id amd_gpio_acpi_match[] = { static const struct acpi_device_id amd_gpio_acpi_match[] = {
{ "AMD0030", 0 }, { "AMD0030", 0 },
{ "AMDI0030", 0}, { "AMDI0030", 0},
{ }, { },
}; };
MODULE_DEVICE_TABLE(acpi, amd_gpio_acpi_match); MODULE_DEVICE_TABLE(acpi, amd_gpio_acpi_match);
#endif
static struct platform_driver amd_gpio_driver = { static struct platform_driver amd_gpio_driver = {
.driver = { .driver = {
......
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