Older kernel versions do not have the fwnode attribute in the struct gpio_chip, fill the of_node attribuet instead. Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- patches/0112-gpio-fwnode.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patches/0112-gpio-fwnode.patch diff --git a/patches/0112-gpio-fwnode.patch b/patches/0112-gpio-fwnode.patch new file mode 100644 index 00000000..5518884d --- /dev/null +++ b/patches/0112-gpio-fwnode.patch @@ -0,0 +1,14 @@ +--- a/drivers/bcma/driver_gpio.c ++++ b/drivers/bcma/driver_gpio.c +@@ -184,7 +184,11 @@ int bcma_gpio_init(struct bcma_drv_cc *c + chip->direction_input = bcma_gpio_direction_input; + chip->direction_output = bcma_gpio_direction_output; + chip->parent = bus->dev; ++#if LINUX_VERSION_IS_GEQ(5,17,0) + chip->fwnode = dev_fwnode(&cc->core->dev); ++#elif IS_BUILTIN(CONFIG_OF) ++ chip->of_node = cc->core->dev.of_node; ++#endif + + switch (bus->chipinfo.id) { + case BCMA_CHIP_ID_BCM4707: -- 2.45.2