From: Geert Uytterhoeven Date: Thu, 6 Nov 2014 11:23:23 +0000 (+0100) Subject: leds: leds-gpio: Fix legacy GPIO number case X-Git-Tag: omap-for-v3.19/fixes-rc1~136^2~9^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec98a4975e66a3aa366cd227edab027b01adea37;p=pandora-kernel.git leds: leds-gpio: Fix legacy GPIO number case In the legacy case, led_dat->gpiod is initialized correctly, but overwritten later by template->gpiod, which is NULL, causing leds-gpio to fail with: gpiod_direction_output: invalid GPIO leds-gpio: probe of leds-gpio failed with error -22 Move the initialization of led_dat->gpiod from template->gpiod up, and always use led_dat->gpiod later, to fix this. Fixes: 5c51277a9ababfa4 (leds: leds-gpio: Add support for GPIO descriptors) Signed-off-by: Geert Uytterhoeven Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed