ath79: drop and consolidate redundant chosen/bootargs
[openwrt/staging/dedeckeh.git] / package / kernel / leds-apu2 / src / leds-apu2.c
index 4ea552cf5f7266bc41b92dda685431f6819e50e8..ef125c876899d1d7df3a2cf35f074742df4434cf 100644 (file)
@@ -194,11 +194,7 @@ static int gpio_apu2_probe (struct platform_device *dev)
                }
        }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
-       gpio_apu2_chip.dev = &dev->dev;
-#else
        gpio_apu2_chip.parent = &dev->dev;
-#endif
        ret = gpiochip_add (&gpio_apu2_chip);
        if (ret) {
                pr_err ("%s: adding gpiochip failed\n", DEVNAME);
@@ -209,12 +205,7 @@ static int gpio_apu2_probe (struct platform_device *dev)
 
 static int gpio_apu2_remove (struct platform_device *dev)
 {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
-       int ret;
-       ret = gpiochip_remove (&gpio_apu2_chip);
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
        gpiochip_remove (&gpio_apu2_chip);
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
        return 0;
 }
 
@@ -331,15 +322,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);
 
-       /* Match the device name/model */
-       if (!board_name \
-                       || !board_vendor \
-                       || strcasecmp(board_vendor, "PC Engines") \
-                       || (strcasecmp(board_name, "apu2") && strcasecmp(board_name, "apu3"))) {
-               err = -ENODEV;
-               goto exit;
-       }
-
        pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
 
        err = platform_driver_register (&gpio_apu2_driver);