From patchwork Wed Apr 24 06:33:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791688 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5FF8036D; Wed, 24 Apr 2024 06:34:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940476; cv=none; b=MHqAzRsnIcwU832gdgtYXsn4diP5WKUtlPcAPtwuH/MG6XoIEoJwMpFTaH0m73hjRogdOXt0o5gFt/kXDNtDwFgThogemcyNNCc9eRdCUxLmhk/XUxF18cnxGtVk6H363vCnsjg8FwL2fEZtUp2kUvfzmAs3a3sosH/bUTA7P0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940476; c=relaxed/simple; bh=I0CDR+UQx8pIKK08mZpMwJPZrKmFX4+NzKjWxZIyAxI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sDE9ettY1rM5TUGHGzYxG0/4x5lgfCPj9fEd0+APpnYeApy+sfcqsiOWIKrtBl6MSmqCLfrmJljIKJ6Zq9sumi2MAVV9/7JoL0vIH0cBmkLFsmUlGUOIoRplv2Ai+8hZjYOcT6QGnjzktjguiyh8c75LIucTH3asjH90H3398rA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QBJFB4ee; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QBJFB4ee" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34F01C113CE; Wed, 24 Apr 2024 06:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940475; bh=I0CDR+UQx8pIKK08mZpMwJPZrKmFX4+NzKjWxZIyAxI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QBJFB4eeLiwx6Tk0ZFRvPcqclvVhyVA2EwZfNQSyXujJ8QtJD/n475SuWDEASe9bD XMZ5Z2vChp5bVOhPvB7GLWWJ7zTw1Z5UnBt2sZIcPcoCNOfl+x6IFU8H2Fih5BDX6u dVfpLJ2RU+9VGQy1Xr+yZf3o1NuXDCXfdNLb+/IcVc8cPuBrSMHktl+WluY+dsw7RA cJKAndzVhW264t+z9juKA0UiEZcXOaMoPw6A0tvpn+Q2o7ahErjYbkcm1k39goL65s SGmt53gd5Ss4UQVLWL5skfc5PuZhayItc58+I/lAkaCHLsBGBRcZ/KP7Bv7qKBFVXw v97NNQBQCHYcw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:27 +0200 Subject: [PATCH v2 01/19] backlight: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-1-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=2491; i=krzk@kernel.org; h=from:subject:message-id; bh=I0CDR+UQx8pIKK08mZpMwJPZrKmFX4+NzKjWxZIyAxI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfeToXpF7L2yVN9k2sqZfozve2s4THf0Vo2R epNlzurbF+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin3gAKCRDBN2bmhouD 19p1D/99+NJcxUjp5prNBS/1AhHZ7jpcTNsKZmpAaP58DryULCGl5CfY7sVAD0rs3R/AnzX/+p4 K64AwvGNoyqke7ajX+ZHzin8hbv8N+9C/iil1xQCl0VDFMYe8M/rplcsBp2fYe/Yb47R/8CZkmg WJ3+jNA3rifj9dWGXV4pMUfLEgW1gpoPNmCUhIBa3pBacJUetd4RuBgIg4jWcUT1OugVlz/H2jM TKgrDRbS8HsrA8s8bU423MeunN2T9+vgeOVbUtfZMZ430Fw66qm0wRQUVdyxdCWe7JDEiGA5CfL 3lX7PProDKUMmvFLsj1kVeGi0HQEznRVIck2RrTwx+Ff8QKPXk8KKOTBHiKjrKmVErFuLg/EZzg bupLP1D7A4TTmrXZfHgPmlx9W1614sglt/194qIPrLe76HeSX4o4r7xEYdgOre7Y90Y+wfGyG6M iheqT7BDxETuYD4Y5MRcCUnTWX4fDupaDhJyruDQl4OVA6CWi6oKMAMpMf17NpHOoVpx+RM58n/ 7NLfOwkSHP2ORpqsofr6EWyxnv+/2YnS0Qj94hh136eZLVOCNA8E6HMiS8AcoYCDwWLPBpwd9CH 3m9CRX9Am9eJa2D9BquLDAGS72/UAnrXBuVoMZNj9CEToM9aDym6N7DX0EW6LgbTRWl9KPYju+2 KYXG6toKDyMZMkA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B '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. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791687 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5AA5036D; Wed, 24 Apr 2024 06:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940488; cv=none; b=VJ+T+4YoaCPPfdXFNM0sXxcNS7+3Mv2uG8x3WDp0RZtsDUQgwXRYx1bkQIXTAa9e5DY8BJI1UBmq/71BzukWx4v0em+FaBtKBBWASKQPt1mqFgWMykRkZXL1ZI7WrODVR0+t1cwngoVn0vLD0+k/BHu4XS0T/Z6/EG/cmAiTE/Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940488; c=relaxed/simple; bh=NOJTom4sl0/r1j3Ss+jlqEt3iVwaP7N8FtTfssrmGJs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UlmIswyRvQBHlii3/sdAf0RTYWmXOSgHWLXnB5Lu/m/EMmIhE0my0lePDx20/9afGgIqntE22vEilEiSF/1OM6DWJSoLHINMUWofDYVnhC+K/fPe4q8tkZ0SK/t4t2mlK5k2Fn+cXvjuTiWIjgfV87e0gmn1QGtuETLW1XVacCU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qshTr3Fb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qshTr3Fb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 803E5C2BD11; Wed, 24 Apr 2024 06:34:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940488; bh=NOJTom4sl0/r1j3Ss+jlqEt3iVwaP7N8FtTfssrmGJs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qshTr3FbpLI37jm2msIZjP7kfx8Tj2e5f6X2eCHqQ6gMxWGzLOBVk0pASOGa5sIOW qKKdHN4DazQZBcMsN/NWJJvOLfCfubRm+4k2tOMCkdhE9hxkPukTW/f8dJ6HVVBuMQ CEV4kNznmpwWf805EK+84Y76gn7WOj72hyOAnMDwaJvIbOyvMqoQxilgGy9v2mTNr7 Kf1VaN4XDp602S3W5t0SxKjrvwDU6Wo+VDrKZf0jmUwVAtYg3H7761gSynU26sMnwv gEHAyXMcF8R0qAY1DCrirSSJAtp6s2SKA0X2cIVcGY3tsZK2kfhsGcQ8FmhZct0C3r Zp2+TSjSyzhAw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:29 +0200 Subject: [PATCH v2 03/19] backlight: corgi_lcd: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-3-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=858; i=krzk@kernel.org; h=from:subject:message-id; bh=NOJTom4sl0/r1j3Ss+jlqEt3iVwaP7N8FtTfssrmGJs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfgAPBA13t4hzc75iF/9FhP/Ffy3+J0VROvv MQNlaGrdtSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin4AAKCRDBN2bmhouD 1/I7D/9XENRlRBegukAR77dNn4HXPFTEUPEWKP00rQUchnrH4Ek6XbJiPJhcqD7lpz+YgLuRH1E ZtwQjfnlU5sCXl6G96L0EOVFdoLY3d+ht9IUEq0YGWxETNXLo5LhcnKIHTsUXWCTyhK+BI0oWyg gefS8iyjbuHgZEVTnODJQHFf2QsBWMuYBbjN4ibKS2hlsfeMbnG2hxMwQBYPieLC07M3RodDasn EjAqGnv16vtBo0TxHvn52v0bEzlugqgJJoPVtNWCtP64P3LWa6fbDrKfNIfE/W5xWYoTv73c44y FLa+cepeGiJej6sGZAUV+BBynGu2PHsICNlAm1vpreNep5S7r9jyBzl/0TnCeRuGZpZFm5EHzjX pf/ySG74FjCGokORdhS881hIf45atIpEwI8IgUzPZvgMfAtapHfIxPAtFhJWCghWHwOi6AMEjHp gmUrizcjO1DSPitHURvdz67bii8kQTIej7i2tE+IJfQYyEMCswqZX3n/TjoHpmeyCqscMIGObax r9Lft7ZwdEbszDdIW8DGRxryk10kIjKCnDOMUMj7nCG4o4QFqCdp07yCIvLLUj6e9SzOR68qyEJ 8l3jO/b24veySctfWPbFUSg1UoAaiXRikqRP3HTtJ+gnneCnEUPC3RdsHMFWaksB7WoufEV27vu Hz+tElu8ckY7frw== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791686 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 85C3041C67; Wed, 24 Apr 2024 06:35:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940500; cv=none; b=jzPCR2G41sSeLMPCTyQRgu65kP9AQDN+gKABSF/6SB2hj7cUYkfcKyRcQ411zjS9fDcKyHlpxyc0qu2ii6IvWmyEUsWeBS3p74jC5ME95gSGwdhl/ZNSHNAXE/+ts7o0OPdIQ1F5P5Fowc/OzTGUm6wggQrEnF5NPos8TlcW3Fk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940500; c=relaxed/simple; bh=YZlYLaxPYk3nyqOYpuqvAaTwYZ4ZvDN/y6m4aXvtTU8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HqwWMYFUjvy2hJHxZoZK+UE6SMA8tGil9xdZ0eC15z3muiDB1oIUYCrxH3+uwGgxL/IsYrE+cUHFNUT4nPbaR5YWcBsZxmGKbQqzYo/0rfbRSfoy6DBCMbpKAs31j4Dn7HjDoB5Al71c/F18nyHeNfK5OfuJ431h57mDVlTluAY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dqrR4Hk3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqrR4Hk3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6FEDC113CE; Wed, 24 Apr 2024 06:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940500; bh=YZlYLaxPYk3nyqOYpuqvAaTwYZ4ZvDN/y6m4aXvtTU8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dqrR4Hk3AfhL9dG5IDtZLQ7W25m83QMZA7ZvZXzSZPk8q99BTjFP/G90pE03RLpbJ M5blgJafEP/qHgJwlZsqcLRZkwEes6QN9sxL9rWKXTtL9LxbgETTPghhmwcRQUBA1o pqIApON21iJEa8rHq2IdzhwTvqME2+hoAkRI53xsdrQxvDdruWMMi5c6ZazkJC+PDC xPM45v3IjuumO9E20A0xsMkVLU6w+FxscPMBBFGTI0gUvl2lp1oapkDdxwvaKLem7V 5j+rvQgJJvJvVb+P9RZ3OjF92Qkaxr95HAjgt+XKkdoOFzpDk88rtI/lVHTgc987j7 pbDDcqRhwTCHQ== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:31 +0200 Subject: [PATCH v2 05/19] backlight: ili922x: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-5-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=808; i=krzk@kernel.org; h=from:subject:message-id; bh=YZlYLaxPYk3nyqOYpuqvAaTwYZ4ZvDN/y6m4aXvtTU8=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfhgGsv78rY4HeV9nGk1ebwCmUiNzNHKtsIK 1o5gFohSMWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin4QAKCRDBN2bmhouD 16/hD/9UQVoOdTBB9i8W49tHr/wJHWKoccJ1BwWLjp1+K8JmAZHWznGmk0pi3BdJ/N4YyWIiFCe +TDcbG+u0nHLnLCZDeXOGFasx+b6MKd5DMy2dMRiwwjmcW3N39IlUpmp2tpLsHOOrHeOPWTPjSD YHJZtB15YdLio+riVlxGL/FrqT2aJF8+ScdzYb1SU8hMsMYR7oXPepVg1mJC54QVUv0pAi68bb1 tRtiAR3DerQbOauG0XPp4NBtLKKu4ZQUiFXomqRpQbEOJi29l31hOLa6CsiYQKqtAV7HOtdxgEd QLYKAseBkmvDg0r23EOLM+USyHagW2dMSJDeGtA3IBUpW+VijJ/4HS4wnuGnOQhy3I2Qv4tlFxz ruWU9sWEqiPyZo/AuJYIOfUKzr9od8D+3nIWFiVOLBk7jKdOVJC3Ceo7nZyIo9AQ2k1dL7a7+pA xv+OX99Zik7aeDMWtk+/t4e0/l3dTkFtPk+/l42+Vgr3sOIsEaOOyWOePVNAv2l/N7qEthXepqi ysOGJwgsn6/2nwqgEZuuK+7SUtU08XytBptOlLPxNk9Cs5dYkbfHMXICSESMJ8fqjuXT0xY8CWP BWMY3MrSi9/S5nmfL4WJL7hS2PoFvr+jhCEmTK4/lLZpD1x/KhwqoLTYjp4GxTQ3vKqZAKaqU/g m3oVQnX8srkeuFg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791685 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F1B80157490; Wed, 24 Apr 2024 06:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940513; cv=none; b=AWJpYtj6a3Rw+TQhQ1nHjDYKPA/zEplDRI9KFlUt+aNPVU2kDqCARVX7nf+YqOMF2SPd+waFFE47yP47qReorKcS15oIK2LOQw0BfFr33VDb8MW0W3IUX4IfNB+mNPn17sEtbyh/nDHAy+jgL5i2ahhXj+P8u4qssG7L2GrAM8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940513; c=relaxed/simple; bh=TF3caa3ZqGW3NOgH68uTY4reTmb6e8Mj1fQjLmrYPFk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PiIJBlIQRzldJETjSPl6txTWctxEm7hfwYQa1VZTnvlIlZwrOA+oDDJ52dxLLZT2ai43fHmYn7feluTZtDGCDVRWDheB7cIY/sIztil8Q6CGSZEk4w3ApUu6wyuDpN5NqKI+mS+78WRKsuBiib40TrERj4vudCGOiq9OlhzGrlQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CCayOCb9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CCayOCb9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01C3BC113CE; Wed, 24 Apr 2024 06:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940512; bh=TF3caa3ZqGW3NOgH68uTY4reTmb6e8Mj1fQjLmrYPFk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CCayOCb9PaArobK20b5rt2Apv3uGztGWPWg7AGtnOiYsaPJ44MPBZUGAvea4q2aj9 El2R2kIOgohiK3WGUGJxBookhaU7W7uIqaAhrLAfc2X69AQi0tXDstcyHNy7+6LDTq LMiUk96lUECfWxGKDBreCGWP34bBOk4EEsfgOXCX4c2hVTrFR23cw4C4wrPpNkftke ZqHlPBm8mGkdfMoamHgw7Nj32lJiNxLKPKkhv35yzqYApF9opngl9YvH+N+ryj+4GP V9VjLY8NKr6Lf2h1mwOj0MrpMp1jmKoGeVnU94JIUl+wQlH+Dvdomb3IslDkjdyEKQ R7JnBo9b/gwMA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:33 +0200 Subject: [PATCH v2 07/19] backlight: jornada720_lcd: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-7-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=913; i=krzk@kernel.org; h=from:subject:message-id; bh=TF3caa3ZqGW3NOgH68uTY4reTmb6e8Mj1fQjLmrYPFk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfj8UNY1aT9ESBvK1M93qQMu+fYxYjOr7aSL 3soc8KBncCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin4wAKCRDBN2bmhouD 1+B6D/46M9kvA0YB/oh5w0eEzslAekOrDicFVVYkd5oN4eY32nh3e6ZLWNrXU3OQE8mKNxtbwrr B/jfvQBcUG51Cq5ZqPSnP7jH5WrJqtI6wOyYcbBrf5MEaKDra9Tgzd8S4W6MLQFiJxFnYiSRSoS p4n1rw6QCZlE94mT+TmbcxnMcY56g7u7wIuo3JuyTQV7uE085BxiST/AGsgzaPECNh1BS5i07Mw iC+0jNRv/yuGq1ngxpGudmBygCQahTp62C13OXqQuuAMsQUt0gGVT2yy53YV/FKzvUUshSNfMN3 W6cZ7FmNBfNmQW6IgmonfwTCXs5FI1ZiCZvVdX+nxobwByAZNmVjuRgfgcwin9IkRRKr+NRAuYr ZeCpPXhJrafLq52cBlaB/nW6+mfzj0ZZ/vqXln+JME+zNc9PszI8jfvyCS0pi0Xc0O1pbLAtcsG NtQfOeLHyRM+k8NNTAADHjUj6GX4lWSDwzLJxIzUEjn30PGDO92zl1yJD1jRT/wpbc5396hsCbn bY+kCuVhRtB/tuNjuE+2m62Rx10fi8QlKsILeunGAW8gup8ZR2Xf/dDkDY57CTN6lqK8VJV2Gnl Tcc16z9wKL/LltQsbkI2CdjRe1lrEqFaPq87RBvHcaPg5OXld+gXMrbGGgG0ZOV5ukg3aivpgxj j6X7VZuCGqonl8Q== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791684 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 76959157E6C; Wed, 24 Apr 2024 06:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940525; cv=none; b=KffPSgVKYuYD0eUbOHB4VSzL0t1YSX80sC9Cu/hkC2zQNEIsYyePrItmZ9cOkL1q2hxiyqbs2xPshcaYdb1p7UVfwuKUButPkhzkQxJIpWzHXVZH36l1EAITkY1sG4HDONOz5lVxBzzG/v/nGvAe2keg74TfcQKPktt+Y8m8qc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940525; c=relaxed/simple; bh=QqHhVK9SzqekY23QUK0NGbTMVW5eCZeUTtEhIWfnh+0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UyIUhskW7+uOz+cWDhY0BQ4sFy48Nqnb/HVXU85QE9037RgLarmxYWg8SPoM4/Sv8ZqmjN/mj9vkcdy5soqd7lb8wrqYu2PtywAWuhvaKwmR/hW2ESdnKseDhrliDszN0VY5/3/qXghduwvOX062u3/GeroXZ8v5PBuIP+xptXM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IwpYGWaq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IwpYGWaq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5C7BC4AF0B; Wed, 24 Apr 2024 06:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940524; bh=QqHhVK9SzqekY23QUK0NGbTMVW5eCZeUTtEhIWfnh+0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IwpYGWaqENG2rdgG783mxgPVv7SZfywBXin0ml73pYYZsMJ77gnOIsm5xXVpNwXaJ sDJIuNXPJT4/ynSQ/pmS+o0r6hwgSZXaRmYaYjPmNJWmMGAqC57aMumyZWAC7CYXdo 3tZnv2GtBUG9ihVR72ztg7qcLwFxd7S64ZjPojSZl/Odk2Wml1s1gF7osuNrE29JpF qtgooBIaJNWEEGLCS+YX3dLrkHlcpV+QSlBLJjOLTI3K2f6uoGbTmZ8/iNgv1UbvTI R2a1zcVnwoo9o3Yrf6Un7x1vssvilnHuc7q1eHfB7JEkVX6V+q/uutiUHx9CR6qqJf JSESdhhCOq8tw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:35 +0200 Subject: [PATCH v2 09/19] backlight: lms283gf05: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-9-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=810; i=krzk@kernel.org; h=from:subject:message-id; bh=QqHhVK9SzqekY23QUK0NGbTMVW5eCZeUTtEhIWfnh+0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfl2/5VGOxtE9L3jJEz+f24++Vzpjt/lPLHA pz0vnjtU3WJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin5QAKCRDBN2bmhouD 13gvD/9k585xOL0n6ZBs8N0MRHIClNoe8dC8Bcgcd1qpAbkQ8P8Lh3FW0m1qfieLQa0QNyeIwSe Rvfrxz39h1TkNm1k+R5dlLSEDDHkU0vb4sFLrQdgQ3r1dB4sOEDo4VXV1ht/IfpH6MCJNVJT6NF wUyo2o4nz0pmmYLhdxmTiqBaKLElxxeLIARh8RHaBSy36YWvESTPHNBYaGzjCfoBs5GA4NBATyi 1My39dx8syZ2zTVViT3SG90JBOoviYkWAuXa/5yQs8d2JTqQHYixeEtKIBDpczwxlEN6tVAgXJ+ ZF+PIX9cxO2zKm+Tbmd80s1l++zhRYmeAF2O6FT5gWp3h6aOP5kxa8r8FZCzfOuljRrBkDRdq9u kiA5cbSFBnjrWWbZqlstWGQEn7KO/p8uNm5n7rHHFyr4SuCo4nJmH/K9qqtW8wNS6oMKboPlITa aNALiq8KaTlvKJiA4NBJ/m0BYPNYP/y21a53Yn+d8A5fy7IBKHX+AcHN68K3G5Sn+LSwfYeHEp5 +MSWpsUNuCbwvHssC/IsZOL90et6xH0u/07iYn3AYtERhllLFP5raywcO4fFHl6IAKy9qZqBCCW wIE/3gILn+FdQyyhGpirhigLu+PdapHVD8RMuLxfEykpaYU6EfqyOMEMyasldZTBbC/iiU8zui8 /qqpxBvin0yKgmA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791683 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 162321581E4; Wed, 24 Apr 2024 06:35:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940536; cv=none; b=tTXElXf2oKqFc3nN9VpWIQG0yV3pRMUoUvppMa0HUo55IS3ZTXDXWw/iJZban1vdpMoP5FWvuNX+yNqDZyRppqJ4ME2zQfVSxKkPTrPGtx7klvHbTuusKn2oRvQQNT1EnlbtsEcCk/qdIDof/6TlRZ6EAT0ke2tnv8FWW9BT2ho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940536; c=relaxed/simple; bh=EX4OZ4ahslVLrwePlI3E2P5OznuRrbR8wOc2lzkSgdw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DZiBUC1fiF36JdJPZx011hhvPhmRwEswnAM/WT9fm20duZjQKwBgEvqnjk5AtHb/LpsFmpJ5ZjN+3UupKQj13mgJibIfkEbWbHBQwqnAvxnYIVt4ccZuQettFhit2uqbgnb3LC1ShbgGmR9I2+Ynn0Ewipm4kRPXOVYXnPGn5ZY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X0fkbWy+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X0fkbWy+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED99AC3277B; Wed, 24 Apr 2024 06:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940535; bh=EX4OZ4ahslVLrwePlI3E2P5OznuRrbR8wOc2lzkSgdw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=X0fkbWy+dNM1LIbT2x8cCe8NBeQPVJ6WUyJDyVxzDiNY8od5cdJGgmAUFJNSayOc5 dh7aGTnz16QjsnpLJYV3Yce788thyI/GrNkMW2efT9AmNx3wBxpABs41rwtspEgJiS KEB1dWyMolTKoWejwN85D1vd6jCuscNM8PYrhDceAIM27IbFXPUp7nI0zAio4CRZ7m O5oK5wM+39qlhTjCR8nGtAfGoSFgv4F3k3agfpA/rL8leh5pO9F1jfSkHQe9PMKEUf 9UpsZEeQV8bGITrgjiQZOLyN9jbSFsvGw348VdupKd2PFCQHF9WeBgxnCw0ai1ovzS +9Y0GdK/HLtVQ== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:37 +0200 Subject: [PATCH v2 11/19] backlight: ltv350qv: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-11-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=808; i=krzk@kernel.org; h=from:subject:message-id; bh=EX4OZ4ahslVLrwePlI3E2P5OznuRrbR8wOc2lzkSgdw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfnU8+cFrmEgouxxsFm9Cih66qdG2WZEmJSw ID3byntUvOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin5wAKCRDBN2bmhouD 155bD/419r9Trn2nvF0pbnKMBFNVwncLlnIZlhkfYESVlReWbejYNtl6uk3BVlakWnY/IGiyaan Zx9NZ3h0z7PawISPu8PDlvBtu+bF4OqqVseY1P+AP95VVGKaeE7pX7pqsIreictSdxqliGTL3BL wA8do+RuwOMQheR4MSfwqPwOse9rPqYiCKxFikcjRmzPgQ/X+hUVEQ6HJJ3pO1f+D72g5VcbZvX 2/xMvotX3kKZEBaV+2zot/w1Eey4tsofgC3Nba60ACBigSo3h2dQ4teuUlcZCk7+4n86lA/cGyV USjsk2Wua4gfgmHfqseftv/d7De5mJtQG66MDLWK1qHRf5NbPGG+yREZeW6DWuwlZGjbz0plcAl Fgndy/vkxaiLrgVjHRIcIZJCQ9YjEp142Zh9dSpu1lOTRrLWhjTubgwcBkuFxP/xCPKOh6c0uSj VXQBTvMvCnodNR5JHqxc6UV0q/cnl0X/8eHLNJW9cWkYLtgMyP+4D5BZjOIajSCY3k1UQOQble9 FBBie+fOF3OMejmTzRbKxC1gh4bCT8irq/NVDTzCfuq0W8mHYJt6/kPsUkAaRHttRcrbeGCCDZ5 H4GlQ5P7H/CzJrmmW67W7u2JhUeTWCZZ0h/kG5k5Le7tvpv4e7T1bH4DLblFb23hARsCejDVoSe Q/B800KSZ6lwQCQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791682 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 90410157A46; Wed, 24 Apr 2024 06:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940551; cv=none; b=O0/R/ak32ee3Hxf1PyKUSkHI8jLRLU+unphsAqjD8+jlrVx3sGTgPXr2bUuVBWl8sqSMs9UFdEuCR9oTn1pYrqe4AlJS+owpZrepDpKbJI5q6ejXvgy/FC7A4T+VgXIZAyA2UkBAZOX+GZnvQDpADPzciid/iGGcQodlJidVFSc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940551; c=relaxed/simple; bh=4qoQGYmdNWiD9RfbIvJFIJBVJ1Ici8hCHnU6hL42oy0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X/eYKA9/bET9ZHEd+GWtqgCD+gxS/W0E3UKL+yxS+ihf8+z7khJ+8NXUgo/eQyGb/gHyaR8kTnsCmMuPZweujfxFQJH8B0tOKFnNXHoWQ5Z+mq8hUceR9esHIHalfQd5EOG2PdEXhJiSv3uE8V5MpuwwzmQx0qqsCW2SDs/EuTU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ewnGq0po; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ewnGq0po" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2842FC113CE; Wed, 24 Apr 2024 06:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940551; bh=4qoQGYmdNWiD9RfbIvJFIJBVJ1Ici8hCHnU6hL42oy0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ewnGq0poDy9+TDkQUCpSjdelbeZOwP5u/2jtCcVn9sekYyxWc2Oq1drSz3f1G4utN 5/2MAISA2cd7xU5CUjs/eUZL1ywNQX4OHSg7CNJ+KxFlLLQ3U63DrRNf+oUlyGdBzk XWlsGb6qiacCJQTSfDIMOdaWvdADVJYgEwkmEJxDCQ5JAui8e8ze8L/m8LU/8PEWUf GiXT4q23SUX3BcBPcQYyM1j9EoibdDN52kjDrs/Y3V0jvTlm7xwq0axK7pGYoUNv2W fdlv/MJ/BHrfs3ICVzrXwen/jW9cU7YymyqX5c9a2xMC1YOi3qvww1Z8V4WdVd/hr6 E7aYQiJQgSoxg== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:39 +0200 Subject: [PATCH v2 13/19] backlight: platform_lcd: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-13-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=927; i=krzk@kernel.org; h=from:subject:message-id; bh=4qoQGYmdNWiD9RfbIvJFIJBVJ1Ici8hCHnU6hL42oy0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfotvXMS26Bm9o16qYnTMjLHsAaBX/IQGlmI Is1PMn2p5iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin6AAKCRDBN2bmhouD 15OWD/91gLK/6GvyELK5f5l5DdJs11mnTF9xOVpPVb9dGvHZmON4jZturAsHjNrrSf5/+UWXoag W110QTksE4yQebupLAvPZGChnEr/zculm00ZuVHd7iKEjwhOqSDvx16YeknDKXhSoCIq8Hpm7IW kx4SvvyHnTSp9BsOy2UzPYFZOCp9UD/x8rOBao9PfjFhvUyUSLvJRW+nBm+2XdKxftCxH4lnqzm B3a7fIhODTTv7HR40r/4IJA3UDUUIzKdkQsiAqQMzRbXa7dW9MAdpi2Z0OfDw+hlmxI9VWwQ/5w Nh9Eq5Upyrt9ffRej6I1iE9dAdWNdo3t+CI0w1nuP9e14gU1HJuXSDjnne5cZsW+HbkMYsHVB6U PZxzeo9mJWHNhpzNbLsDEe711CGGbxHqv68grIgghaaneo2IjYCA+/Ra/zIREmXdryiIpjM5DKj g9sa0/iKja0TSHG6pQ7L4srkGK/tYww0UljQ0etcmhYqpBqacFcZ/eBwBfAoqrYHzhIsdhI5Sr8 ArFz17c7yonyAqjSrCB5mayXbkLf1Hx8AorvuqAdFsEVMd8ekpIDYQgFG67tU8h6Iqeq0+Sxf/L Dspo+RTgkkErsqn+ajU8L3KZk8fy90VYTFjyZgnOis7hJDTKm9CZOWAh3NTnl7IBXcrg6nwVsML CJTFjQoJfdE/+zQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791681 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5959A1591FA; Wed, 24 Apr 2024 06:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940563; cv=none; b=kpiDCS6f94PgWrXZxoThYA5NsrBT6cK42ZEwGrSZ4Ln6FteIrqi/I8ZFkw8aZiLhfzYsGR0Nb0X15LE478BRPuyF3dXli+Tx6UkAruBFFfC9c1AXYEywQzsR6C2ey3ECwXHIosy7/UbkVWEnXKSKmQApmDjE2x/ES1EkopJXXJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940563; c=relaxed/simple; bh=vOCgFXE0yZtrMeCN/DmcJGN2jbuTcHFP/HtJfH739cc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UfjytT4ny73QUg0s0OBmW5jubMlnuVFkPaqH8qtkfUp0FfuQPtIi0YDvzVNt+okul/VX0Vp4sZH/ShRkDCtvV+d4RzDHBb28u0yBguPlulNh28cYiKQ7EOiWLvNP+1OBHBEJTiFzZXvXQ8nNFdbDwPnfwZA3ombv/+AHU4hJgK4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DZ6xIdW3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DZ6xIdW3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC2B8C113CE; Wed, 24 Apr 2024 06:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940563; bh=vOCgFXE0yZtrMeCN/DmcJGN2jbuTcHFP/HtJfH739cc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DZ6xIdW3H4qldDXElBNvIpjA80XivxCnNEwvb1nqQ1Lmsm3r5l9t6QI1lEY+4jkg9 zFm8bpiz9k9EnztfU51sUq0iqS3lp4XmKDskoa/TuTO4qQgj4+hrQEjJxGeGMwaR+t H+Tg9Hzmu2CaxMJGl+QL7kWUZVN057SFR4kxIV4Eet0YeWDPQxGaliSyDwLL7KPz20 JqpzSQ0x4YkKWLrSvm/ddc/jZN/t4dD9zn1dZSG0owYi1eqmKtCJ/PHMmifjxYYHgc mwkiejg82pco13UrjhTiv/wcRvfcMOJmZ3TN4Bb2Re09iKiCVGITp7Qx4zZcDXj1GY asroXTakL3Xgw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:41 +0200 Subject: [PATCH v2 15/19] HID: picoLCD: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-15-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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=978; i=krzk@kernel.org; h=from:subject:message-id; bh=vOCgFXE0yZtrMeCN/DmcJGN2jbuTcHFP/HtJfH739cc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfq4M1IDJPlPFMkIXlVPIEqNDgxTDlWKP8ND FrU8RWlF9aJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin6gAKCRDBN2bmhouD 1/N4D/0WVW8jUjibDXsx8n2ptJVAi3ksr8AEwnSVXriRdjkWTmuFQgyDS+D6O4h0tbeNHlR6onO KGMgPoa8V6ptLHP9BU0icb2AgC4D9Kh8q+OkjfvfQzaAudoiyEVHG9ztnyq5qxl+AhOBWvmi8wT vmMYcToLDq/W+QsSe9mlRXAJrQTlF6V8kWo6yUHh80ANHEJH6o8Ret/wz04WXFJz3VlVCGPSwaV iKgGVP3HOzosrJU5tDq0ucAUbHnykIh6BZhYGsUH+Asr+S4i+v2VlaD2FPkJIWTmEJgIvBBfyet XklLq6y8iLRl4GfOkU78HTFkSxTftPz1/5e4unxcMYP53jfWgoHYwWNoLWxhY4UtSjpNMne7/za 8Z+0+CkqHAbylhE8WZNg9DGsXTrI7V3G35JjLVETvCEkDBvPrNopn79LKKRzO2Ma38px+20z8ri u3Vbgsxn3OpX62sNaIComZ9U7JnigtjrRz4MjR1laKEbHRpk2THeV6W+1ec1M9OHWTPfHShNBuM 7wS8NyXRAHov5RvAE9OzuRwMMMLk7hPefhtdDBK7goKDuQAIzumwLRBOP7tyaf1MkHmnTUfwKEC oo3dP4Jlf+M0js9uJHJINT5J4cwD/qdhqlnJNVEeENiXW9PUl9/rhQgMNRcEKxP1ikkdksx9TSO VH0W6ULF+Aee9Yw== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Bruno Prémont Signed-off-by: Krzysztof Kozlowski --- 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 Wed Apr 24 06:33:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791680 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9CA0D158213; Wed, 24 Apr 2024 06:36:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940575; cv=none; b=CkpHKxhP5U1142fhjJ01MnmGAjLwe8EZnWoIzydZiBjUlzcG26eYauDkjJMmvyi6hrdClB59UtaAq/ceau2ov60ZMC24r28wk36gIHIjdgiqPUUmg2I4ctqshlsH/ULYDyZ6aSV5ynXAY5AihxmBdpwnb+7usn5gc4rwpOVjEVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940575; c=relaxed/simple; bh=/YPEE/2rx+omz6upF3/bxcsvp1W87Sbaya8j0gn1t6c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cvSQwoU/ntCtT9nlUtQjvRbXD8gnQ/qzJsghSDRWRWdaV4ubZd5pCPdXEOXBWOfnoqu5uS8bTmw2GJM6862fPx0axjQv52nBInnlPQMBXkMRl9dcUP2q9QqYsKNV6Y9dPmU1kx1+478PAy2SYhMteR6qn5rEmTZiUBpHkuF05Qo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CFuT8NXJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CFuT8NXJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A44D2C3277B; Wed, 24 Apr 2024 06:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940575; bh=/YPEE/2rx+omz6upF3/bxcsvp1W87Sbaya8j0gn1t6c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CFuT8NXJ/hHnZoY45SJJvt+s5B2CBoVVYP/YFem6QLsn0Rqlqhnmr7v79ZNARUJfR FNjSmuyixH77Bu9hQk07WEc08pFi5mrX8C7S55ZjWS+1BvXFuoO0IzDZT1xgKVVSfs QWEwGQxi9CcpxXfa1CFEGlI3ZMpjX7fBlWBvXe2zNVq2M5NTc6liA5RuBvbye5I5Nj 09O4M9lXKLJoGSLRiQYH4jX8lFr8LrnDSU88n3w1vFkhBnj8usrATzYOAZMtig0Y8T z1rs8iqXKn2nkSh8BqVoZ5E5jVvGA62HCIWtmKipT5ylX83JwJX14CG2rH2lYmLR9o LRoxjzZmdYLXw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:43 +0200 Subject: [PATCH v2 17/19] fbdev: imx: Constify lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-17-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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, Thomas Zimmermann , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=881; i=krzk@kernel.org; h=from:subject:message-id; bh=/YPEE/2rx+omz6upF3/bxcsvp1W87Sbaya8j0gn1t6c=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfs4bgpP3d2adOd0Ir7rb1GXy79RJ+CIs4xW 9qxa5vheUWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin7AAKCRDBN2bmhouD 1/sFD/sFck3lF4eDnbOwltOZWg+sb8FGMQ+UKhyG8MYCkP7iEPDWJ+nvoqoTam9oXUqVV2lb0WP 9VA7xERiTmIqdf9UHS5odRp1AyWKRpjYktpYM3i+OjOfc+5zYyQsCjp1BxBGvfjUFQxW7NyND1Y pnkY2JR3Xzx5PT91BsutcolYkS9ikkuj8cFjPQIox996BZOqu+IqNzy8KwrIpnv5dMYIdLwsz5u kY+qinBwuY7ES7Pxb/kl5GsQ1FK9DrLRv+GwFtRI1xQQvAS2cHzigsq4SLZy+noZpHIElBJmVLb LAoOc7l4EQVD7rZ3OMHj/Clfl5u0TqZrOcqxGOt450Y/IWDnKTrLW7NyFne4chqmm5Tde/d9XM/ gs60ono6oOct7BZJDqOnPJxMl1AGlnoC61vDdTsfDp1qGwgIPENKdMCeH0RC3tPpLXwpRqVKTTP iNNeWSkf8buHSq7vvu+5+pJCwcYOpvQLqDMie4P07gOr7cA2GeSPKQL/5WKCpynsOIsPv8qSkiC pWZ/i4WxD7ntQkg8FtBOQJWNSOEOl5bwfaktFqMRValfbmVUmi49/zuWHwYMcMpBGpSdDHnBbeB hXkFOFihyxRoR6n796SgSO5rLVKi7jcyZGyQnbDW60hXKR6lh5AjCiGDHcW7Anvd8cD+7STNxiK BOYfUd6hCxn1ZeA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Reviewed-by: Thomas Zimmermann 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 Wed Apr 24 06:33:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 791679 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 429F7157E62; Wed, 24 Apr 2024 06:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940588; cv=none; b=LxH/B+1J3h9xFYjQjUCQ1amLMBGfCiU+Lrucl3IQALa5WuvMtoAQxlov283YdUnfZeOQG4zw4iZvbGOnmyjSgNJtCtxNI5GxMFLTPGg94eATNY5J2/+5I8DEXAL3EW9tutNlgH/k28v3mMtrnh7uKuNNftQBcnxomMQSdplOFhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940588; c=relaxed/simple; bh=q+qnEpK+l59jPIQe5UqWWsiYjfA7aXbDpteN/UQE4iA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CCTotrZkHKCfDUG5w+n3J4e+eXW8LCipj4oBDH2vAOfs20f85XXj5IOlSdI0lZRpetw26cF4rxgIenxziJOQymauiGHxqYHnje5ZNCaguxsHVgf4HsSnMZF/DWyYzb3xk1sNpChzjjKLcs4OgxKv+bVxUMV0/FbrLMMLesSDgSI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YXIwA+L5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YXIwA+L5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 366E3C113CE; Wed, 24 Apr 2024 06:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940587; bh=q+qnEpK+l59jPIQe5UqWWsiYjfA7aXbDpteN/UQE4iA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YXIwA+L5lnMLivG8Ty4VlkldYLZBJZPHVVZMR7CTjhW+GrLhvcLYVr97KR3EvltKy mxtpqmvPaHIZXvzV8eT0jlixtWZ3xh2QXaTMPa6IGG4p1VHEaxnlHdkZ+MOSUVEESj jmUAq+E9AcnjSHKsrj78MpyR7YYPeN4oPNUzJBG1rJRihgFkOJu4XbplXbCpzhDIUy fcBi/Cl8klNVmB4h4wO0XDMTkG4I7Ivgslvta3HSqjYYs/az22Y4ZG6p/b/qHEGtih 9WsxJToWE/vq25/SJ1SqPJ9cWerEhS3jYmspvsRwsUqIFGq5P7adOML7RcGx4zgFSl KP5ImGssJdGIg== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:45 +0200 Subject: [PATCH v2 19/19] const_structs.checkpatch: add lcd_ops Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-19-1aaa82b07bc6@kernel.org> References: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org> In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@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, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=924; i=krzk@kernel.org; h=from:subject:message-id; bh=q+qnEpK+l59jPIQe5UqWWsiYjfA7aXbDpteN/UQE4iA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfuTlvNIAwrbpIVvZdLwVKRUFDW99McbcRZO QcDFmCzNHWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin7gAKCRDBN2bmhouD 1yEQD/wNRPPVi0sZ02CXQxc7WhjX2fS8W+11eReyDlq0TrPblfN1uN5EMVeLOipf070lASAUEgU Gtb/gaAZ5okrFRW0X2hOeeIODr5KW1USIedvITCosTww6e0o9/cTpygkeVTOALUJOnVMgpLJY55 XRMvMJ4qGnfcWgPBAbjF93sxBkG6/HFDtOpxQDDQY7SHg59WVwHZi5oBviEKsJAYPrV9HcUMQ+f 3NoMhI72z6PrcVfGF5cqmzjrohnUZ62BHJHta13v+PzzYI7MSKNL7cJ7yZ/IpxZoD98gBNLGad9 981Jw4EwZJDQ+SZkds/AN2cOvHrrCiR7H1ufn9aL7sMA+SMYsVdyZWNvxiYu4+x0SxlKB7nU3jt 2iLwQLhDJRdPEarPDky8Zb4NwSmci44wy+6CkYp5wt7CN+jJLGTMchJNos8QG22urVDwI/ioxVf gwkTBb55aKgzI7G/igaFKh/KyHdHZfxdKwtWKi9qNCi8rIWmr8obybUjejGetKkDveClRmLwX1G +upKHPFu6Tu5tH87v78kZ52gfA6f9kojKKKevH0+Lrsr+H41Al/5f7RJm3/5eoLmoLnWdSKxiYN 4zuMqxjysxD7OdAaSsdgxFdiZhtldi3P0icA+Ykb2lvqkxFh/X4AIunJukrYCK5w1CEf/fOHFTq UcMo7yh1XzNrCMQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct lcd_ops' is not modified by core code. Suggested-by: Thomas Weißschuh Signed-off-by: Krzysztof Kozlowski --- Patch making lcd_ops const in progress: https://lore.kernel.org/r/20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- scripts/const_structs.checkpatch | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/const_structs.checkpatch b/scripts/const_structs.checkpatch index fa96cfd16e99..52e5bfb61fd0 100644 --- a/scripts/const_structs.checkpatch +++ b/scripts/const_structs.checkpatch @@ -39,6 +39,7 @@ kgdb_arch kgdb_io kobj_type kset_uevent_ops +lcd_ops lock_manager_operations machine_desc microcode_ops