From patchwork Sun Apr 14 16:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92838C4345F for ; Sun, 14 Apr 2024 16:36:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A7131120D3; Sun, 14 Apr 2024 16:36:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kKfVuIO1"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id A747D1120D2 for ; Sun, 14 Apr 2024 16:36:31 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E79E0CE098D; Sun, 14 Apr 2024 16:36:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5E44C2BD10; Sun, 14 Apr 2024 16:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112589; bh=z5qAb/aZb4HJjU1nY0q3WFWS8153iumjRfnCENwhTpU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kKfVuIO1xTF9DBQQsqJ+6JFm4fxOw4LuXEUKEKd6tnfwwpnuRomxK+B9pljOtcD4v YouAYjf7moCi0CFFtrhb3alKwZwkbtZuG7Wx6wqy0TPxIgJmH/nWApc+HNtUr/L7Dm DGfuIEFxJy6TZHNc3KQ7WSgt7dC45P3ICGVdbeyeUhtSZhchR1cTxPHD/iZaRN4TqG 2UBEyPTWQJzYMAIZ5Gx+ZsPeIo4WdMs6AdoAGA/OjqUWUSnpH++t24Q8QjqL2jy2eI ftR1iiKx0JKuZMxHz9rIFaHdHCwq1CklG3WwNnCn3sacQ/3MtLyVf4GvyWcNg1KbjT qvx4Kayf1OkOQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:35:59 +0200 Subject: [PATCH 01/18] backlight: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-1-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2432; i=krzk@kernel.org; h=from:subject:message-id; bh=z5qAb/aZb4HJjU1nY0q3WFWS8153iumjRfnCENwhTpU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAXz9nDuruVnQoZBQ+0fvh2Ilb98JS2983g+e dDhNnweDlKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF8wAKCRDBN2bmhouD 1zUHD/9QO+vhmEA35mCEGjhMycJkhHR2vbsqoQiS9B393cyyor52W46seZkdDRv18gL3cbFaDq2 GCW5CEXQE9OJa0LEsHI7ykKwU3SqAfxAxKCN0YhqB5slN79oYKV6KRlmhG8nWYjYcXFV1oPHiI9 BJhILiYxFy6vem5nw57qJrey+rFLPDTFHkHEQkOzxwzd1unlOXoRcfoytgRIKAWu9rVk41JsCtJ 7KxGDdzDvu58gU1auOAVNqsi8YWioXvHM19X6iz6H01pcLhyLh2WGqX+yj57jExX6ZD++m5WiTM 2hekdsNXZFjUdKYwuCRBzFtXUNE9KTFrwBThUGXnqzOm5FGTRRGWm6FwdE11Me9AKw8BMP2/o8h YFIYnVZfsXpKKRBKHJQcxnNNMitFUTMCTPOo09tw7DR2AyD2Fe4uOeXwydRKcy7gq2F+elUUk9g OJzlWh6xG3J3JudxnCnlhoUm1KJuaC2EtnDvNAwrexCvb6vM30L57uJJ+FkG7VVQqh6ateR6Imb +ZDLnIWcXbCvG2yzKPCJaxult4EwJcoaGxtqter5TE2qQwH9fzTnL2ZvT2Ys7S5WpH2jxzyzGi9 mJhk+x5ZEBYBSTkV8K+fcR892HowQF0f4HBC+KM9bRlaDZaymgrH6pVnmKj5BDTzXV+tvOY4wYD 7R7nFE7ZkRksu7g== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' passed in lcd_device_register() is not modified by core backlight code, so it can be made const for code safety. This allows drivers to also define the structure as const. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/lcd.c | 4 ++-- include/linux/lcd.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index ba4771cbd781..ceec90ca758b 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -191,7 +191,7 @@ static const struct class lcd_class = { * or a pointer to the newly allocated device. */ struct lcd_device *lcd_device_register(const char *name, struct device *parent, - void *devdata, struct lcd_ops *ops) + void *devdata, const struct lcd_ops *ops) { struct lcd_device *new_ld; int rc; @@ -279,7 +279,7 @@ static int devm_lcd_device_match(struct device *dev, void *res, void *data) */ struct lcd_device *devm_lcd_device_register(struct device *dev, const char *name, struct device *parent, - void *devdata, struct lcd_ops *ops) + void *devdata, const struct lcd_ops *ops) { struct lcd_device **ptr, *lcd; diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 238fb1dfed98..68703a51dc53 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -61,7 +61,7 @@ struct lcd_device { points to something in the body of that driver, it is also invalid. */ struct mutex ops_lock; /* If this is NULL, the backing module is unloaded */ - struct lcd_ops *ops; + const struct lcd_ops *ops; /* Serialise access to set_power method */ struct mutex update_lock; /* The framebuffer notifier block */ @@ -102,10 +102,10 @@ static inline void lcd_set_power(struct lcd_device *ld, int power) } extern struct lcd_device *lcd_device_register(const char *name, - struct device *parent, void *devdata, struct lcd_ops *ops); + struct device *parent, void *devdata, const struct lcd_ops *ops); extern struct lcd_device *devm_lcd_device_register(struct device *dev, const char *name, struct device *parent, - void *devdata, struct lcd_ops *ops); + void *devdata, const struct lcd_ops *ops); extern void lcd_device_unregister(struct lcd_device *ld); extern void devm_lcd_device_unregister(struct device *dev, struct lcd_device *ld); From patchwork Sun Apr 14 16:36:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629094 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2798C4345F for ; Sun, 14 Apr 2024 16:36:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5F771120DA; Sun, 14 Apr 2024 16:36:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="sfLqAmbA"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id E91881120D2 for ; Sun, 14 Apr 2024 16:36:35 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 367F160B32; Sun, 14 Apr 2024 16:36:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FE32C072AA; Sun, 14 Apr 2024 16:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112594; bh=locImdr60u+fZ7AOjuj08IprumN1nXoXaa2rUh5Ga3U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sfLqAmbAeMWEejUh5U41VGNkb9k1Q2YKtH3wqONu820BgHz3Citcg4Lwk9GGBuh/X HUMBPoNR1NIoC6GSmdcMeAvaGxxW/r9T65EtmX8XP0dPhSxhh4EABaPZV1Q/ODLZfA 7n2K/hCcDFks100ZjS9jTg2Ou5p1YlI2uyJKXBeeIxPLl6ygrGj3t5B7jzCnd89SpO bo8cuqwPKNUG1GeZikAtAlrMsTxlqjZKt5jNyCjgQ50SrYffh9UMTZn5GxUUxfECyc LmEhJP+P5pdwCPtq2fT3eO/olFcRNqTq9wExYTcdvbc3qk9G+qZ1gQklK6vpDwXaZ9 wUQRlQ0f9/1wA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:00 +0200 Subject: [PATCH 02/18] backlight: ams369fg06: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-2-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=791; i=krzk@kernel.org; h=from:subject:message-id; bh=locImdr60u+fZ7AOjuj08IprumN1nXoXaa2rUh5Ga3U=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX0G//dPGlem1jcu7wyCWx2iECQwgsLjz+Yj iMRFiGfU3qJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF9AAKCRDBN2bmhouD 13J0D/408JzyMPbhs0Mw1cq11iv6utAIyFxvBEUQbR2XuwCHtfstnxZOfqjhMAFI8QtQAyQmIx1 RiXksGCaiUiokpVQHOJc6zvFll5pBn4RGyqgxPVCwlFlNPLoPnTvoYym3Z4VgjH1xupmLDYz6/D sUeFZwRwRiamVTRzBZ/7TJMqVxuweEmqFnY5HfaVPGJLMq1BSiK5mnfZpEiI92z/2lvtXj9AScj GEnyaoug1JyqbSjUWERCNKkPkNs9+8f3nbVH2fhJgrxCgakLdT3PrPrdftFzqWwaoIIxF9n9br7 dPNhvfVAsqKaS4IMLmLVSs5imuZnr6tc62bnMNazLwENfgzxqKb8M9DI8mhr+qDsc7Uv9foYoHT HyRPXMUNxAPD6A9veDNODkDHJfm4ocmf4+Zx2WZ25sQ8pqPEFFY0tiYdsd2cYySpNqOoTSYetWr /wRI/hWv2i1eFEdtQWXlEP/TLN52GZKpL2YlwkEw9VasadFOhyY4JBI3WknQAufASV9HbQGOqxn Kjpxg/uj/dg8HhL3Qr5YTepKONcZXy9psyRKi286V1JEPU2JrqYhNgyUK669XCTZDlbhoDW5pZ0 sRFKUX7DMdzrivAvdrVVwC568IterSQNqoY1cKuos++QJ7JeEkV5Ir2hXYbQh4xm9+seQ1ohSN+ BdTYNwNnz7HvOyA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/ams369fg06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 522dd81110b8..57ec205d2bd2 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c @@ -427,7 +427,7 @@ static int ams369fg06_set_brightness(struct backlight_device *bd) return ret; } -static struct lcd_ops ams369fg06_lcd_ops = { +static const struct lcd_ops ams369fg06_lcd_ops = { .get_power = ams369fg06_get_power, .set_power = ams369fg06_set_power, }; From patchwork Sun Apr 14 16:36:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91527C001CC for ; Sun, 14 Apr 2024 16:36:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B14791120D9; Sun, 14 Apr 2024 16:36:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="TbTGLCjj"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id E98161120D9 for ; Sun, 14 Apr 2024 16:36:42 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E4BF5CE098D; Sun, 14 Apr 2024 16:36:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7325C072AA; Sun, 14 Apr 2024 16:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112600; bh=gNtUfvCnP/vl7s5KxA50YOmfMZHPc2iETBnBx689Xlk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TbTGLCjjbbtXtfADwb55S9EaehmpaoPrlTjFT+954V5u9bdJ/h6DS2YNuHE+L4HJy O26tuJJ7TpiWFegurP8jp2NoDibbPLNpXYcFTVNLOWIzO0CWBXIPgCc1QEr52oo3CL 3nrKPNTygVyi7kJI78oi62UgoOGda91Gj9JYBZ2pLZCFsA4M6XDfeNPr7s6JcYZdQl Cu+/aJkFNwJ8REl28ddt6v6bzg9UrA20Rs+N6DSkrtq8GSWBUa0zqLuS+XjMiev9hG Y/SMtxrfda5RDX7vSMICilsyB1x9SPrqTM/M4z75BJzWRJTTw8FehH7ngKxSItFonP pN1dSHYCR89Ow== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:01 +0200 Subject: [PATCH 03/18] backlight: corgi_lcd: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-3-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=799; i=krzk@kernel.org; h=from:subject:message-id; bh=gNtUfvCnP/vl7s5KxA50YOmfMZHPc2iETBnBx689Xlk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX13JqTXbFfVWGaVYWEZN4voLC7kmZ82Ga6t 7wnw09Gkf2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF9QAKCRDBN2bmhouD 15rdEACLc9kX95QP2hUV2UVUQ48Lmy/qgA2/kFP76bgDcHdSo5tYR9kMpPEMMOirRh4Clj8OjwD NcGbx3ymYmUwsXI13fpz3aiy9zqeQ3WXl8rLemR6d+5DJRgTca042Q89noEbL+sKmY0TQDwJ3gB +dyKThZwfzhNeHFu03dslmx+yss7EZO2O1x9T/p7r90dJ0aifSlrtgmyUsj529WpT2b0rKJH2+3 P+M1GTTO2ZqLppKVEJEbZiU7L+gLALH2oCj7Vy5aN4yqM/TGcHrLbEMpg4hQed0FqImV72oQ8zY PwV4k8LglNj4znjJ2P0KmINgTbsWzN4s4muFKsCQUHv6AIEwxw20B2TLFV0BAL5GEduigoYrIee cpDziLJmImL5wspjy7YPhVEd7zyZwqY70bi647jAlIowzvh5Gmb6HtaQOgFbhCJ6mkW54azFsHi eoYIjbsHHI8UtUssrYKKihLAK6DFHNNhpt9sjreBunbDCfKsJTcZv8uouuAy70A89Q+/qz2aJlb dJLDgXfrLStk4ccl0Hq3n2D4T8srrjIOMknxKOkFg7QPPO09bpLDE2mhBsrpQ42OD9Zo+oKWyT9 By5m1ck8gTQEfIqVAboDKMgvkMdOfrO+1buAvtLovHGFEOFoJOtjKSDBvLnhYTdVWDqf7do/fEd 2/E/Q/qK0X4c1tQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/corgi_lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index dd765098ad98..aad1680c9075 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -380,7 +380,7 @@ static int corgi_lcd_get_power(struct lcd_device *ld) return lcd->power; } -static struct lcd_ops corgi_lcd_ops = { +static const struct lcd_ops corgi_lcd_ops = { .get_power = corgi_lcd_get_power, .set_power = corgi_lcd_set_power, .set_mode = corgi_lcd_set_mode, From patchwork Sun Apr 14 16:36:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629096 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CCB7C04FFE for ; Sun, 14 Apr 2024 16:36:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A363B1120D8; Sun, 14 Apr 2024 16:36:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="h86mwFjK"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 533401120DC for ; Sun, 14 Apr 2024 16:36:47 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9993FCE0990; Sun, 14 Apr 2024 16:36:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A06E5C32783; Sun, 14 Apr 2024 16:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112604; bh=88cr00ugVAy6jT3uweB13pEg01tQBkHxONaOOrvSJr4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=h86mwFjKHmZcRJ9ZSaE72bZDjmGP52SPWemcrGuyOPu4blsNFLlbsilJdmbv7IS+L AqJj+Et8N6sDUgvX751ehcr8xD594u7A2K5d5FAT36+g1OvzzquTPpY0B89H4D3mgt kBOmhsKJDlAAi6TglfS8tnR5rFtTPzVe1cexRlT7pZI1m1nSpvznRwqbXIBtxRRvjr Ei6K/P891ntD9fS03jCK1x2xBnDpt0yfRjfxWy0RvuP4o9uIzazEcsMpzi8NOzF3eF fgVaYp0Ge1EgDGabx+yNXuhaTVsaD+z1T65hbOGBOOKZ+BMxBLCtXcwnMR51EGUBj+ V/UE8uJGVbIsw== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:02 +0200 Subject: [PATCH 04/18] backlight: hx8357: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-4-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=742; i=krzk@kernel.org; h=from:subject:message-id; bh=88cr00ugVAy6jT3uweB13pEg01tQBkHxONaOOrvSJr4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX2M38hZGStBZtwBXfjnULAK0J4hB8k+kZwy ZsNXzIQjE+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF9gAKCRDBN2bmhouD 1236EACUAKGm9Y/BnFg+tXVFYTF6OHukRnl8sbwA5jbZqziu8R90NGD9vH5/fsmWeXKvHarT2bB RNv0WZNTrP/TjXEEhQ0/nU/Pc0GF0GMn1UiYaPyPUmGFfJ4+WAZY4bNHtYuLm172FWkTAiTpvDZ zS76L2OEwVRT7pYaxzu/0d0zm7hCznV2WONMZW0UDJbnaoAxg7/y8qZdrhVbRU5Un+a4hq3aqeu U78hYryAXf3odENjH77BfUcFixxb0Fyp/UW4cvUtX2HmOqpNI18jhe6FpPFEB8B3X4/tI8oDQtE bw4HWSqgCXQD6xU64UOkwa+lUSG3ToBhMqiPQBMP7TGQnSLBfEmijhhhFAsVGpxK3rlOSMS0PGY mI2/y7ss0GH0W230fRUkqrHH3OLZRRS/6bi/c0tw7TnE9M65q3j7ttx0jiniRgXfcsVe1X0AEIZ ts4i7aimrPmUbLLY8kqMV6d4E/rmNpuKWyKuP8Sp32tU2Dg1MRr+23Bvngr5e4jKYeitwwudFvq 2SNxdbwfSvjbGIzJWvPugy0VFRHuGEDP64/odcsJSvFPGDzD9BfI8ybMB5xaa3SoxEhb0pmXRIR C3pIG2xbvOZwnQePbIsOEfI6X3NZqYFnFfcv1LYO90FOETOwmlyw2XpUTN0iXt6rht/J4z1UQug k1627LcFZ0WbtQQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/hx8357.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index 339d9128fbde..cdd7b7686723 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -559,7 +559,7 @@ static int hx8357_get_power(struct lcd_device *lcdev) return lcd->state; } -static struct lcd_ops hx8357_ops = { +static const struct lcd_ops hx8357_ops = { .set_power = hx8357_set_power, .get_power = hx8357_get_power, }; From patchwork Sun Apr 14 16:36:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CD70C4345F for ; Sun, 14 Apr 2024 16:36:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1533D1120DC; Sun, 14 Apr 2024 16:36:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="EK5HXlNs"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7A981120DC for ; Sun, 14 Apr 2024 16:36:52 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C1436CE09CD; Sun, 14 Apr 2024 16:36:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 445A3C2BD10; Sun, 14 Apr 2024 16:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112610; bh=hnKa56uMP1uBuqcYlrLCoROyDjHVEOMKzsZF5kAUvag=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EK5HXlNsWOmG45NXxmpqfEyacm9qOKTm+qh4cjvBjAjuwL56zzZB953sTj0xGM+mr wK1+i83da3/zSyqHOF36apUEV9dcctQ34H5lgvXYZ57u86M2CiTBZJcHXs++xAY1mK bVrMpvgp1i/QrcqycvCYDxxa84P+9+gghc4ncfC9E3bInYoJqXjJcbkMGWIxl2TOmH 4pwDaTtI5FmlbauYgmrL8wT7c8bX3ZfWcggNwC9XL+P7rh+0oeNCghaTWCz3GqcR4f DE22/rgK7p57sdJEdHG2kVBCEsyCUcGqTPgjcbKRrFUGfPeKpgOxXZ9V/K6aoWNchS ++g69M6gW+g/g== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:03 +0200 Subject: [PATCH 05/18] backlight: ili922x: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-5-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=749; i=krzk@kernel.org; h=from:subject:message-id; bh=hnKa56uMP1uBuqcYlrLCoROyDjHVEOMKzsZF5kAUvag=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX3qsL8Hzg65pI/n33WGw1cOHusS9qLWrvz2 9ysY0cPEgaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF9wAKCRDBN2bmhouD 153UD/46OO0GE9u+PnAEwY2y//MxFK/BvQjDKIdN5VeJAxZsJBdtVmM7ek4ABnR9x/8q76Xk2fc CEj8VRjGDVJlljjwgajs9mNYJf7ny7+/RR+HDlcdCJu8QsoFIPcci1SR6QOgDXd2Mjg2AVlEfMM 36fuYootU1898/VrCemeiu/BG1eNfk5OHCpQMDaXLSIdkYb576YfHrKcBsrKfDuJirG/gbuXO0P aucq6fITr+Cro/vn7Yluir5g0rE75cNzpZgzaefkADukmZTR/XqcrD57cIsOvjchneaxGmuzDxr pKgIr4j2KFBXovrz6aoII9pjENXjr1LJ5OAhAkWZw4aeNhme0euPqJbf9X6E0JjSpdSpl4e3+ku PMk12pFjqyC2fNwude2R47V/YqXx8l+a2Ie7QmUDWNZTP5kl5S8H8BNZsgb4MlHBW7cr7ccRDen DFCxXQDetnr1lF8vZDZc/oeRfcmBijltAlpPccnyMnyTeGNy+CJJ0fKn78dArOUai5QqUuAwKMF MmTi92oynvX5UTLwvBMb4GIuTkWGvTZpxS24k8N8V6+PB9Xl+ACz1ZuiXR9OHp8QGRDYfDQlrmU v9PIeNQTPxUUpYkJK6rPfHLk893dCLP06sDEx+ROtOzZpG05SML31DQBFAcJ8UI51ClNVr/d9yT p3dT5FwBG/kXSPQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/ili922x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c index c8e0e655dc86..7683e209ad6b 100644 --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -472,7 +472,7 @@ static int ili922x_get_power(struct lcd_device *ld) return ili->power; } -static struct lcd_ops ili922x_ops = { +static const struct lcd_ops ili922x_ops = { .get_power = ili922x_get_power, .set_power = ili922x_set_power, }; From patchwork Sun Apr 14 16:36:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D57EDC04FFE for ; Sun, 14 Apr 2024 16:37:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AF9C1120E0; Sun, 14 Apr 2024 16:37:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="vJns8/57"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id D47091120DC for ; Sun, 14 Apr 2024 16:36:55 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 315E560B99; Sun, 14 Apr 2024 16:36:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 815F0C32783; Sun, 14 Apr 2024 16:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112614; bh=FAuYOIrTLgKRaRcSRARSU7zwjltAT4O+9HdDJwuD8ag=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=vJns8/57ERxdLuquGGs0ZVc2oUuWC2VralonWNd8YTD/YSVwkzSxsOTfINZj89z1Z /Qscc/gpKeaqB5ZdK614E1pgQZk0p/hu5FQd82puJyxY9qiX0sM8Wfl6vzhnz7cO8t BVoYeHeMeFQwC9GtHROIOGGxhcEZj/KkCEXKPljOagTpfxYZghk+cGNYOI6+wNVVCq tGKkw3pI58jtcC+A6nbn/ksup4vqfnxbuam5Ye+UCIbMP/6+lm+Ux9wom7gr5WW4Vc prJuv/SNZ3B4gy+KahcEmdggcRzy+9U+e+507dmVkWDichrh2s1nMP+sRzv/bYYiO1 yrimmWk+jVJ4Q== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:04 +0200 Subject: [PATCH 06/18] backlight: ili9320: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-6-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=749; i=krzk@kernel.org; h=from:subject:message-id; bh=FAuYOIrTLgKRaRcSRARSU7zwjltAT4O+9HdDJwuD8ag=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX4uTf50/e5WzpwRZXFIhHsruOa+96lTtLda uXa+GcN/E2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF+AAKCRDBN2bmhouD 1+OVD/0THs/Cz2UP+kdGP9h4rjM0ye8ChOEfbSBRSP5rdKoTYcydrMRVV/GuKPWw9mfpjY5ZHUy ub+uUBXwv4cdy+KU3N756O2qBkgxVYKz/tQ4rGC4isAHbmUppPN3Y6ICwX5fyXRbgdsCrk5otKg LkpoM4bBVzr2Hv88ZDEqAyOkhenTjlhddmzjjKQsoAt6VBWn0UEWZlbA88zKjFUOnZ2dENdFf5Y RhUbb+OqhyM5mqyXZ9gHDVpuxtwV34kAHEGzPq7G5w4I6GOcZTO0Hv9Xpj/M4tFxEqgZ+yDM4t/ eHlRpc6WCoU9fkqatFxThhvYM6Y0FnLDPvn3HJ/fj+LXbsYKMHKtUM9IGWL9OeIhb2o+BG7o6F2 V3AFljgHqYvqzm1w3sNhQ9BwRscfGho9HM6jOxYkWzOTd0WiVXgKGVWFqZQ1KcgJ/u0aqV9J3lM 6wQHTK64pPF4PjC9ZGT8ZoArU5koJ7hIP7hQ1Ug6PMkQmWWroGdFcQLPEMHxNbcaar9NFOBPdzm XbI/jVXQa1n3TUQVYkdkhcGvqN5sYOJmGrYz1GOKfpddMuOlYTv9DKGj6HDIllJ+3+3cCzSz8b2 7yYcGNtvqUoZD4QdQrpAANp9eIyFK1MmQ+4qGocUqx9jMot5LVhgVXDur1JX0sLShdC7Xjp8ol6 yAosqP5p7RW+PBQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/ili9320.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/ili9320.c b/drivers/video/backlight/ili9320.c index 2acd2708f8ca..3e318d1891b6 100644 --- a/drivers/video/backlight/ili9320.c +++ b/drivers/video/backlight/ili9320.c @@ -161,7 +161,7 @@ static int ili9320_get_power(struct lcd_device *ld) return lcd->power; } -static struct lcd_ops ili9320_ops = { +static const struct lcd_ops ili9320_ops = { .get_power = ili9320_get_power, .set_power = ili9320_set_power, }; From patchwork Sun Apr 14 16:36:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629098 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56FEEC4345F for ; Sun, 14 Apr 2024 16:37:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 438BE1120E1; Sun, 14 Apr 2024 16:37:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="MeMMU6FS"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 573801120E0 for ; Sun, 14 Apr 2024 16:37:00 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CBE3960B90; Sun, 14 Apr 2024 16:36:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59CC6C072AA; Sun, 14 Apr 2024 16:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112619; bh=HN87+bnoUJAL7IlBvGeQL/RoDv/OEH0jaRmwzfxf1dE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MeMMU6FSWb5n9hNOQtljIiPMUHxLdVnXIpHcQ4mQCb31wxCOn9vrYkInsVSxQE0mb gl038qVp8k8ni2CNLHitrFBhVHBp+LtvMIxuNb3g9AjojaFfQ+PxAAqntAfCOxe4Yd eIj6ZOcImHweaGNDvMiQjdk1P6Sfaa7nRLBCR77KPQjKBZNeeE7E1ca9PKcotu6ukc 92vMmGiFwnoyV06M76Srj6SWlIJxVj7udTRTCoWxJdjNJ13i1qJ02PiAGWXbFENwMu Y75c8lsxHLp1uZx42iuFm58w4RROfcX0sryFUTdOkoi0MPIblE/xZd5qpuAqJ+ouBj 2SLbOp4UINhvA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:05 +0200 Subject: [PATCH 07/18] backlight: jornada720_lcd: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-7-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=854; i=krzk@kernel.org; h=from:subject:message-id; bh=HN87+bnoUJAL7IlBvGeQL/RoDv/OEH0jaRmwzfxf1dE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX4+63bobZ341icw3RoZcjAGHReGX0i9wIJi qxC8XxXwnWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF+AAKCRDBN2bmhouD 1zvbD/9P5ixNHRF0z3le1iebM0IUN0QqF+OrzIxIRFZoqMeu2/JoSwNGddITeLUBxA5QZRhHi/p 3pFJ6EbfJSae0rkUBvdNSER6Neaps4CeZP9av8utY5eHUO3G91ZdWokBHQXZ55Xhln83bOcxrSn dS2cvlRKH7spY4rdjwlGmGtIKZ6nlFGlKMZDExhqTkUkeAtv1xjp2aNUZ/NZTFcCJAzgzit1qdW nQAv2uio+RomHmQ9Hv/0AAL6QJb3K4CocFzc8n2RsJykmxUpwNUG4tGg/42faBH3b5HhvuRqdMj EB0oQsozQvsDD0LE6MoLg3/C1slaRuQqnMoavQtwEnfmBmpcDY5vEGcuoKii3erxv6snscGS0sN nR6lC9ea5D2GtetOkaa3+Ab8W6jWMS+Xb+VXG7PoGk+ZJhisqFiif6ndt1VbYSx1xDYP9RsPW8P QK0tMYmHdcMxARGDIaPERSTRN8Nc+oI4syOqUilqP/+fneEl21+SL36hcNIz1THLP+sJU68b9Mp TfQN8SU5d7zfRG2VVfjfbGSMFDmMloHeWXOAWMgVwaddilpFBA1ErnAFX5OgWrTQJ5WiWZfFuuK R/QRB6NucER1+0LB/Jdhq1oipAvXjFy9RrBS1+ZIvqllxNaASIDvDiB46KsUkLXTWaVexkOmOEw +vwRwZY7f9hRXZA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/jornada720_lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c index 6796a7c2db25..5c64fa61e810 100644 --- a/drivers/video/backlight/jornada720_lcd.c +++ b/drivers/video/backlight/jornada720_lcd.c @@ -81,7 +81,7 @@ static int jornada_lcd_set_power(struct lcd_device *ld, int power) return 0; } -static struct lcd_ops jornada_lcd_props = { +static const struct lcd_ops jornada_lcd_props = { .get_contrast = jornada_lcd_get_contrast, .set_contrast = jornada_lcd_set_contrast, .get_power = jornada_lcd_get_power, From patchwork Sun Apr 14 16:36:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CBD6C04FFE for ; Sun, 14 Apr 2024 16:37:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 736711120E4; Sun, 14 Apr 2024 16:37:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WOOC5Ont"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8043A1120E4 for ; Sun, 14 Apr 2024 16:37:05 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E2CC060B2C; Sun, 14 Apr 2024 16:37:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 161F9C2BD10; Sun, 14 Apr 2024 16:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112624; bh=YPzrDayne4RsVvwgv+6Amz6T/hPNpbOfbV29tRkK+J4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WOOC5Ont5LDbeveY1rWMpV/B4eo9u0qhC0DiseQeuSnr9mS8HWXEzcrg1yM/zwJ8A Hp2yOH03ZGLwy0Awwa2cgdCCuNrzMft8pSKHZP7FEdDqAw3PC9BYMoaTEqYSSzds7I Csc3BozrAJ5tS5Sip69P2PzL8pBLR/yEMHyZiDg5/OTFR7zTZH/duuDoj512vRGQNy 9QKOZwobNyXmCePZ8GfDT9YZuWjh24wC2dlZph/pSq1UW6LKMpcCiE516LxO54QYxm qBBh1hvllwVI/L4mv6b+JSJy7/TI5k4gkjPq+XzO0+dk8YBxd2ZPIX05urVQUZ15ud iogfjO/gVHqnQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:06 +0200 Subject: [PATCH 08/18] backlight: l4f00242t03: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-8-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=787; i=krzk@kernel.org; h=from:subject:message-id; bh=YPzrDayne4RsVvwgv+6Amz6T/hPNpbOfbV29tRkK+J4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX5+G2r4LHJsJWz/AdfA9TXepPdHYib8tDLf NkIDcO22GqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF+QAKCRDBN2bmhouD 1/LKD/9VWjfNPWPT125xSZyzNAAkWwa1XpfFmw9kMbYwZXaaL+DSmFpJSbBGFn7KSp3nyDQLlmy YKCulZJMLmFMcQ0XQyTTZnlTLS/TxrjKqbi55mGJ6IOKwqDnqyekHpcZgrVGyyuZBbV9ibilzUU BsCB20lUn1qXZ3Igk+phQmEv1OzfhQN6V44uoAmiTj/IW0o28iNW6G2SWBX3b4HiLhv6vquqHAI 6u5++V1d3TNqBs4nWy95JdchIqVAd5u+EgCC+3M//c/AbLNdJ7nQlqZ9oE31cuAhLovB6VL5Lke iQJD6pUfLs5UUVJCZowUbHjunADEgAY29AInndLpn9S8VmyoWWCC33v4c2SMLajz/3pxEpxm3If 7ApIB+KRFZ+21zt0uDxchqnEEd5FVIM+ulxi7HSiTjgjLeN5DBGPlSFjNm6QllGQFZ+1q2caMMZ eZcZPhfSv38aAGie8sgrrtPUQt6NrtcFcEeulKnJN5+ldxEAz1ogGj+ccbdYiRWejGXpAgk2OC0 QTypNgYJo38zrZqNBKem8jWkwNRvA288D6tYXj3PnCAPobUkWxc3cvCq2pue9v9XlgZ5/NsOHtP z2d1pTDtY25H/5J5/FJVj8+tSA6Fnc2U2SG3kkc7dgMaVVzX8XH595u7m9SV+Sj+MjfqfH1jLE3 dISSCZSKXV0lKmA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/l4f00242t03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index bd5137ee203b..dd0874f8c7ff 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -158,7 +158,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power) return 0; } -static struct lcd_ops l4f_ops = { +static const struct lcd_ops l4f_ops = { .set_power = l4f00242t03_lcd_power_set, .get_power = l4f00242t03_lcd_power_get, }; From patchwork Sun Apr 14 16:36:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FA4AC4345F for ; Sun, 14 Apr 2024 16:37:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DF971120E6; Sun, 14 Apr 2024 16:37:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="aZFXhqSP"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAA731120E7 for ; Sun, 14 Apr 2024 16:37:10 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5B11E60B76; Sun, 14 Apr 2024 16:37:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11E3DC32781; Sun, 14 Apr 2024 16:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112630; bh=9PRZuiekkNAzSDYyoMZolLynAx4ZVZkWrGnRjQUFxGs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aZFXhqSPvWeMNSNEVK9jBbYhQ7/ykvMFtmh8/7WmkWx0+6GNP7uebu5rSk4PWLfoj RHVs4NrbmE5tCebdyZdYFveBZYYX2LUdbRtTcFuY21icrXMKwjASVe3mWS/JH0EZtV p3N5LlJNzfpEPTVWKQAgmD3hX0gsLx2i2tXaH4csVONm4a7wro31zYqQwYxk0gk/ra zHivWsWzhlcg4O7PoVKguZGY15Ww9SU5+xKQQFhba1gWLCRZqoQ3LxlaerjgfcmFo0 sIQ49WPX5rlDcD+/3PdRc9iu7riUSxZXBg1KyHNaob8x3Bf3kQv3al0gZOF4h9bTX+ K8zT5mleX93kg== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:07 +0200 Subject: [PATCH 09/18] backlight: lms283gf05: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-9-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=751; i=krzk@kernel.org; h=from:subject:message-id; bh=9PRZuiekkNAzSDYyoMZolLynAx4ZVZkWrGnRjQUFxGs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX6j4+WaJabKOvGPBFAtq2KJPij4u46ouLft qSZwwZ1hNGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF+gAKCRDBN2bmhouD 13d3D/9w2H/c5pLxf94a+fGMQ1bPE6N27j2pCNIEUqOC+F4vkeQ+i4wYIYo+YnnRQRO4SIu6yOi tHS7F88R3e+IZudxqHl81/GbHe1xEG84UQVQqNy+qWg8Zu6aXYjEG6j1PikWqL1UJyF7vNMiT2/ 0+tOIti9JxEnMVhfZMHEg47MKVTb54DCTnDEwFGyDFq3LfGHNeCeiNsm37sPpjUwaK+fjgVDBFc a0jfsziAVSDDXG4fDIXFwQ/tqZcwakUTMecwPjIl5GSOYeifbNqK6A9Q19lzrTEW/rc2LS/mjvE OQtoUxMwDBK3Y+kRt/9QQb/memcRLxDqHQgYdiwQdUqtMKP5npFAP+NLKOqmHIR5MXwSB4Qbf8r 7YgvtgvoyPXnUYSMnnLdY+YrbtO0KTM3pCa1osg3kyT1elsIKNeotXFaPZqBVNqG82UP5mq/VFZ PQrzPuAe2RfiQS6RSfTZjltN5Jf9A4+FN1r5HdEbQETnRqKEsfVMRQ+iHqUmpKd0CngN0y5BxNb 4k8/OsHgixwXe2sAqfsQ4ZL3LmVWF8bwFprBqfj5YFQzkei3OXkgaB5QBp0OOb+kYRksBpKL+MH 3jKD8W9plUIOBDI197y66/UMAyEa/uwsgNGWXGt8VtESBKvnTISYWzyJzbJR/09xqZ2xlnRhAsa F42j8B1JczV9iww== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/lms283gf05.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index 36856962ed83..a65490e83d3d 100644 --- a/drivers/video/backlight/lms283gf05.c +++ b/drivers/video/backlight/lms283gf05.c @@ -139,7 +139,7 @@ static int lms283gf05_power_set(struct lcd_device *ld, int power) return 0; } -static struct lcd_ops lms_ops = { +static const struct lcd_ops lms_ops = { .set_power = lms283gf05_power_set, .get_power = NULL, }; From patchwork Sun Apr 14 16:36:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D245C4345F for ; Sun, 14 Apr 2024 16:37:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 228DE1120E5; Sun, 14 Apr 2024 16:37:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="adfu4CSE"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9695A1120E6 for ; Sun, 14 Apr 2024 16:37:15 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 163FC60B2C; Sun, 14 Apr 2024 16:37:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2548C072AA; Sun, 14 Apr 2024 16:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112634; bh=usQ+7RLGSrfvZ4Uc8oRh0XRypcsevdJ9gNL16CX2QCM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=adfu4CSE4wZoiQtjjxEG8lx3swCraVR9aNGBbOFneSiUvNIlK1iihctdNVjYhhA+I Ix1Y+p0A4RtqiXdiNzbg7Rd2PS53TCPV0ZXPfPnM9SuqdQS6wFPJ259P9qDgUqkKzV iDlGfx2mZ2/3D+JJP4jCFSSvCR/aNpwYnxwPf4HvxMhwRz55ZbB6nuPmfhYfaDewQR m4CufNNYCTYUg2xfF+94HnmSqlY61e/uQgUnuw4AK2TKEJjJ89QwjFFM8SGHHoi0PC jn/kPVoG15kXn9lOtrn5GvXr6EuYIimAt2zpnj4r7KBVMM5qKUqaNTjfeY5Gvdx2CT 97GvXcGUF6oLw== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:08 +0200 Subject: [PATCH 10/18] backlight: lms501kf03: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-10-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=816; i=krzk@kernel.org; h=from:subject:message-id; bh=usQ+7RLGSrfvZ4Uc8oRh0XRypcsevdJ9gNL16CX2QCM=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX7FpzuMjvna8Y31zY0lIuxkts9wlMdSq0t0 7hivN2rfQKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF+wAKCRDBN2bmhouD 1yFDD/4kuHtI7okgawLZYg49MQ9QNb0rJPtMTrHPxA3noOeBmJdpgvme/nc8w8UnvjPflwmfzyu ZMiKj3sd6Tsuil8yYpgvSGIPXhtqXAiQRNDu4xg384bAMJq7iTRFOUzXhrNGn8b+vAliVl77AL3 pLUWOsESv4207ssMlr5pxVOfaZMerWiZtnVe2cWB6n9B+Oytrrbn4xnzXT4ncWARYq2Jrp8AQ4k jsaUnhjPyOu1X19du0jRHUHtq97UBiviTn8oTz6dGPn7vJroUnEyt4CjSwWHKFMGwHmq0bWjV41 wdmSOjKtNfnLMgM+zpDy+vacqXUdBDfQ7xV+wP3dvoSl7bZh6m8P9BpRunYxmRKgaKZti3LhrLZ Csa9MqQ+UODSbxLg/VIqUIYm+9MDDfmDtUlHoKAC+Nu62gwZ9TG8oqaCdarq1sayDFaMxnz13IN 7v8IIfCBWVl2HHIJ18qE31FOjATlfpr+ZkxNlSWJ2OZ3ABY4lWg6SgD0l6gXrX7tLq+D62IzJd7 nANkcOdD84Iy5wR3dnqnWWrQI5snPFx8h6YuLCV5hrmjJKlO5up3JcjqwtOfCcZUXHfjykvFR+G ctvyq02CLOVd2rC3B/0qynUupt2vUNsSObasyOui9+mPx1TMe+4qf49YhHt9k+m+00nlEzmrFOZ 4hVW27Zehxn4tLQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/lms501kf03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c index 5c46df8022bf..8aebe0af3391 100644 --- a/drivers/video/backlight/lms501kf03.c +++ b/drivers/video/backlight/lms501kf03.c @@ -304,7 +304,7 @@ static int lms501kf03_set_power(struct lcd_device *ld, int power) return lms501kf03_power(lcd, power); } -static struct lcd_ops lms501kf03_lcd_ops = { +static const struct lcd_ops lms501kf03_lcd_ops = { .get_power = lms501kf03_get_power, .set_power = lms501kf03_set_power, }; From patchwork Sun Apr 14 16:36:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 682C1C4345F for ; Sun, 14 Apr 2024 16:37:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE3E11120EC; Sun, 14 Apr 2024 16:37:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Mvk23GC5"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1796B1120E7 for ; Sun, 14 Apr 2024 16:37:21 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 795E760B67; Sun, 14 Apr 2024 16:37:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 378A8C2BD10; Sun, 14 Apr 2024 16:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112640; bh=tv/dXn/1EbAmlxq0rha4TdMh0Fw2XbAyNvTO8VxWrfY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Mvk23GC5o/KR5hw1yWUHcOQ0JLquZS2XLwKhnOVYMKdirBuGyTwcfaN+spOOlHrFV a6cr5vzIwlqB5egzmrQwYLc6P1H2wfSvzfHvfKIBoeX1CEmuxxeFb56EI76gmNQaEI OBtOj7EPggVqyMDdUXVBH4BZMNlUSgmmFZwe2oEq+82xrXyFNF0ONBA5HfMU1NFNS5 HTksyUGRMQnqSn/vCP90kw5M3HLyAelC6oth20SikqrU9jreuozYkWligLWjHHRHil W/yQCP+mrAw4PHkL1cQMy6q9N1hs/r2E7CDUcwFH23dAdsV6P24WfPebZwAzJaK1Dc bRckeg1m5mLVQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:09 +0200 Subject: [PATCH 11/18] backlight: ltv350qv: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-11-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=749; i=krzk@kernel.org; h=from:subject:message-id; bh=tv/dXn/1EbAmlxq0rha4TdMh0Fw2XbAyNvTO8VxWrfY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX8wDeoy2AroJzqYcLrxCU3NYrvz7HErxPGr bgi9VsTRwOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF/AAKCRDBN2bmhouD 1wjsD/9/W97+MJ3uicCNV/2XKOLdqkedzANr6kez8MtBavyVmvfC7h0iTZH5yIeMMNDuVPLg9xT ZWPrX9sav1psnR44KEwM0h1eamFmVqIBcO49w6A6yA2mEdaC5PI2UggRle/lrpMJfNx7z89k6HL yRZEGh1dG9p+OfIccTjIy2p3+e4nvjUA8eshh4buTQhZgD8k3e6P2fwE7zpVP3jUkabpT3I7g4z Brc6v1wX/cqVTD1A8f7kf7nF68Ocb5f/ZN7hxrFl+9ljz7aaNrLVswNe0EuA3sX22q4sqooOtRj x2DFZHEEJCICFDYwINUTGTYi7EbSz5Ne/o2zv6r1//DGOENjl100DakAHSx3mqoETEQv1ohC4HK yGsqQrCfUqH02396CosOrt/6DzZZnjXi7yrNUjW7CYeeBOC+cY/L+lOmi7uMVETNBaNz08HtntL xyXS9SnIZnlmBDh3wrdJgfrAKeYQJyCjc0pBm+IVcehLZgR9TbbBGo1NshoJ7Y4pMDN+EiaebtW PB/y2PzhKkgcvcZEQhO8OHrBMapLFrsW+Y637iBopoU3U5XfZ504XV7CouHJpbUO/ai+iIyQakX YaQ/v7cjq3l+OEHiFPm6iXt4ip1pXARzNmoevjl1yM1B8x+Ehfp7CMmB9A+lRahHdaJJmIz4I+L fPjRr4wPjGU4WZw== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/ltv350qv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c index d54f501e4285..cdc4c087f230 100644 --- a/drivers/video/backlight/ltv350qv.c +++ b/drivers/video/backlight/ltv350qv.c @@ -217,7 +217,7 @@ static int ltv350qv_get_power(struct lcd_device *ld) return lcd->power; } -static struct lcd_ops ltv_ops = { +static const struct lcd_ops ltv_ops = { .get_power = ltv350qv_get_power, .set_power = ltv350qv_set_power, }; From patchwork Sun Apr 14 16:36:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62EEBC4345F for ; Sun, 14 Apr 2024 16:37:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79F631120E8; Sun, 14 Apr 2024 16:37:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="dXrIiOsz"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC3E41120EB for ; Sun, 14 Apr 2024 16:37:26 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2235E60B2C; Sun, 14 Apr 2024 16:37:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4791C2BD10; Sun, 14 Apr 2024 16:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112645; bh=72zXnNjUdpDz3J1EN0eijgGIcKOy+AlM1twfomkwYnw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dXrIiOsz9ay3mhzrL0bubMJEsvHQSskCxSc06c5ZTEni37BPqr2c6mYd774iU0tOr GxPAoVYiCBZXnBAe/yPcIj3QKuXGvQ6W0IV0nDaVYiFtBkpffVet8oJjbAQ2iGCvFV 5QFTpzVQIIpXYUs5OFkxbyYnr0JAPMRQUilCyJ2f9+97p4jJ10TCftHRwIJlw6GXSI lgk2GX3naud+nGW1UCxWEhGwLW+EAPXN1WU/obGv7XXEjPGL0mrTAWxUVGevztGKcJ 12Mm8uoJKucU/1zoRqILuvpEtOsVrHPJBl7A0iO4oN5hCNt/trYabB2ABE5wPkwDTn aW8/fu4stLASA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:10 +0200 Subject: [PATCH 12/18] backlight: otm3225a: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-12-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=758; i=krzk@kernel.org; h=from:subject:message-id; bh=72zXnNjUdpDz3J1EN0eijgGIcKOy+AlM1twfomkwYnw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX9J08tTKsH8bkcCNd4a2dRxuCvVsUpu+71P I+QwkzyLVqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF/QAKCRDBN2bmhouD 18qjD/9DlmbHY7O5ZDXMXqLVupRiQYh+N52BSEI7d9Kys+JjEz9pSzZ7R13XxnW2RNYglgnf3Bx mi+WTXOhSmpdotNq7WI2fXu1TsnvZC28i+Ufd+Uklk0yfsrJQKrnaD/vhiD21H1kBRH8/1b7NVv XL+0lXf7IiMjsAcTwNdmhPviyhQi3euKNkJ6uuKl7GICNQAuf31JVxcYjkJslyENDjHa7NdVk2J mnTwn0761xjqNvJz1pmZhXfmt9ViYzSYkkWY8HKZJQk0FaybDhqLZbMyjiTy/rM+AQCsCYuz9D7 gJPVODPPA+McpdaXqA1rD2Rs3q2OZ05kP4sS3HqOKPHDDmk0Boim2Y2aQZ3ZDz3W1ngm727yXXU oBkRpSUfQXu5TQMxcMLxrnpbRfTHqwiHgrVKfCpVlBFyIZ0nPrnmhcAfluZDRKXzIXDPx4l39tb v/lUuYX6+PDlzE9GYfzkvukCBwwNo0O5/UfU4cs48YRSurmiRasycBAn08y/eoWCkzSkHkq81PW aNlvFMvEffamhCP/UY9zw74gcl9JVdLsVMA+rjzUbaV+YYTzxWmm1UuoCRwC/B5MpZ8S7rcYASz pwzKWcsafIrf7fZt+7FpBfV+6MsIWe4yofB39Bk75+9sd+BO0JQLsQyHPUCjtZu6e9RXvbd4IQn 5qUMsk9hRj/Sekg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/otm3225a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/otm3225a.c b/drivers/video/backlight/otm3225a.c index 4568020abf3c..efe52fa08b07 100644 --- a/drivers/video/backlight/otm3225a.c +++ b/drivers/video/backlight/otm3225a.c @@ -205,7 +205,7 @@ static int otm3225a_get_power(struct lcd_device *ld) return dd->power; } -static struct lcd_ops otm3225a_ops = { +static const struct lcd_ops otm3225a_ops = { .set_power = otm3225a_set_power, .get_power = otm3225a_get_power, }; From patchwork Sun Apr 14 16:36:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD7EDC4345F for ; Sun, 14 Apr 2024 16:37:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8ABDE1120E9; Sun, 14 Apr 2024 16:37:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="pe4OwOCY"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3F7A10E177 for ; Sun, 14 Apr 2024 16:37:31 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 524D360B2C; Sun, 14 Apr 2024 16:37:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40A7AC072AA; Sun, 14 Apr 2024 16:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112651; bh=Omi3ScwdlpvMVIR0iuLF7YErHf7u2KyCq5AmJ3vjnBE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pe4OwOCY+VgiBiEwyJfZpyaAKr/xxy3T1yjzg5nz2S6rudyffBYb2pZ2PZQ2iAm0v wB2oMLVRfF8GXgC0F8cJK3Vx1sePV8pI+V0N5MZJqVp5sTyMk4eKnr3Kkl52QVjWFb SbkEK8VySRESGB3UWab6+exfm8Z3ljQRwBsO598QaRkO6/rKCOtoKy9pIzHwlke20N yEyudfSBR+Iw3eA7fJB/ubGquFGC9kua9fOMPH0s0QCv7cvTDoswtxQfwKbvihvX/4 j7x/jMnsCxjk5irR8jhZDrqmtjnS1ZOTc9D0JdwCU3hFqxt0pyZkMwpXetAIrwd6tk xjdpWSQhyOZPQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:11 +0200 Subject: [PATCH 13/18] backlight: platform_lcd: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-13-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=868; i=krzk@kernel.org; h=from:subject:message-id; bh=Omi3ScwdlpvMVIR0iuLF7YErHf7u2KyCq5AmJ3vjnBE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX+JGEE7joH61NzRiMDOS5W2JAwhaw4LdAOM tjD6FdIfgaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF/gAKCRDBN2bmhouD 1/kmD/9ZvtUWiVU7IXkt1bZ19RxRPacMMFa3sgxkl+wc9p3fy4n9SLCGJ/KI0bFsQsZjt+0hAIB PKixfmoG8T+w+kx7HMJAs+nRtj/V2bBzlPcQI5gkd9IRCFlkPv7QHqh9cBrJHzC5nxSyykZ1dcl AqVPCiQIGvxVrX2NMhDNv6n1FtTsMbKlpLRHh5kC3ctJc8YEJpjQ8r+Vs/HjQ1DvEYuOlwrElS7 qkOKzQZs7mkxUBTh4DyoCGJkhmgBueB7lATvGEFgUR3mx6AV96T//aYTyMxbOHsbt+pdSkKlbLk 3EyUEwbL7KmxvRjd0g/lvPQllaobwmc4lZsox3JI38mo+YtCtyqHHUTovGxNEqMwFmnwnRide8r 7uROQZqfV5VOvBSuqb6yTSP7mowtAqVZeoRfxhwcYvkCcn9PJg+sVZWTekBaIcgBIErfjOdiyFY LsyNQDhV0wQMTSWT0d3aCeyNzAInhPtwbUyGGWe5TZrHY3iWXkueZAWmW4J+DtUyc6Gf6C0TCPk JAexKtmFuubczvorJNaZMoNymoptUo8RxfMDG4lB0O8qf3LCOo3XfkzBUsfNQi8MYlhrZs8um2H eJgz3mTizT2+fPI/2i6LYIfUaTrrN+/pI9FrrsaPopn1dMvFXoliYXKNaVXXQk33Q+u/9D3tUO1 zxIS6UUOWmZoslg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/platform_lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index dc37494baf42..76872f5c34c5 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -62,7 +62,7 @@ static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info) return plcd->us->parent == info->device; } -static struct lcd_ops platform_lcd_ops = { +static const struct lcd_ops platform_lcd_ops = { .get_power = platform_lcd_get_power, .set_power = platform_lcd_set_power, .check_fb = platform_lcd_match, From patchwork Sun Apr 14 16:36:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23D3DC4345F for ; Sun, 14 Apr 2024 16:37:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E1D310EF23; Sun, 14 Apr 2024 16:37:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ioHE2FeA"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54F6B10E177 for ; Sun, 14 Apr 2024 16:37:36 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BEA8660B93; Sun, 14 Apr 2024 16:37:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75E01C2BD10; Sun, 14 Apr 2024 16:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112655; bh=8FxyQDrDkLV87R/73jNam4JGkAqzpFBP89GlA6wO7Q0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ioHE2FeAEDw0+ahb8HY6NFpxgtgIGWxwE4Q+yubionYMMlRQ7gziO6B5UAB0YR4Tg GEdu7DB1Gc2dEFWoC2h+9e9nbvTj7ScYg99X9U/adhgg/IKcTHRNCNJUgpHiB+VlzN SfKXDOPm8mbjL00oPYsjtxL3j08fBGqWOM2ku+IRYuXQdV3Jud3uOtAvzDwCsLDa7d GizBufZzBu93l9nWwwim94wif//j18LikgB17SAFd0HUatnhfjcfP6PjVPCpDkRqeZ SVCJ6DwlNIJhY1Qd6ajPLzh+GlZvRMsEaZYKIQtSpGitohakYnZ4oKoTGUMCE76sKw wUIhn5ltpn88w== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:12 +0200 Subject: [PATCH 14/18] backlight: tdo24m: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-14-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=803; i=krzk@kernel.org; h=from:subject:message-id; bh=8FxyQDrDkLV87R/73jNam4JGkAqzpFBP89GlA6wO7Q0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX/k2/D+kcnyA6+1reXM/8pHT2wciKmhkg+u URCGgbFt9+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF/wAKCRDBN2bmhouD 11NnD/wOz2KK3FakG68xnNgo93NOUs2plxArscPwAndKmRQnvAqcaTR/URyeZkEPsjF2U35aVuE VYarm9v+evFVFe28+iewTan42SxHBlFJ7uT07CXVN6QOYp7S8pq15aLQOGgxlSZFbR5vGmvGzMh A7rASh6O0dKGu4Hgxq71tP7SstOBQQSFChzOchld+R7ZIoqJPpe6i0XAxmRYQ0tLraPySTdbEPa q0wSv/ct0GugXecwSW35oKrh8YHbRD/YZgUk8fZfkgcxxxEjbF79ovAeh3Ml71wPHaJK64cs/95 3vP4IaeiV1bW7Yupi65hKDQaR1Yz5iO4zlW/82Hz8xpfJ5apszt3CeqZajKYJf+5zKVLr0MecRH O4BmoH5d8x1EsO0/pbUR5casDmtJke2MTrO4BOaQvHfjMpR4jrYbfs542gKaC7H19Ye5qrxX9VB bPms+T0FCnoaOSNdavDN4hfr1WS1ldx5r9tk27dxC+qHow5yQ8I3s77Ob9S+cloVXRrix89jpeK lMRTkkro54vQoVQ8+AeJWfc21vIxqNDQyrIoSAawu/AAOCXADNsP12TdgSJwVnDQVbKUhbTby1W 1/lZITTfqZT2iSScZyrn0W4AQWP7wRh6iMCFuFGQeEZ7hhonN0KDi2YIYviByOQ3qtGmWiRAZCD GcLjhVeobVDC2Tw== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/tdo24m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index fc6fbaf85594..c413b3c68e95 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -322,7 +322,7 @@ static int tdo24m_set_mode(struct lcd_device *ld, struct fb_videomode *m) return lcd->adj_mode(lcd, mode); } -static struct lcd_ops tdo24m_ops = { +static const struct lcd_ops tdo24m_ops = { .get_power = tdo24m_get_power, .set_power = tdo24m_set_power, .set_mode = tdo24m_set_mode, From patchwork Sun Apr 14 16:36:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65F6FC4345F for ; Sun, 14 Apr 2024 16:37:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D14710E28D; Sun, 14 Apr 2024 16:37:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="GQ0BP1lc"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 295511120EF for ; Sun, 14 Apr 2024 16:37:42 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 891EC60B91; Sun, 14 Apr 2024 16:37:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D5F8C072AA; Sun, 14 Apr 2024 16:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112661; bh=n1GBrsVS4GARqilvgj9hly7fmHpvCWOvd9Tir89CMy8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GQ0BP1lc8pp2vfBJ6P2MEZAjjps7Ow8d8omihEfdd4Aj40v7JPDFqeQUYva9hywu9 vmNHGwoItyxie09pjtLpn/1vpXrarhhTE6X/aDSuW8SoCHaBZkEiOcVpMXyTDcPZ2B GWKGeLdlQYkf66Mk4AD9tKrgAsrOiUkd2mGVFVoa1gjKlZOBEjF1qc+K0kTEtTICIN Rhnj+RBLHMxuqesY/ok0yc7HugAPQEPvWpSAAuSH5DGMbA2p7MZbXBCQ7SrNhvP5TI DPQ/KLcg3D41WmP0d4MvH7CzHPl7yO37OnQhQn0KDfkHvvKWHM2h7xnvdBNvH/Bdjy YgdEUUU8N1tJQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:13 +0200 Subject: [PATCH 15/18] HID: picoLCD: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-15-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=923; i=krzk@kernel.org; h=from:subject:message-id; bh=n1GBrsVS4GARqilvgj9hly7fmHpvCWOvd9Tir89CMy8=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAX/O1cfvjid1pCiM8wbVynw2uERX4Lt9w05U eJgqpeaHu2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwF/wAKCRDBN2bmhouD 11thD/9N34bL4HZbHiidJ6z2vPuMOUkiHu0vGFu0cvuO4M4fwaNPt6K7MTBoIHA1B7+e7CbSofE 2GugAP1F+KpuLfKziqfDUDW3kbtBDnCDmZ9X4doHBoAVx2F5eDMcP48FqLGkqwc9KjMZSQOK4ON hDz++U7QoMi1RZD18C0A7XGBcwnBAMj/AmsVRFy67mYWcqPquRYhz8RX/GiERjvczSLPiQoZgUv +eJMbJs+BV8gQi4YctWI2kzzTpcS8w9XJ7V8XfirDlDPRNA5ecRWx4JVYEAnkHJNtBpmjMj09f6 ccgbpAleOa7PVffmw0dDUhpF2e2+T3KxSc2sA0MjfTq2JJFPkoz7YEbEgeBd2xvHJq0bX2HqTnB 7YYFgeQZoxumLMZST88PHXyt04MXsOBbmf2X4lAmQMLlut8C7SxhH1rg1wNuem2fbgzpaeXRsrE RVEv0R8yW9B7S4AMgkefEL3hMAG/HlEQGvI9PHqUCyTLqEW51vj+zKODe9xPLqF5/mzgZ6B7bQf gNNOPvkiJ74Wqh0XK/+hLxPlXolF0MUzVdjvlomIqgoCXmBeYUTtJpJEFmpdGv21lldvyQcgIuF iQXAv4cj9HWN1L45yxdwpo7m+QanNGiif9QS+nSpvj8Fu5Cfd8d4YmcngMLy9sZSQGKrWJ/85AE i8rRMTrjMM024xA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bruno Prémont --- Depends on the first patch in the series. --- drivers/hid/hid-picolcd_lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c index 0c4b76de8ae5..061a33ba7b1d 100644 --- a/drivers/hid/hid-picolcd_lcd.c +++ b/drivers/hid/hid-picolcd_lcd.c @@ -46,7 +46,7 @@ static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb) return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev)); } -static struct lcd_ops picolcd_lcdops = { +static const struct lcd_ops picolcd_lcdops = { .get_contrast = picolcd_get_contrast, .set_contrast = picolcd_set_contrast, .check_fb = picolcd_check_lcd_fb, From patchwork Sun Apr 14 16:36:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97E57C4345F for ; Sun, 14 Apr 2024 16:37:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C374E1120EA; Sun, 14 Apr 2024 16:37:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="r1jXpuZM"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94B7F1120EA for ; Sun, 14 Apr 2024 16:37:47 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1556760B87; Sun, 14 Apr 2024 16:37:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC323C072AA; Sun, 14 Apr 2024 16:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112666; bh=I/kH75ChwTKatovUO+cVD/yXMeGrtVUzne0bWF7Bero=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=r1jXpuZM094AG4sLOkIkdIPIfXrPsKTLcgdJoi8qm2StTaYtrKmCpdVsMJvkwlFoM o5dFORCCyU2rb5LiXYwmbg9jPOR85fYhc13iZiLX1ifEiH8qIyVWWuQ104KRHb5+tA T9X7AXJ6/heUNOaRwWJ76ShoY5sXfGhIMX1ihiLJwBw+mWKbRtGInLR3we6Xmmf/SZ QZDTebzTfbLlZT++j5EqvHXlb19dq5gbPSLs6evIV79EeAXgQPPGza2yraquEO83cJ QGuvGLKqoyvbBflAV+ob+MncvLq3IxCLpE5CcLGKjeIofur7VYiKkB3B5mepf5IlBR kW/CvRKep1H/Q== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:14 +0200 Subject: [PATCH 16/18] fbdev: clps711x: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-16-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=865; i=krzk@kernel.org; h=from:subject:message-id; bh=I/kH75ChwTKatovUO+cVD/yXMeGrtVUzne0bWF7Bero=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAYAnrIYrAOTDHZlnP8WOV568OXufBGJkmSWK 2M/WqLiZriJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwGAAAKCRDBN2bmhouD 10odD/0YwUT2uItZP/jSF6IWzto56RNclF1/jdlmG9EV54NNKScB1thR2UzVNcf5UMWYzk/O/4d G6VlgyYkdgY98xvr+Xw1KTTNJEbt8CNBLw482bkZPU6jmkQejqZ+KPUFuXKBhLatcKJ0fTBMia7 quIfrsHCqeWtvpemVHBU7/Xbm/amFPuuf1zKuziB9qBmptbIHvRdMNZccimd2IAxvYEizi7fIOQ gV68YHCOWruN2o5E+rq7XdL5VaKbBYdtOhylo+SO5SS2EbsHsNQ9DMEUB6TKV1l1fsCon8ikk38 aZjhJBx8jZ1TWPTwRvAhTlQVvZSTt7Bw/JmizAAka1Cr70ALEFhLB2xTfzhBVqMt1Oq87Hq0tCq LWKms5Dkb1eYpxZWJC4w9eftkw8zS48TdKdIAevB9OAV10r3+UnH5jYkqnN2XgVznS+xeSldXCp ceL0E9hYFnYbEVJAKjVyEOhdubkMHvOuRluEDfamywF+5qa9PwbwVWVm8VvZHUn2IZtz/uVzbb6 GBDG4h0oWOL4k9pCmYY4aCLZUKCx4f2Y3SNtIvrMmEO/O8xUR6HyuK6Dv2hs775l+phDUmKZR1D jTuLA9PWvEIEOjPvn3/IO6vRbu4vK8XNxVd7lh5RLXmDuGlAzIqnevAf4IDFuTHYQIBA3oPV73d +K/d+3trHJlfvlA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- Depends on the first patch in the series. --- drivers/video/fbdev/clps711x-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c index dcfd1fbbc7e1..6171a98a48fd 100644 --- a/drivers/video/fbdev/clps711x-fb.c +++ b/drivers/video/fbdev/clps711x-fb.c @@ -197,7 +197,7 @@ static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank) return 0; } -static struct lcd_ops clps711x_lcd_ops = { +static const struct lcd_ops clps711x_lcd_ops = { .check_fb = clps711x_lcd_check_fb, .get_power = clps711x_lcd_get_power, .set_power = clps711x_lcd_set_power, From patchwork Sun Apr 14 16:36:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5B68C4345F for ; Sun, 14 Apr 2024 16:38:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2A0B1120F7; Sun, 14 Apr 2024 16:38:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="CUlqEheB"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 03D0E1120EB for ; Sun, 14 Apr 2024 16:37:53 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7799260B98; Sun, 14 Apr 2024 16:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 429F3C2BD10; Sun, 14 Apr 2024 16:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112672; bh=pXU6zSARGVDugu8KFvOh/l5OML46BikLSb/4YHqGjAA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CUlqEheBDuFp/3X8XdJLYUSu+kuT7GqkJO7KgFYaZAL+b93nqY11dSL3q1qPzbOjk 26+fGWV75wo2zwytdGcB4Qy/CrSVxuFE0XsNCa5v+o9slldMj35EeSKhmWrjLOe2L5 88Wmsxq7Y/71/uj0Y6IGFF6gDdoSqbzoanMMWGgeSt/rhTct/pZe33KJib6HU4gzRz tFOF93W838Pubf9YLRLoa2tJ36VVxe8ngG8j5Uw/i3OdLqrmKD+C3Ap/4R+5W09OKS BQzH273iba9xq2++WTabNaeNgBG2IrKBZf2EMvMMG7RnkbG7XScsDSBFNYjEFluzMb pIL1636ygPHPA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:15 +0200 Subject: [PATCH 17/18] fbdev: imx: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-17-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=829; i=krzk@kernel.org; h=from:subject:message-id; bh=pXU6zSARGVDugu8KFvOh/l5OML46BikLSb/4YHqGjAA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAYB/NvPvWOPJzkmhvH02TGCUdXNwXQJNIBfx KPbcEVlT0WJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwGAQAKCRDBN2bmhouD 18apD/47c2Ifg0paDFmM9BvBDW+RwXsN+MCo8yNwr9ziNbmoCZOlXwVdWZwzhdX0zqOWsOq9gyo WgqB782wrilmuqSIKOFnodemx5UVNjmtrH2Ena6GLIrz3m3a8v/LIXznSBMVY2Cb07B+jfnEca+ iHHY7T7rvq+UVbNIEz63PrUmbXaAP77kKSnsTaPcSaaTkPbXTWyghkjlW/lZDy4E1gTq8CwWzOo mJRaDlhPFsCS/kKmzdbRwTAvuLxJmXxTsdmbuqDWTthlELxWMmIj75rFTSsqNhxUHi+DntTsEMI sBuYYYq2kEhWb7uvSgAmZEyhjcNaT5GoejvA9QxOW4VsmIrrsflQq0tJGAL6bXfjvJHs63Dnf5q +QVxaAEEbKABcHzuN2BcNovy22DJgdwhjmine/bxI15c787VOiiuMFfW1oCkekZuFZlIJcu1wDK a6BUzont5N/1xPTffBh0GO3wP23bRIn13XR+sKiF+DQ0L7a1U4L7myxMWczmF8ZCH+7dj410uUw XcvGzdhA8cDjts7EZEpljxft+Yx7ZUdcYvG0ZGuukFW6MnTgfp1fKTfugweoFqshUIaZaOSAQZr cw+fqgFKWTDLRPaNcql0aKxLtPGv5fElVwhfAJuD7VPoKRBnfdIsH7hlzdzZZD/d1vGz8BOfPBk GD/v21lf5gh4qng== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- Depends on the first patch in the series. --- drivers/video/fbdev/imxfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index a4dbc72f93c3..4ebfe9b9df60 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -857,7 +857,7 @@ static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power) return 0; } -static struct lcd_ops imxfb_lcd_ops = { +static const struct lcd_ops imxfb_lcd_ops = { .check_fb = imxfb_lcd_check_fb, .get_contrast = imxfb_lcd_get_contrast, .set_contrast = imxfb_lcd_set_contrast, From patchwork Sun Apr 14 16:36:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E828C001CC for ; Sun, 14 Apr 2024 16:38:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9665F89CFA; Sun, 14 Apr 2024 16:38:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ZWKsnU0z"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 420D31120F3 for ; Sun, 14 Apr 2024 16:38:00 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 00C55CE09B4; Sun, 14 Apr 2024 16:37:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9138AC32783; Sun, 14 Apr 2024 16:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713112677; bh=jfkmf/5bR8Pn7Nt417Wdx1kiNblxSBy4jfnOmUNCNk0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZWKsnU0z0X7LJIBSdWsfkWglKQ3Y6hQ6N4u703hB8loVzvK8vdBlvkGEZkmicggra zYi9k87HU/wUadpTGg4E5y9Hvlgl7vM6EgTc0MUURqljKIUvvrTZhIh8XparKquTwA VROCAMiyqE8RpBzLa8SQXX1l+3NCdOZKpJ6ruUnQ/uGsrcUI2qnldMVYGwHmS7WzUJ sipz3lKodrK0erPw9YDeh11Yk+Xcz7i6iuw5PdTabH7jqkwFuLwqBnPaypSlStXB++ KXderH27S1d466W+7onSZhdQgB90hhkqlbjau6UtEmtW/qGrAh/kgh7GmlrvNwwkoL sq1ApYKneLFNA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 18:36:16 +0200 Subject: [PATCH 18/18] fbdev: omap: lcd_ams_delta: Constify lcd_ops MIME-Version: 1.0 Message-Id: <20240414-video-backlight-lcd-ops-v1-18-9b37fcbf546a@kernel.org> References: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> In-Reply-To: <20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Jiri Kosina , Benjamin Tissoires , Alexander Shiyan , Sascha Hauer , Pengutronix Kernel Team , Shawn Guo , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=938; i=krzk@kernel.org; h=from:subject:message-id; bh=jfkmf/5bR8Pn7Nt417Wdx1kiNblxSBy4jfnOmUNCNk0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHAYCjHH0Cx1DCGwjeQ5m9nnsg2hCJnBhK6Mq1 fVWf+PJIyqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwGAgAKCRDBN2bmhouD 13f6D/9zghLij+lmC0ML/pi92moHzAOeagWtT20rHWv7zIwh8jkggvAqmqsmai6Q75+bNS986sV ogKmNtLnpMkPFhfuJ8Woq/DMF3hUNGs3KrMZAflCff/Play1FATCi1xMxdI894OomgNJNmLcbN2 +iaqYMm/cnyfQd83jrsuX9cjkD1MO+upTIygA6ClXTaHbKLziQ0dzQcFhAjZOmDfW6vDHohzCU/ vInc34ipNfYbw+qkeYWtbwm/tdfEEFAhpwS8D5pq0AaMlrVGYrAsB+C58lrU/aj3sz1jnZOTwPx nOrFBdSmiz08v+eX74Dot8/+uLE+/DWcrocEOHCc4EBPVULolt7u0q8Zsc8JAUsQcjqc8VNiRG7 MncqHSrwGPiT+E2GsDK3KWNzChoceOvW91EPWTBg8OG+CBErnyrv+QXpJX6Nn0yP1Gfz+cR5SIW BvOWYZXFM/Pympaqrh5EXydi1qBGaxKyc1REALSG3a3cUmIPieyICtwOTvfrSehghsBCkcX3Dtk 46IcVS6CS2FVMKpeE71ZXjfrB/jwnrqWYtMsh0qHJQ0P6kFgQSoglazclEIr2Gxrkc21Ozaa6bz PJk/1g9MhmqfhXzHLacAmzYumlsV+XINjIuHDG2Fj+SNYcK/A1tP7JCHwBMrAjvJP0EN1aeKbDE gNAgVkhlzyAFAng== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- Depends on the first patch in the series. --- drivers/video/fbdev/omap/lcd_ams_delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap/lcd_ams_delta.c b/drivers/video/fbdev/omap/lcd_ams_delta.c index 6f860c814d2c..97e2b71b64d7 100644 --- a/drivers/video/fbdev/omap/lcd_ams_delta.c +++ b/drivers/video/fbdev/omap/lcd_ams_delta.c @@ -76,7 +76,7 @@ static int ams_delta_lcd_get_contrast(struct lcd_device *dev) return ams_delta_lcd & AMS_DELTA_MAX_CONTRAST; } -static struct lcd_ops ams_delta_lcd_ops = { +static const struct lcd_ops ams_delta_lcd_ops = { .get_power = ams_delta_lcd_get_power, .set_power = ams_delta_lcd_set_power, .get_contrast = ams_delta_lcd_get_contrast,