}
}
+#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);
};
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[] = {