package/kernel/leds-apu2: fix whitespaces
[lede-git/.git] / package / kernel / leds-apu2 / src / leds-apu2.c
index 00f80a3fa8bb4573d3369165de6e0a9700a21a2a..c7764b4000477423cfd79028780680c38bcd6407 100644 (file)
@@ -194,7 +194,11 @@ 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);
@@ -224,21 +228,21 @@ static struct platform_driver gpio_apu2_driver = {
 };
 
 static struct gpio_led apu2_leds_gpio[] = {
-        {
-                .name           = "apu2:green:power",
-                .gpio           = 509,
-                .active_low     = 1,
-        },
-        {
-                .name           = "apu2:green:led2",
-                .gpio           = 510,
-                .active_low     = 1,
-        },
-        {
-                .name           = "apu2:green:led3",
-                .gpio           = 511,
-                .active_low     = 1,
-        },
+       {
+               .name           = "apu2:green:power",
+               .gpio           = 509,
+               .active_low     = 1,
+       },
+       {
+               .name           = "apu2:green:led2",
+               .gpio           = 510,
+               .active_low     = 1,
+       },
+       {
+               .name           = "apu2:green:led3",
+               .gpio           = 511,
+               .active_low     = 1,
+       },
 };
 
 static struct gpio_keys_button apu2_gpio_keys[] = {