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

power: supply: rt9455: skip 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the
struct acpi_device_id becomes unused:

drivers/power/supply/rt9455_charger.c:1734:36: warning:
'rt9455_i2c_acpi_match' defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Krzysztof Kozlowski and committed by
Sebastian Reichel
5bcb3dae 439cd7ed

+2
+2
drivers/power/supply/rt9455_charger.c
··· 1731 1731 }; 1732 1732 MODULE_DEVICE_TABLE(of, rt9455_of_match); 1733 1733 1734 + #ifdef CONFIG_ACPI 1734 1735 static const struct acpi_device_id rt9455_i2c_acpi_match[] = { 1735 1736 { "RT945500", 0 }, 1736 1737 { } 1737 1738 }; 1738 1739 MODULE_DEVICE_TABLE(acpi, rt9455_i2c_acpi_match); 1740 + #endif 1739 1741 1740 1742 static struct i2c_driver rt9455_driver = { 1741 1743 .probe = rt9455_probe,