Commit 4bea1ca9 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Lee Jones

leds: apu: Remove duplicate DMI lookup data

Building with W=1 shows a warning about an unused dmi_system_id table:

drivers/leds/leds-apu.c:85:35: error: 'apu_led_dmi_table' defined but not used [-Werror=unused-const-variable=]
   85 | static const struct dmi_system_id apu_led_dmi_table[] __initconst = {

Since the current version doesn't even do anything about the different
implementations but only checks the type of system, just drop the
custom lookup logic and call dmi_check_system() using the table itself.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-16-arnd@kernel.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 1fe4f1bf
...@@ -181,8 +181,7 @@ static int __init apu_led_init(void) ...@@ -181,8 +181,7 @@ static int __init apu_led_init(void)
struct platform_device *pdev; struct platform_device *pdev;
int err; int err;
if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") && if (!dmi_check_system(apu_led_dmi_table)) {
(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) {
pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n"); pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
return -ENODEV; return -ENODEV;
} }
......
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