Commit bb80c764 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: gpio: handle api changes for 4.5 kernel release

In kernel version 4.5, struct gpio_chip renamed the field 'dev' to
'parent' so handle this properly.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7a6396d9
......@@ -651,7 +651,11 @@ static int gb_gpio_connection_init(struct gb_connection *connection)
gpio = &ggc->chip;
gpio->label = "greybus_gpio";
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
gpio->parent = &connection->bundle->dev;
#else
gpio->dev = &connection->bundle->dev;
#endif
gpio->owner = THIS_MODULE;
gpio->request = gb_gpio_request;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment