]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: omap: Fix GPIO numbering for deferred probe
authorTony Lindgren <tony@atomide.com>
Thu, 3 Sep 2015 17:31:27 +0000 (10:31 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Sep 2015 07:12:04 +0000 (09:12 +0200)
commit4fa3b8488c2e1a51e15c13c82333db4a73be8091
tree70bc3bf46d49224b26c1aab1779706dfc6568dad
parenta45e3060931fea05f11bd7bd7e180230283d9f48
gpio: omap: Fix GPIO numbering for deferred probe

If gpio-omap probe fails with -EPROBE_DEFER, the GPIO numbering
keeps increasing. Only increase the gpio count if gpiochip_add()
was successful as otherwise the numbers will increase for each
probe attempt.

Cc: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c