• Dimitris Lampridis's avatar
    kernel: fix kernel >4.4 compatibility · 4fb9a54c
    Dimitris Lampridis authored
    Compiling on kernel >=4.5 produces the following error:
      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".
    58383c7 gpio: change member .dev to .parent
    This patch makes our code compatible with modern kernel versions
    Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
    Signed-off-by: 's avatarDimitris Lampridis <Dimitris.Lampridis@cern.ch>