Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2537954rdh; Sun, 29 Oct 2023 23:00:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZkGkol8JGZxoygzyRT513ohBjlxkNRtBz7QJQNwWKFOKd2D1XK7lHiIAYPkPEimWly5kh X-Received: by 2002:a17:902:ce92:b0:1ca:c490:8539 with SMTP id f18-20020a170902ce9200b001cac4908539mr7184743plg.18.1698645653012; Sun, 29 Oct 2023 23:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698645652; cv=none; d=google.com; s=arc-20160816; b=mF/EkP1CD/SdKSD/jl1qbMixBDUs6PJWYTDHCnLkI+xa4C28Vn5B5T9NbgYjFHleHI Q3zN7dtLjMfOlq9FnbsAXYc9TYZ0BUnj8eJq42WkewcncxbCDnmq0PYe0TnfLbiO3MU0 4ZGTHFzTk2HSheksMwUDKUJN0tviNH9m2OFTsBohHTI8l1HLTtQ8GzqU/WVoKS8ixFee Qu6qLHEu5CYMRATh6pKhpe2LBEJ9Lk4Jla/WKo+Hc/6uQvD+vyo/yjy7u53C73opUaih KTYNCPgOwgQqRvsF5KvhceeMxGmwM/TeTnt5ZW1fuLfSPohAQtEgGtawU0TMet69NmM2 hqDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3KW3m9oq89/kPkojPWA6yp2P/L9l2qqQNI6VZgs0Msg=; fh=cRoczc41n3dsmT8Sdpt/Y6rooZj9aOZUmUTDt5QRalM=; b=af75mGrLzqB04IDbADY15pAXCx8pi2flRrPilGOLkywAKUJYkZlHjryTti9uo51s0x zCgzKrWzHVZxXVKqoQ7PrR8lU1k6SLgpfCP+ZxUnaf65ni2vvozbAygWFtOmdTIDmW3o xFWhGZAV0QSYukhFHl+MhmTbkuumHllgXxSExzzgO73hl8x4GmmyhgAFsBg5PWRO4bix 1jgTVvI7I4S85hSV3qNd7qpDouwVHvxEko++ZJLCEi9KsUUlz05Exb5KMp9LNcJeN72Q HrywJPLLZJL44zVFRqJDOUmzrI/aLROwSw26B1QeWYMt/54mrFwC6gMdIsFZE/ZfMWZN ORCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bIL2SBlu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id d1-20020a170903230100b001c5da8b630fsi733241plh.421.2023.10.29.23.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 23:00:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bIL2SBlu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 43D7780A974F; Sun, 29 Oct 2023 23:00:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjJ3GAP (ORCPT + 99 others); Mon, 30 Oct 2023 02:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjJ3GAO (ORCPT ); Mon, 30 Oct 2023 02:00:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F574A9; Sun, 29 Oct 2023 23:00:12 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FD29C433C8; Mon, 30 Oct 2023 06:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698645611; bh=2dWKctULE0nUwSFKf+fpemu7Au9dBQgPNQGUtB0+MJE=; h=From:To:Cc:Subject:Date:From; b=bIL2SBlu5W7TGq+ak6JLjazdG6JBVr8GqaDnjj7qb2rHncgBe6GmoFFNl6A/yRwYH t1yzCK0sLYxVTwRfu6IWB9cxEPrwJ5b3g+OZUw+epaYYirGuj4oZonSinZJ+kpZZc/ C5OM/cenQ9VasGgdkbnXykAQgJwD6xtNKvksRaJBb1Gj/w+0w4x7R3zfFtMP5kqwaL pV+5iVxeVStenTJX1QByCHVAlbMG3rZMmxUz0kObEyLIFqVALWmWXlSaq3kZdWAhqr aoPWq1ldBCh1dZAdcd8a8QyI7LMReW0pqYrM+tPxDANOKXphc0gqvXopUAh436dxtL plKGe1MpyBBdQ== From: Jisheng Zhang To: Pavel Machek , Lee Jones Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] leds: Expand led_colors[] array Date: Mon, 30 Oct 2023 13:47:57 +0800 Message-Id: <20231030054757.3476-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 29 Oct 2023 23:00:43 -0700 (PDT) commit 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") expands LED_COLOR_ID definitions for dt-binding. However, it doesn't expand the led_colors[] array in leds core, so if any of the newly expaned LED_COLOR_ID definitions is used, the sysfs will emit null in the led's name color part. Let's expand the led_colors[] array too. Before the commit: /sys/class/leds # ls (null):indicator-0 After the commit: /sys/class/leds # ls orange:indicator-0 Signed-off-by: Jisheng Zhang --- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index 04f9ea675f2c..742595d923ee 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_IR] = "ir", [LED_COLOR_ID_MULTI] = "multicolor", [LED_COLOR_ID_RGB] = "rgb", + [LED_COLOR_ID_PURPLE] = "purple", + [LED_COLOR_ID_ORANGE] = "orange", + [LED_COLOR_ID_PINK] = "pink", + [LED_COLOR_ID_CYAN] = "cyan", + [LED_COLOR_ID_LIME] = "lime", }; EXPORT_SYMBOL_GPL(led_colors); -- 2.40.1