From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH] leds: leds-gpio: Fix legacy GPIO number case Date: Thu, 6 Nov 2014 13:50:32 +0200 Message-ID: <20141106115032.GN1618@lahna.fi.intel.com> References: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga14.intel.com ([192.55.52.115]:64677 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbaKFLvB (ORCPT ); Thu, 6 Nov 2014 06:51:01 -0500 Content-Disposition: inline In-Reply-To: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> Sender: linux-leds-owner@vger.kernel.org List-Id: linux-leds@vger.kernel.org To: Geert Uytterhoeven Cc: "Rafael J. Wysocki" , Bryan Wu , Alexandre Courbot , Arnd Bergmann , Grant Likely , Richard Purdie , Linus Walleij , linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org On Thu, Nov 06, 2014 at 12:23:23PM +0100, Geert Uytterhoeven wrote: > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Date: Thu, 06 Nov 2014 11:50:32 +0000 Subject: Re: [PATCH] leds: leds-gpio: Fix legacy GPIO number case Message-Id: <20141106115032.GN1618@lahna.fi.intel.com> List-Id: References: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> In-Reply-To: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Thu, Nov 06, 2014 at 12:23:23PM +0100, Geert Uytterhoeven wrote: > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: mika.westerberg@linux.intel.com (Mika Westerberg) Date: Thu, 6 Nov 2014 13:50:32 +0200 Subject: [PATCH] leds: leds-gpio: Fix legacy GPIO number case In-Reply-To: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> References: <1415273003-27674-1-git-send-email-geert+renesas@glider.be> Message-ID: <20141106115032.GN1618@lahna.fi.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Nov 06, 2014 at 12:23:23PM +0100, Geert Uytterhoeven wrote: > 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