Skip to content

Commit 4bea1ca

Browse files
arndblag-linaro
authored andcommitted
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: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 1fe4f1b commit 4bea1ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/leds/leds-apu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ static int __init apu_led_init(void)
181181
struct platform_device *pdev;
182182
int err;
183183

184-
if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
185-
(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) {
184+
if (!dmi_check_system(apu_led_dmi_table)) {
186185
pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
187186
return -ENODEV;
188187
}

0 commit comments

Comments
 (0)