Cannot compile WR NIC with kernel >=4.5
Running 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.