kernel: leds-apu2 remove boardname check
authorLukas Mrtvy <lukas.mrtvy@gmail.com>
Wed, 11 Jul 2018 08:22:27 +0000 (10:22 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 8 Aug 2018 13:37:10 +0000 (15:37 +0200)
'In different versions of coreboot are different names of apu boardname.
No need to check boardname to load module.'

Signed-off-by: Lukas Mrtvy <lukas.mrtvy@gmail.com>
(cherry picked from commit f21bcb4db8a12cef62e5698f0f711db8dde99db8)

package/kernel/leds-apu2/src/leds-apu2.c

index 2fefa85..ff13b3c 100644 (file)
@@ -331,18 +331,6 @@ static int __init gpio_apu2_init (void)
        const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
        const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
 
        const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
        const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
 
-       /* Match the device name/model */
-       if (!board_name \
-                       || !board_vendor \
-                       || strcasecmp(board_vendor, "PC Engines") \
-                       || (strcasecmp(board_name, "apu2") \
-                               && strcasecmp(board_name, "apu3") \
-                               && strcasecmp(board_name, "PC Engines apu2") \
-                               && strcasecmp(board_name, "PC Engines apu3"))) {
-               err = -ENODEV;
-               goto exit;
-       }
-
        pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
 
        err = platform_driver_register (&gpio_apu2_driver);
        pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
 
        err = platform_driver_register (&gpio_apu2_driver);