Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2269187ybi; Mon, 1 Jul 2019 09:04:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2k0YdtcBLHsNzE4MkesewSzc9Qw5tr07lboRCekmrMI2f1hLoi9/FAY+CFZdqWMifksHy X-Received: by 2002:a17:90a:d817:: with SMTP id a23mr65491pjv.54.1561997091799; Mon, 01 Jul 2019 09:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561997091; cv=none; d=google.com; s=arc-20160816; b=ZAFHfEp6qSexe18u8dEglC6kblKPYsHbfHp0AkYaBQOAim01KGXC/zJhSfFkvf2mi8 t1reRnQUlsfc/2CLD70OSpGQzSZwj/DDH42pdNWpMSvvK+U9SuhL9J6YAPY6oRRqozey n2u2+x9S4MHjs3g1+z3Pn4lofUondkBBFEWbEpFZnOIoZkUmnxoRJptp0zsZvI2WKK1u WpQkzCZr8D37gWAWNDMS34hy7KvvoCRQUG/RBrS5e7jsB6AUvEC9uOl2IGj1wdPTVk59 l/vlckEuqoXGxmZXA/9g6EawsIChvO3uc3zupM1vnYiq8Vl3bcz+FTlSA2NbIHlLP4Pb Rw6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jcXacZRIDTZo39MNg8v9Tu/Km84xK4Bnbq2hxYScm9Q=; b=Dn/68NSGEcKQEIaku6RGcisktP1vdQFNHNhtQQnUNxszfpIl3TgZatRHzj0b1bQzhm Uh+GfgICl3XPEczflbNcNHAy/rK2brpDxtwIWgsnVZ5AlWGdBkbEkvSajaVDzw4HGiUm fmvSAPUmQm+2t9BdpEWPWME+GakB5wTh3jecGkGN93tleN/myv2mRdxql7oESR6srHGa /I15ztjLOT9M+RDiVFDROn1zIgzOFHdl/voLdd5fjT79xPDgv3zJXpyAe9NTeQ8E2yVE N0wS3NoqUwjD1RqGn9VLtCsFkVj5AgAT59RfqxXM0PimDbmVtKMUoXozE2V3XykwCh64 I9+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=J470NWPb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si11309431pfi.211.2019.07.01.09.04.34; Mon, 01 Jul 2019 09:04:51 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=J470NWPb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbfGAP0N (ORCPT + 99 others); Mon, 1 Jul 2019 11:26:13 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:37860 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728801AbfGAP0L (ORCPT ); Mon, 1 Jul 2019 11:26:11 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x61FQ9CS128106; Mon, 1 Jul 2019 10:26:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1561994769; bh=jcXacZRIDTZo39MNg8v9Tu/Km84xK4Bnbq2hxYScm9Q=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=J470NWPbU1ZEBpdR8mKY7ZkrweV0Ne3oLivJ0f61WeXphlWAwEPq0afNOgKUuDnRZ xbb4VP1jJIA49qWc6apwslGBRxJ+kPy9V1IQ/hDnvIx+kLUUVy46b+AtqTNUF0OFgm lyyTxkEsEIhLOmAhumeXe8fExPnlNDaC2g5+sDC0= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x61FQ9KF068675 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 1 Jul 2019 10:26:09 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 1 Jul 2019 10:26:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 1 Jul 2019 10:26:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x61FQ8VZ022373; Mon, 1 Jul 2019 10:26:08 -0500 From: Jean-Jacques Hiblot To: , , CC: , , , Jean-Jacques Hiblot Subject: [PATCH 2/2] leds: tlc591xx: Use the OF version of the LED registration function Date: Mon, 1 Jul 2019 17:26:02 +0200 Message-ID: <20190701152602.31716-3-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701152602.31716-1-jjhiblot@ti.com> References: <20190701152602.31716-1-jjhiblot@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver parses the device-tree to identify which LED should be handled. Since the information about the device node is known at this time, we can provide the LED core with it. It may be useful later. Signed-off-by: Jean-Jacques Hiblot --- drivers/leds/leds-tlc591xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c index 14e47ff44df5..6a2936c94b73 100644 --- a/drivers/leds/leds-tlc591xx.c +++ b/drivers/leds/leds-tlc591xx.c @@ -207,7 +207,7 @@ tlc591xx_probe(struct i2c_client *client, led->led_no = idx++; led->ldev.brightness_set_blocking = tlc591xx_brightness_set; led->ldev.max_brightness = LED_FULL; - err = devm_led_classdev_register(dev, &led->ldev); + err = devm_of_led_classdev_register(dev, child, &led->ldev); if (err < 0) { dev_err(dev, "couldn't register LED %s\n", led->ldev.name); -- 2.17.1