Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3330464ima; Tue, 23 Oct 2018 04:19:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV62s8WlWwHfolYGP8dwsxvbgRIkcE/3TGsg0LBT8ohYfBw1MVbV2TvFqcY60fK/C7av9+U2J X-Received: by 2002:a17:902:7802:: with SMTP id p2-v6mr47432223pll.170.1540293595004; Tue, 23 Oct 2018 04:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540293594; cv=none; d=google.com; s=arc-20160816; b=qWS0aBKpQIFw3TI1oMsuN4U/ELRPLUmc0IMRWJc/6064jsVlJnVihjjN72v24LSy8W cRQIUrk0yBtpyAAxOxmUPGSKZiivTRf3YdICCpFJTWwTCw7BEPoZO+/F8ddUPmi84t8t 6LwbjCdO2wwYbkGL02d07DeuCPRM+BKV9inuRFYQvxjuJPkJJ4o7WZUCfwh+yKVSxlIU D0o+pDSqLUKRSPErRVWpNrIXcQtWgu0zWenbze7koC8cqY3RUfu8SZSdX8GBY0QcubUO eUNrwQp4+xNlAv70CeWln1D5OHsAQtnW5WFvcskbnyZmT4MJYmgA/mLntd71MP2f49BV sUoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=s8MQmraQV0NIC1BFerTDsjHPxsGjmB9FI6eb16oSmrI=; b=Wi38rnReaCLuMcln+87LQ6aob1O7LSZld1rsmbJWi9w5vvPhPpQ87Y89DCO9/LOGjv m7Za1PQftqOS/qayBTnxZF6lffKPycYtKFKrphd7uLjUNVuJFjr+LAc9S6EbQ6Y5Av5o tMcrhMqO37dNORrQhCbKo888dhGH+h+0UIr6bRm4GY8A/noRm6ii/2iM3YyOeCdlj7Ic NHlpw53kQBRcLfjlkjyIY3kACa5NVHCTeSzMu7r1ieEQrUmg1iSpogxsaHSjYX2XphSJ +NVCX/PepZeJXBoDhRzD7lgYGEa3o5ODl+IDQOKpetN85H1f2pi8g7KhASpDNf/Ww3uP 01Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si950691plr.141.2018.10.23.04.19.39; Tue, 23 Oct 2018 04:19:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728162AbeJWTls (ORCPT + 99 others); Tue, 23 Oct 2018 15:41:48 -0400 Received: from dliviu.plus.com ([80.229.23.120]:39332 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727568AbeJWTls (ORCPT ); Tue, 23 Oct 2018 15:41:48 -0400 Received: from mail.dudau.co.uk (bart.dudau.co.uk [192.168.14.2]) by smtp.dudau.co.uk (Postfix) with SMTP id F1BA241D1360; Tue, 23 Oct 2018 12:18:44 +0100 (BST) Received: by mail.dudau.co.uk (sSMTP sendmail emulation); Tue, 23 Oct 2018 12:18:44 +0100 Date: Tue, 23 Oct 2018 12:18:44 +0100 From: Liviu Dudau To: Jacek Anaszewski Cc: Linus Walleij , Pavel Machek , linux-leds@vger.kernel.org, LKML Subject: Re: [PATCH] leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds Message-ID: <20181023111842.GA29083@bart.dudau.co.uk> References: <20181018001432.710-1-liviu@dudau.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181018001432.710-1-liviu@dudau.co.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 01:14:32AM +0100, Liviu Dudau wrote: > Commit 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device") > removed the common code path that set the led_dat->gpiod pointer in > create_gpio_led(), but only added it back for the devices that have > a valid gpio_led_platform_data structure. Calling gpio_leds_create() > in gpio_led_probe() is not enough to get a valid gpiod pointer. > > Fortunately enough, gpio_leds_create() already gets the needed pointer, > we just need to assign it to the relevant gpio_led_data structure. > > Fixes: 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device") > Cc: Linus Walleij > Cc: Jacek Anaszewski > Signed-off-by: Liviu Dudau > --- Gentle ping! I haven't seen any reply to this, even if the commit it fixes is still in for-next branch. Best regards, Liviu > > Hi, > > I found this issue while testing linux-next-20181017, I don't know how > stable the leds for-next tree is in terms of commit IDs, if that gets > rebased then the Fixes commit ID needs updating. > > Best regards, > Liviu > > drivers/leds/leds-gpio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c > index 32fa752565bc..45e012093865 100644 > --- a/drivers/leds/leds-gpio.c > +++ b/drivers/leds/leds-gpio.c > @@ -163,6 +163,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev) > return ERR_CAST(led.gpiod); > } > > + led_dat->gpiod = led.gpiod; > + > fwnode_property_read_string(child, "linux,default-trigger", > &led.default_trigger); > > -- > 2.19.0 > -- /`\ / : | _.._ | '/ /` \ | / | .-._ '-"` ( |_/ / o o\ | == () == \ -- / ______________________________________ / ---<_ ________| |_______ | \\ \ | I would like to fix the world but | / | | \\__ \ | no one gives me the source code. | / / ; |.__) / |______________________________________| \ (_/.-. ; /__________) (_________\ { `| \_/ '-\ / | | / | / \ '-. \__|-----'