]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Defer gpio device setup until after gpiolib initialization
authorGuenter Roeck <linux@roeck-us.net>
Thu, 31 Mar 2016 15:11:30 +0000 (08:11 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 8 Apr 2016 08:10:09 +0000 (10:10 +0200)
commitb56bc2d684a747ba60c868edca3e1af1eb7a7260
tree4d3fc7e1a33a29249fc05749ac79f0695a3b7a8c
parent0fd2eee8541e39c82f10b72c772547b195e25ca3
gpiolib: Defer gpio device setup until after gpiolib initialization

Since commit fe5a97fa12ca ("gpio: make the gpiochip a real device"),
attempts to add a gpio chip prior to gpiolib initialization cause
the system to crash. This happens because gpio_bus_type has not been
registered yet. Defer creating gpio devices until after gpiolib has
been initialized to fix the problem.

Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Fixes: fe5a97fa12ca ("gpio: make the gpiochip a real device")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c