From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F787C3A5A2 for ; Tue, 10 Sep 2019 13:38:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77AF920863 for ; Tue, 10 Sep 2019 13:38:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hN4dTuYi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732797AbfIJNif (ORCPT ); Tue, 10 Sep 2019 09:38:35 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45590 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfIJNie (ORCPT ); Tue, 10 Sep 2019 09:38:34 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8ADcWBf109914; Tue, 10 Sep 2019 08:38:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568122712; bh=YVo6iYdWALs+Xpp42Wo9fNLJ3/ExYwL0sdWFDjBnzhg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hN4dTuYimJ8DhlcyIzLdo62tOV563GuW51gbUS8PITVh905RUmAvpVHKYh/RO0txG Sf/Pl4pf7wJqL0ToLQjgnCx3hZ/bzjAUIcCroKkLk79mCT3P/E3K6vJg4y5sSJGua3 EJODGWKyxfnwM5f/+tgMwClRQWXcToKC1uEWebSM= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8ADcWMY101041 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 10 Sep 2019 08:38:32 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 10 Sep 2019 08:38:31 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE110.ent.ti.com (10.64.6.31) 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; Tue, 10 Sep 2019 08:38:31 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8ADcVos119262; Tue, 10 Sep 2019 08:38:31 -0500 From: Jean-Jacques Hiblot To: , , CC: , , , Jean-Jacques Hiblot Subject: [RESEND,v2 2/2] leds: tlc591xx: Use the OF version of the LED registration function Date: Tue, 10 Sep 2019 15:38:14 +0200 Message-ID: <20190910133814.10275-3-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910133814.10275-1-jjhiblot@ti.com> References: <20190910133814.10275-1-jjhiblot@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@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 Reviewed-by: Tomi Valkeinen Acked-by: Pavel Machek --- 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 3d5a4b92f016..10764a62cb71 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 = reg; 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