From: Jacek Anaszewski Subject: Re: [PATCH 1/2] leds: core: add struct device_node pointer to the struct led_classdev Date: Thu, 2 Mar 2017 21:29:52 +0100 Message-ID: <40a9e4b2-bafa-9503-14b2-5ff6046d561e@gmail.com> References: <20170227222300.2060-1-zajec5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:36200 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558AbdCBUhg (ORCPT ); Thu, 2 Mar 2017 15:37:36 -0500 Received: by mail-wr0-f194.google.com with SMTP id l37so10960025wrc.3 for ; Thu, 02 Mar 2017 12:37:35 -0800 (PST) In-Reply-To: Sender: linux-leds-owner@vger.kernel.org List-Id: linux-leds@vger.kernel.org To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Richard Purdie , Jacek Anaszewski , Pavel Machek , "open list:LED SUBSYSTEM" , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= On 03/02/2017 06:42 PM, Rafał Miłecki wrote: > On 28 February 2017 at 22:20, Jacek Anaszewski > wrote: >> Thanks for the patch. How about following what has been already >> done for spi, i.e. adding a wrapper of_led_classdev_register() >> (please refer to of_register_spi_device() in drivers/spi/spi.c)? > > I like this idea, but I'll need to split led_classdev_register into > two functions: allocation & actual registering function. That way I > can alloc, then read DT proprties and finally register LED (just like > it's done in of_register_spi_device). > > Does it sound OK? Yes, after thinking a bit more about that I came to the same conclusion. -- Best regards, Jacek Anaszewski