Simple PCIe FMC carrier SPEC - Software issueshttps://ohwr.org/project/spec-sw/issues2019-02-12T10:13:40Zhttps://ohwr.org/project/spec-sw/issues/3Cannot compile WR NIC with kernel >=4.52019-02-12T10:13:40ZDimitris LampridisCannot compile WR NIC with kernel >=4.5Running make on a host computer with Linux kernel version \>=4.5
produces:
```
CC [M] spec-sw/kernel/wr-nic-gpio.o
spec-sw/kernel/wr-nic-gpio.c: In function ‘gc_to_fmc’:
spec-sw/kernel/wr-nic-gpio.c:20:25: error: ‘struct gpio_chip’ has no member named ‘dev’
struct device *dev = gc->dev;
^
spec-sw/kernel/wr-nic-gpio.c: In function ‘wrn_gpio_init’:
spec-sw/kernel/wr-nic-gpio.c:75:4: error: ‘struct gpio_chip’ has no member named ‘dev’
gc->dev = &fmc->dev;
^
```
This is due to a change in struct gpio\_chip introduced in 4.5, where
the "dev" field was renamed to
"parent":
http://lxr.free-electrons.com/diff/include/linux/gpio/driver.h?v=4.4;diffvar=v;diffval=4.5
I believe that the attached patch (against current master) solves this.
### Files
* [0001-wr_nic-update-to-new-4.5-kernel-struct-gpio_chip.patch](/uploads/2b8ce038a8c84fa8fa7c494ab67d6256/0001-wr_nic-update-to-new-4.5-kernel-struct-gpio_chip.patch)