From patchwork Fri May 31 16:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13681909 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 407F717D896 for ; Fri, 31 May 2024 16:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717173223; cv=none; b=TiolVckeZMC0R+4p/iiAlQfxf3BEumudstCMB0+4QaEOqGjmiVNR8lLm2mKsQmH20J/dQaoKOI/JPKraXiN83EMuxx91q3sputnHG5XCm03ZJEZOhoPFwdJh0ghx4vQb2AUe00s38CkCqlPfm0+pEBGSAngd0appGHMz5kKk0sM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717173223; c=relaxed/simple; bh=6P/REFXkRfn4bWBytnGVypd3XVcWLfHX/2SwBqbZM9Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YoZRrdh9640q2ROZhaIuHIGd3fiO3USH5yNchVKXRKqJh/hncm1h0oDkLKKtQLyouijtM6wpRDQdveT+7RuqHtmnW6eyb8f4uVqBGW2DmLRLBjSeGPHSXgswgrh3uOJGjOa46LYNyitkmoiP5ZjdDY9+QBbjLSBQ8crzaMIb2V4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=YEQ6ODVG; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="YEQ6ODVG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1717173219; bh=6P/REFXkRfn4bWBytnGVypd3XVcWLfHX/2SwBqbZM9Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YEQ6ODVG2g70bMj47WPgcisRwtBaGQFnP3v2Uml2Cy82LqBpt8HdqykhnjvqLltDb p0fcQZFZmV5uh/j6+btGH8ARK7Yn31hogxbSyYAAfFJ29RulPHhLavjbgHLeG5nNcJ vQPteVPR2iLp98JUWjdg3A8YSuGl316+xqDaytf8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 31 May 2024 18:33:33 +0200 Subject: [PATCH v2 3/5] leds: core: Unexport led_colors[] array Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240531-cros_ec-led-v2-3-6cc34408b40d@weissschuh.net> References: <20240531-cros_ec-led-v2-0-6cc34408b40d@weissschuh.net> In-Reply-To: <20240531-cros_ec-led-v2-0-6cc34408b40d@weissschuh.net> To: Pavel Machek , Lee Jones , =?utf-8?q?Thoma?= =?utf-8?q?s_Wei=C3=9Fschuh?= , Benson Leung , Guenter Roeck , Tzung-Bi Shih Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, Dustin Howett , Mario Limonciello , =?utf-8?q?Thomas_Wei=C3=9Fs?= =?utf-8?q?chuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717173219; l=1434; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=6P/REFXkRfn4bWBytnGVypd3XVcWLfHX/2SwBqbZM9Y=; b=KgPBSTNMPiQRBdNPmlr2NPQyoeK81ZrR1G/EpJlPPAoyHUvUMqmQLYQFh+BGjRmm0lZl2TT03 TWsmqHGjsPdAVVyFdKqus3ybt2CR/OzuuTjN6yTMTzcvRBTNeM8+QI3 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= There are no external users left, make the array static. Signed-off-by: Thomas Weißschuh --- drivers/leds/led-core.c | 3 +-- drivers/leds/leds.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index e0dd2284e84a..f2cea4e094f6 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -25,7 +25,7 @@ EXPORT_SYMBOL_GPL(leds_list_lock); LIST_HEAD(leds_list); EXPORT_SYMBOL_GPL(leds_list); -const char * const led_colors[LED_COLOR_ID_MAX] = { +static const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_WHITE] = "white", [LED_COLOR_ID_RED] = "red", [LED_COLOR_ID_GREEN] = "green", @@ -42,7 +42,6 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_CYAN] = "cyan", [LED_COLOR_ID_LIME] = "lime", }; -EXPORT_SYMBOL_GPL(led_colors); static int __led_set_brightness(struct led_classdev *led_cdev, unsigned int value) { diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 1138e2ab82e5..d7999e7372a4 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -30,6 +30,5 @@ ssize_t led_trigger_write(struct file *filp, struct kobject *kobj, extern struct rw_semaphore leds_list_lock; extern struct list_head leds_list; -extern const char * const led_colors[LED_COLOR_ID_MAX]; #endif /* __LEDS_H_INCLUDED */