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: 13641325 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: imx@lists.linux.dev 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:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641326 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 4D7A236D; Wed, 24 Apr 2024 06:34:42 +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=1713940482; cv=none; b=KTz6HRa2DjWWeFgs0eGAJOuSTeD2OZ9IuyF3NAGs37tPPxRcwiQzmkgvL+TsrPEejEAmPMPf3Ao8udWpj5pBcGdQbd2//QHlxNrG3iOcIRvXsyaahLCLs1wZxPaMsz3D1rUz4mc5hZwrzt+o38FVuHIOVqt//TmDfR1BNskahDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940482; c=relaxed/simple; bh=ujJLvtby2juc8QEFHnS//3ayXKjJ0LbFnDL/vxd1pSE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r9OJTTa1fgZLrgTVwtsafA/D4mOsKU8mnlUDjO7JQf8sjUadHry5MfJZlwkv0MCCQXJo2yqa6cnnbIb07Scml5k5uwfdTP0XEQzU0vLr5b16B4gRriIFGp2gJoQlHmBGE3qwuDsbiuJXduN+l4GwKCSm91Bnu2Cn5pozv1U4NNU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d/LWKauu; 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="d/LWKauu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71942C3277B; Wed, 24 Apr 2024 06:34:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940481; bh=ujJLvtby2juc8QEFHnS//3ayXKjJ0LbFnDL/vxd1pSE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=d/LWKauuDFveIJ13dytv+KU3xMikPpeGTnLvWjNUcOP4oWx0y5EJy67Oz7v0VukWm pLusQ9wKDLrzJDfEVGMH0WZLrz8yK387bcDCfQVxHPW/tLxfoTyhC7AgFOw3twNut2 TM+r3ZGlqrU7gYxLjmuLroU4+38nLv0xc4TvvGFryL55jb68JzlcaBahtuYPrA6eyk BNQavvpG/Toii1onnF9zgL0rzuJ9laK++UDHJQCoJpComJONQywY9jngZyFQlbptZk IvVs6dCdvgnHoU85YdBjZIoxUGL6hqZ95XS8louQkYtl0sunc+6dkLl7IqKEgug2ka e/kkahfzucFfA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:28 +0200 Subject: [PATCH v2 02/19] backlight: ams369fg06: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-2-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=850; i=krzk@kernel.org; h=from:subject:message-id; bh=ujJLvtby2juc8QEFHnS//3ayXKjJ0LbFnDL/vxd1pSE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKff5jSyRPmEYqwfFNIBdCINRpn6WCm55ITCt haEbteXAaaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin3wAKCRDBN2bmhouD 15u+D/9kI5cE+y9O7Co58c3g2cDXHqDrv3gMH/8aVz2pGK/qyXKonuQ4IibZF0P5hxbg5wlYUc0 z4KXsd4+f0D/zAwwh7USdPRYNjH4jo7V+eIiSak24C3OWaHvMEoBWuoGdOGX6NNCBgAcw8ixSrz RgdDQ41e7BTwZ8dxzHL68AW4u6GM8ArialmSrYAltfantLdKc0UNU+xAxWGynJQCaH1s/P+EnDd Y1fKe7oLLHoUAt6NSu6H61ibGx/BUh7mjrbmNItm9AE5oA5N1WFJUgXL2Ryl1XerhP4T3wHqlFQ Cu0xDb2xWUW7in46UfG663lSypUwVCizA61i+TNMC+JiTto5vhCn5uaxWDS/sGGSFsfmnyGsDKn Qs7wPBmxnIghC169q3WWwXE6xqYiaOGpiosJiyCYx+He6awn4NVsc+O1EEyUZ6wH2cLvP8i+0YU cgr0wAYg5l60LphWowE0U/ukl2+eKGzCtyKaCgykrZ4/7+LYPWd+toI5qEG1HxlLt0m8yMCWZe/ xprDfY0XVm5+DLVoIMPWDw4sZ8958MLnSKIidmSyrQ+f8nHigE83IwaDC1SSD2AjfAS2XTAbiUO ZTWU6XKMnKvRMpV5KK+WqyfBdTAORn3UYfTl0aDDVOGTYKm3Dd6Ed0xBb9mqslcYwMT5tuPCQgJ KYT+08BfJ3I2pXA== 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/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 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: 13641327 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: imx@lists.linux.dev 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:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641328 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 A190141C67; Wed, 24 Apr 2024 06:34:54 +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=1713940494; cv=none; b=Az8eRozYv7C5AHqP6lnVbDXuHXeJj17CUyei/xR5n+gjUzpgDCvBNqwRPBVv2PlyY3RjPOsmKCz8szbyr6SG3jYtaQdiI4RGwq0k0cJ5IPW9a70xAYJOKK86x6nDw8uJcjW+l1dfnGp3TPv8zGbWWuY9sENKQ8o7OpPjvutMJ48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940494; c=relaxed/simple; bh=NVCidXNtdRLB67P8hr8y4kewhrswWSzn5zoSydb49Aw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fPJMwG/tD30+RMiVG4OVwtj3zQmn08faLtnqvbKHFiffxa6PF3nS7PodppQFGBVau6D9xk0JVa8Tcr0G34zLLy6dYPmIR+KB6r15AaNV7zNq4f3R4zb2PQlzlg/Q3Pi8Gq0a/VVdVKXpyRdkTSdcU92K9ZlxJBPJRqaVlWNlXX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iC6lkDvd; 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="iC6lkDvd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87C2AC2BD11; Wed, 24 Apr 2024 06:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940494; bh=NVCidXNtdRLB67P8hr8y4kewhrswWSzn5zoSydb49Aw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iC6lkDvdo3BzfOZ8nC9ldvIdK46dWYqTj7Ei1w0kiM1hLFOBQqjX9Q+AEkXAk0SId JFFUQ3/zjomsxsuy2i5UDpCJvm905n5OWon1sl/xnAnZ3EPaji9b2gngsSBfIUG5L3 eazCW23TY+79ys86Yc6s5lR0zXm/XHGE+uNHlSMCeHxMinvjqFGKSE+m13qn+2mF33 /OJVkdpA9omhddjTt9uc9j4Mqv5R16PAGCDXk9AdNdDmZSdGRBDEdwJoGvijZAU9+V 6eYw9rQZmTNoTtVy2ePy/DAVkuCWNSrqKYl9WH1laUVyYjs5jYzLdFR7Znvngi5h/M hEpvF4df2hzKA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:30 +0200 Subject: [PATCH v2 04/19] backlight: hx8357: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-4-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=801; i=krzk@kernel.org; h=from:subject:message-id; bh=NVCidXNtdRLB67P8hr8y4kewhrswWSzn5zoSydb49Aw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfgTV/fcvZp74csJyRHQ2DjuVoXh0+Gqa6ko 9yq+pZCo9iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin4AAKCRDBN2bmhouD 18H6D/wKsHdxf4mP8bNrqmLewggNw25tOX/NDarTbpWMzhLhYBQVsuWUfeZbims5qUdVcfCKgKU uUDKWtk4ysWbvtR4YC6g78H21o3nHpjls2eobHLtHOhN+nGIxaovz5udv0SAs47B0o4uttyIjYV thMkB7o/QCavb17TcvHUxgCJ0C4TknD8TyzEAge1RvroPOnKlqOuFM438PopEt3aULPItS33CPl MKOKreOVAZ+cLqZX9RaCKcKPrNwMHVIF5hNjxrypuEDOuw/PjR/5FROh7n2sCyEG+jjnCrCMpoh sBXBDylYJ+h67DGMKCm96NX7hSX0SLPBiIctUxRA6FNvHNX3tRSKwDgUXKMU/jiPL1MpQfWW/Lc gFzrpDnSS9Nu+HYXWkfEDJBv/d+b0EYa1Vrg1A7HGjphhA1YNgR9CPjiKM36jXSQ0v5JA1HIPGA RTmsJFpjkuIGAcRzO7SQrHmqBnrgvz9XgBXUC6bpaDQyDWvsi+FfgIp3wneFVUybXAx15E2kBTg +N9CvmrtPRC/uqyu269Puqwjuf3k3slJ8hCMS79S+hs6h4kQTtlt+MtYyhGtzQDoUk9iychIMv4 4vKKDxz9GI3AdeSU2PjgG7+bFN7OhvDkqD8JUg1OFeC3KiZqP+x6NrFGpG8VoQOkH78eHa/fial HOx8tAPlGRITEPg== 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/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 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: 13641329 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: imx@lists.linux.dev 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:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641330 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 BEC8841C67; Wed, 24 Apr 2024 06:35:06 +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=1713940507; cv=none; b=GDtPAJCsUj7ysryEDeW71/vJV5OeTiqREKirAp4i0OJ/DkNWuiM0ZjzOJ7W/YTA+JgLuoka/c8091sgnhFL4y3BySs0ZiT4O2MvgftcY5Q0B4qULR1p7BvUQGA3rwGqqf1N/pE0eHWBzfQTvhpQApwZbJU9kOCuFXG1vdDP+CdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940507; c=relaxed/simple; bh=wU56o6IRk+w/zyCtQAgmAtO7kC/xHPmjWsXJIiMIGjI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mCXmSisIA1JYts/MPhuhbPLvgpvlD3ErnhUZUBSTB1kEGtPo3uAs7aGwEl7MSRwdoKNGU/8pi8GDTsoIZZv5aGHgsmr9NvoQzboKRwhgOSNLGlEsiSqyyDEBC0cJcgQwx2Pg/h4DlnaE9GgVl4WOcTaMhyg57e0zr89mIUBPfTI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O4YRGvdM; 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="O4YRGvdM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11C7EC4AF07; Wed, 24 Apr 2024 06:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940506; bh=wU56o6IRk+w/zyCtQAgmAtO7kC/xHPmjWsXJIiMIGjI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=O4YRGvdMrbSSd0h4kc6I4VGBW6GUmq+7POlQDRbMhkDy6tyT3wPAm0U6639BLoDy2 pc92NlO3y4PZ7V2VYkaf3pbJbW38GzI4nIjxGc+/gml+nmkH3HfGpLjWjyiMHRS4wB KTK8o0Fy6OafYkVJFTgmws1G10L324yR4magSj8LZEyOZacFtnuzquLpvl0v/9uwAk FDbZ26+k2JbzBhW/08ACSKkkmQawRI+Xyi6hS81DIMNx69ypi5FJf28sjrfPUnLfu4 wHWLR8LbSlHEFNyOJ6WaeZDeZCHef7srirYe73xrtDArKsUWMnQ7qUbsv+lGOOFbZ8 NTcXj0VkFfaYQ== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:32 +0200 Subject: [PATCH v2 06/19] backlight: ili9320: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-6-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=wU56o6IRk+w/zyCtQAgmAtO7kC/xHPmjWsXJIiMIGjI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfi7SUmzEwFhDA3Gu4Na9Y/v/mgYOlvJtevf 5MvxP4khJSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin4gAKCRDBN2bmhouD 11YaD/9DWrDdngpRk03vWD8VsPY9N5ciGuLjx9uJTxNIvhRY+S/6GcCx0xFTCwnd+nuju2cigUJ lwo/1w51zNFSMLGcT7b7/n5ojfSSJg9mWHbdK2iKqlMkV4Oj4rjraPeA9rDgq4QaKX8ZUT3elmQ NVTTVF/HJuuySHnBmDnIAsEqpj+iKZmRjOpu8UFvFaZdFyf4YHtbCkcXmNktMOyvExnbiBf6dH1 /1UyXPW+weTiRUbVhDfnxJWl7YgwjhSpZzodh8Tv/PvuSc8EsT4HmEexJMX4jbvIjFCs9t6/5lh 8nPKK+5lCQBPeucbs+W3hJvy8ihWerEhFY72leWx25436STy0ZWN0wdVEEzTEhLAyV1mxYP6kDg NnYyuwEP5YHBxG1FtMR+LM7jpi1bL5k7o56s4YVw4FM5vXtAdL1lVS2YEw1BlldLKnTSs/vbKXp pJNYXPhn3nKfE9kf1Bwz0CcsqWFGSRKuMmiJbv5P04iUYPS7navT4z7JC9WbtBTC3zUmuXy1vUT d28OG0cF/xrQMIS9c5JBDvdd5I9HoIFopT7/vJBkJZmiiHVKnlKYKtbdaIVRQcc5ip9Z7v7zKqc 14JAwE6u2traRH4NkQ5+jTcoFlTlpq6vAsMWeSxOZTPZ1XP0YFp8pySa/JItg357kCZv3b0x/MO gtbyed329RfSc2g== 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/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 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: 13641331 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: imx@lists.linux.dev 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:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641332 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 A466A157E76; Wed, 24 Apr 2024 06:35:18 +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=1713940518; cv=none; b=sIutf3Vw4850zM7IRJlF2PSzTKkKtQ8c2TBG1U65lRCj2l7B6pqyFX6EldA2O8pq/1hWdFbNeBjEw8xnMaZWdW0PMEZp+GIUZ1x4mtas4DKip6NQ1JLJNGTDrg3VXLTW1BDQjJLOP4/pe7ecIwALhgqGzK/XCtAgjSnotqm0poI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940518; c=relaxed/simple; bh=CEfgA0oELJOz8zvb6Nr80IYQhRv6FJqaM9RUu8IYCmw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tWykBCbDBTX9xFdZMp1KWZcJvsQFbH3lvYferkYiWKBMXt4lp+O3TjDbF8MmRryoXk2lfsamLZcJQFYxcqzAfiJTBhYh6tNrtJzyZGeD86sxvlDDvDgis20hWWudenuG/D03Fwka+eYU6jvR3Z9sR4tnKd7qmxUfHM22mt0PAPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o+zYdMiu; 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="o+zYdMiu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0647FC2BD11; Wed, 24 Apr 2024 06:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940518; bh=CEfgA0oELJOz8zvb6Nr80IYQhRv6FJqaM9RUu8IYCmw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=o+zYdMiuoHmlUXAozP7JvGxs1/BBHVb6A/1Wqw7vQZQr5LIj8PWYVIB3QV1WaVQU4 G1P3W/QguqF0Nqz0M6BlN6LN2Ts+Y0FHyTawMGHFhU7CNIhHehyi9OvPeA9oFE45nU qwIDKE8LAekD2TQExNA4cenh5Y8IVlJmE/2LqMGn3hWr9DIxAW7l5FZyNsLqPVgXQ1 XpbPvdo0j4q0mHQhkJ98lz0bYl1gGM+X8qFUDHRE5QQK+6IfWtGJ3+RK6YA1AvCcC2 uXmz7twI5Wb+CfTs1FhNxLta5pKlTQ5MUHdNavwXpYqjRivpVLKnSNzASpi0mDCbuJ IKlufIurvZqqw== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:34 +0200 Subject: [PATCH v2 08/19] backlight: l4f00242t03: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-8-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=846; i=krzk@kernel.org; h=from:subject:message-id; bh=CEfgA0oELJOz8zvb6Nr80IYQhRv6FJqaM9RUu8IYCmw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfk5EmRUP/OMskgfwTpVvJdKVOsnvbUPDtRI gZNsfKqLmCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin5AAKCRDBN2bmhouD 1x9bD/41s1qi8ODzYh2QLVdEnCbY2bsumCATwNpDO2xtfAhQTtdQl4k1xitz39bhv9G00h5bkj6 OQt+X7a03rrHVo1LcNMrsqPpftc885Vs1IrHBzJIAupROnC9L4CwMZ0IwrJmp/rsQ6keHApZCRi 9NI5oQkbPbEowGTwqAy7zNSDymk7t3iF+hZHQJk7duCVgP6vyS3VzJB9oC9dxRT7H0iMvzi2/JE rxN14hl+n4lkb41Pk2YhnQew/nb3Pk3nQq0BfNZ7mCfJaQbn0yRTtX5ZXNkb0fdKsMCe3iCSErg F2379PJnhLpON4xKsVHS9JniHNhMx7obJaYSTfloXkPaDbXJT3+ExR479bS6zQIgsbrK0k6VcWa qk+ipGyyLnBoyugAwDnxKpJVbgWziUmo+VJafRgYdooCBWfB/veCOd8UdM1XhYEHCkaHl830UOk a6yLQlFyH407/Rb1ILfMHY3bpvrQ6dPZ8WOmpPFl129WkiB3nDL3Woc4K8oGS/w0QIVvACJtXiF IPxxBghC1k0l0mQ5vDqbKlvLJy3osYAXuAm5vVzHs+4icHP4p0QAfzvpG2S+BhX65J5piIEdQa1 iEUKjU8JnzW7sMQQLN+iy4fpbTR7CclU8WsDqleSaoC49s/irrdQKbJjbmg+z3N1xHNSGasWPE3 d57ifB/epA4UnIQ== 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/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 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: 13641333 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: imx@lists.linux.dev 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:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641334 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 DDA751581E4; Wed, 24 Apr 2024 06:35:29 +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=1713940530; cv=none; b=SnDvPdRsPcY+8Hitv+i9gqJEEv++vZ0hpN3N4yPe9tDw+8q1iZCFlRFHRq2rC3jwK7ZECm7JEbEf06JfZRs0D7y11KhLKfL8P0yr6nn7jr8IC0c+UP82aP3UjURnDdWDJgeEfRISaYMZxGE0dXUd3kTNtEG29F3teX2AFvMLWLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940530; c=relaxed/simple; bh=Fx9+dUHugEQySUivGavZSc1jQG9pzqOGcKVq50f7j2k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UGU3SYeMQjR+HFgHa6DQMcVkjKdaiPi0N5YdwxikRjI6negmxchgZyoYikdrBt+y1FefgXUl7J4auu+QgF/a5vWcitDzpisHyG10cBEEJeNJNj6qzZu4yA08u+5mGL+PzA3ylTfL63mmyQ0zL4cj47V+prtOGzjGbESXDf2A1Ys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U5MdHish; 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="U5MdHish" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE7EEC2BD11; Wed, 24 Apr 2024 06:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940529; bh=Fx9+dUHugEQySUivGavZSc1jQG9pzqOGcKVq50f7j2k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U5MdHishgJ7jQagQc0oTt3q1QOqH2/YaBbWOsX/kSypATFN6H2FDXnXnce+5Qt8ma bQuYpEM/YxQ0hc0YY0vYeb494KBDiE9FkvGNNNKHtvwP21IB7Pvk/WSr/qlMq4bzJ9 brtVSf1klRCkbmWsXOgGcrje1XjF6IyxaY9dChM83od3NikWEe3xKOVIBj8LaLr4+m adXWN4wUE3QuN93zxStXYJqZvjanr2Ir7HUAdIjrTKc9Yn1HQM5NY6TCP9B1sB7NA4 kJ8zBLp3p69hUMRqpY+Ehu3xn/KGFa20+gGISmMEpRF0IBMx3GEYk17ktnue6AMo7U OaYmhuIroIuug== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:36 +0200 Subject: [PATCH v2 10/19] backlight: lms501kf03: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-10-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=875; i=krzk@kernel.org; h=from:subject:message-id; bh=Fx9+dUHugEQySUivGavZSc1jQG9pzqOGcKVq50f7j2k=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfmegAveF22d8Ic3BYkt029VxOLUxwbx0Erk cyS30bVh9iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin5gAKCRDBN2bmhouD 1/mEEACTdRL9YoPeEkKv/321ctqh2JcRaDVJvy4M/Z0yDp64Bjc8Ge/LNAUdYGKFaNA999LVNIb bQnlLpyj++sZITizJiSMmWzmzKOarsz9C/kdLgkyBw0iJB0jZvxMonKKpNZeG6ILnHqh3ztwbvh 4rOkavZXKswgw/0Qzy8M47HoJVs84v/xs26CUs+beDV4iDxbWV9VuKL9dC5UEhavZA6cLiDGXmE XHRTtYJT+bMhneRxXMSjwp/miVymK23j7b6gsPVA8P173TUGf7nDd8WCD5CsJkbAzm6lnRX1287 VxkbGRENRt3waOXqhIu/7AqUoG3H7/cEnNL442qZwvN6/JHxd7zpaFH28Lo25TVL5cu/LXLk3VA bEExJIzJ2QEG9HKP9qWZV1aGkQ6ncrAA3idx++XvoNwIUBz4tcS36PWuTIPZxHNnFEA3NUV0reX 2BRxaGs/6gD5WxOn00pIrfU8f6OUSALhMmRwypItHFOUV7BcYIwmeplzF+StNmMHtKpCJoN0b/0 KDU18UcqJBK9X6kzV/rf21rDci8Femxz3FnboR3Se4D3K/7VbYZ4SjAx336swksupEIzfFSnmfH GA+ZiA/9w0p+ZLmr8rfq8orfRxv5w7KlqNQieD+t79zNYAtrPnlOopk+vDPsLUo1JAGuMaAEF9U 2dVimO3LQyq0JAw== 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/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 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: 13641335 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: imx@lists.linux.dev 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:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641336 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 C41A115749E; Wed, 24 Apr 2024 06:35:41 +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=1713940541; cv=none; b=fwkjVHFoVxDJzziOLlum0MxemPjkHrfQC3vq2z+fFhseauYWXiMTcCqq7Fl4Wf/sZ+M+5VIndn3XUnmgFwMPgfxXTdp+SU1MAbxJkZzL/Jq5DmV720+fSj6xM3KO4FLUwo9frnjgwSwBAFHmRLaNdkAx/FzbaL7+NjqVGIZzJOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940541; c=relaxed/simple; bh=Ur6Mwq5k3eb2nkdD2bgZyuoX+vud6tFhJdXqqhEBZ9Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aUhXQBiarzhpyH9NmvX4q7cMqiBKnQ1pLm20RN5z7EHB2oXrNHIVc8ZjtdCfNXVNMLtkhaRJQmkKgFxFS4y6uun90GC1nXFu0n1JXh3Hqm6ykz/6gzjfvuQhfGLOeiiHMqs77/d74vbdWn+PzOojgIqPoRHWZ4aH7H7FpukLaVE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EDRLUPLc; 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="EDRLUPLc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14BF5C113CE; Wed, 24 Apr 2024 06:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940541; bh=Ur6Mwq5k3eb2nkdD2bgZyuoX+vud6tFhJdXqqhEBZ9Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EDRLUPLcJvhWuamrXZ7Di4pDIzF+AeJnYu2ysGq4H8vft7bc6ZxTS3Lid/bRCyGnt t29MYcDHwAnDGLxhDNo3u6rbJL/vuDTHjZalh1jAY5zwl658d+IXwAHiKZDG6ImjHV UkM8sOYaiVrbNtinSOCmZoUWTA2GaHP6qIfthcw/Mkm0y0wqaO0PmKdmfsr/LWz5ae GqyE+YkHxTS3KY7eFjRCTU8Gc9+kwlPTMd3FpS9IM+sJuWwF8BYgbOoX3Zom8WkZc2 De5uwhO5SnIV3mkd5/8OnSIqiWfYOpYXnY6WvmYiN3h2r6OZF+5bN2zAifmaydBagG bEiMFHlQcFtPA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:38 +0200 Subject: [PATCH v2 12/19] backlight: otm3225a: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-12-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=817; i=krzk@kernel.org; h=from:subject:message-id; bh=Ur6Mwq5k3eb2nkdD2bgZyuoX+vud6tFhJdXqqhEBZ9Y=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfo7bu7xOTYJd4xu78MNjpQFCsVQcpVt2PGe Dq2iEckJYWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin6AAKCRDBN2bmhouD 11G0D/wILA8oLcbvIuxXdwPcnumJjOYb2f2CCq8MT2y6iJFasyu0KdtPsxP255aifCmYSyfoStF z4ypYX9kXVhH9okSb6OEHP8G7GoI+1z9HqMiOlK9kPS4ESKUx4oIzO6YXpr8euVy1nlOa2nCjey kIdHI7NqXuYzJUk134rTKVtht1heKAWW1BCBJFYNb+/fOCY8pVnrkztX3mkj92URX0oRipAFPO2 RSaUUGLk8r7cZp/p7nPfa30ZN/GegjG0B7VWX4hUg+JDMoItwwIgmNRS4af1QSzXDhfhJ+j11eE 8qZEbVC9D58LN3fvbzVSsI0v3mOhZIVm6bmy82qhlrz6EFJKQvqrAQLcaH9X5NakxqguDVVfPtV spMXAD3V/LMxWDhWpq9cOw5MeghArD84Q+TZHwIai7h2U1GgkNN8TLjwkCTXcLRpSZ7Z/x4nixL XTpevBoY1jK3opV6LXbYAX3BkYO4pEmLPFxwQYYfMqg2KA/h+ZDeonCQHTTUVSX4rAsesqnXyRF I+5pe4v8jPoSKBUczKAmhCiRxOAEmnTkiQZAUfYjf/5j1aHjtMKvUvXfC6Sl/XqGIJTDVkfOvBF RjxcNzc+X5DZac6x00KZeQCDxeNrrqaKT3Ov+ZOE3hiLYRvdDQ35r2C/XzKlg2WrQ92r46/KY9Q t1xENOlAL4KWu6w== 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/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 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: 13641337 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: imx@lists.linux.dev 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:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641338 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 3D193157A58; Wed, 24 Apr 2024 06:35:58 +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=1713940558; cv=none; b=FJcg0O8gm1VBy3N0Cdz2sRSu2wHvbhPJ44fHlUrI6qCeNxtJIoy+n08nVgaF4D0i8is5eY69mSoJBpyKzRq2+0OnKcOS7zY2UuxHVKTEFBvIM8B9VLDriSapJsHXl70dTgDTXsfwgCQaWNwCyrZc15nVXZUQ7H1EHWmMjupuom0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940558; c=relaxed/simple; bh=TlUGfQe5SGDRa6cwwzTDSZ6FsJSUi6EsphJ+q93qN/Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Xd2pDdNuSS3lmMENUOmqNcl+tpTmKnZ/V3z7OJvSBNXaO9tcCtBc2d8W8W4Z8/svl7GRgXOz37UzCMvzC30zkUHrafHfwiMwq4dMQP7lVZNB9+V6Rpy8FjGUH37iDbaEFIC2/24KQJo3nqgoYzeaa/YFcG8N2WLcGcl41lBU3Rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HsIwK7G0; 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="HsIwK7G0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5920DC32781; Wed, 24 Apr 2024 06:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940558; bh=TlUGfQe5SGDRa6cwwzTDSZ6FsJSUi6EsphJ+q93qN/Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HsIwK7G0yXnAxxyfQ+wQcwoQk/4yUS2LdPH4FKJGrWzlciwhAtdBVg95x/JPzAfRW aJVhOqs8jJvTYuNRI2PtP/7yQ9hYP7kZ8k5zhcYSccGepWoxYyYtmMdPnp4AKzQc9x wmVS3bhjvQlIEmQZl+KJmYsC99TeutGTS/VSS8UDd1FpL4Fi/m33M69345wvNGpjBR JXaQlB4xjH/YcCeep4/x+bevEvzYb8GKJsshafPEWh4EW4ZPqtwngZPajMscSgvjDM qBcRZvIXVLdUE3ghRApjYr+FteiZrt2rlH/rZ42LsX6MH63uXurG3MjBJBH2iH8PC3 qn7a1dWl3JLiA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:40 +0200 Subject: [PATCH v2 14/19] backlight: tdo24m: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-14-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=862; i=krzk@kernel.org; h=from:subject:message-id; bh=TlUGfQe5SGDRa6cwwzTDSZ6FsJSUi6EsphJ+q93qN/Y=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfpYdEeSv3NcL65O52Q6sWA40KLmS3LlypmM OWgoUME4sOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin6QAKCRDBN2bmhouD 1xsTEACQ1ir52MqKvyLooUpgZ69W7Vwikg8JCHqlcoiyVcgCWdpUzZt5PSobFmBfGYPOBT3CtrE 6AKdHck9Bcl9qlJIYFWc8H6WmpVpJ7uyO7b5fFhyHQmohr/Jjebk2BkiD+RiT7moRTXQbcSHU/X BK26dGd9VuLqr/fAyrVu1byw0k+ker7bphkHXrCPEm8BH/VZtxCjptsjm/Wf0PQ5oT87Uq6kvUo +Rgix6XL4qmAn9Drge+Wg0oK4siwsa7IbJgmee+ZRoGDIUFX3fwRYBakJxzCiElYIHUwL78s8Tk XaJNZkfYdiPEunSClGsmL0wC1uqE/Rq+5vkjMlzHkkVIboJKGVOxfAmBRJ2k7WPs6AqLhdmuBiX RxTAPgC9DhnleQBOygAchT748699qwddqkjB9xJs+811kV4fy+JenWmaFF0TAP/gViuDM8o2fag 1spjPgvbjPE88zBZcwXIu2PCzGgxbDt0K2wMKX27jexKjl1k/pKqEvVeJ3cAxN+Dmtw7Qk67jbb 8xAoutLG5wjGC6AlmmE4Hd/oFBq6b/EnWPzc1we+iH8RbeBnLoxViR10wH//2pm1DWv7XprURiG 3Jrl+u17N9mH0f5b1BjoPUrfjp2iAtquui3kHbzgLBBzyOTe9TY9rnJB5DikjW0Vn/nV1/VitcY X7HBISQB3Eu9csA== 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/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 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: 13641339 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: imx@lists.linux.dev 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:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641340 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 78B8D158213; Wed, 24 Apr 2024 06:36:09 +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=1713940569; cv=none; b=HB/XtuKGIcBpBxRh8nCZOVcusd+fNAbNwdWss+E9l8qHxSDrP51mpEGOqewQuSSeROYrydZbDyyvTqaQh6d8KCM3OgxctilQJDIbIUAnQjk/p7AS8P0Qz2NE06f0r6AQ0UHXS3iqoMPO+JyNfltdbbgHQGx6yE+BIxRgh/nsOsk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940569; c=relaxed/simple; bh=QXNbru9NGCM4zVjapmJStHbmabBPmDui2fkd9b5Wp+s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=A9Hyl441axlE01KVNIozfckAMLiQ2F0JjdQWJyG1R2+2uCpTRj/c6/fOBkY0Gx21B5sEK5NU3yZsW/N7ur8Gvj8lB+/IXlXED/o9Au0Uscer6HQJqFjr6+U5nNbuzYu+gWfA/0JX9vyhzl7EJra0lEQxT4q7B1ndY7kXlkrCbeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BofvR8jm; 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="BofvR8jm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F22BEC32781; Wed, 24 Apr 2024 06:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940569; bh=QXNbru9NGCM4zVjapmJStHbmabBPmDui2fkd9b5Wp+s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BofvR8jmd7tGAhSPhM5vQMq26iwVvH5F3HW8ePprhNk19eXYDtHX6lZG/SWQDMYWg XzZdv9MNMRMqOdIgNXyHaUzcKFEK/3eNOa2A/2qbs2TSRZ+TB9C3Ljy4ZeBe8bK3p5 MsGdvitCvClvDspseWz0bP0QjeTIkZNChzEXby5Pm6J1iYJwxxArKigy2Yb0/gmz1J c3HI+AYLldLP0JD3XdxsNqbdZQ5HQmJLvcfGD1u6ALrV3urXjIIKvqSQHyQyvgKmKL 0y1TiqExvzM3jvCXFdAqB018mbkFvdQCXYYUGanZZKesrObijH7jX8Ugnb8MIG2t8b CYH3Fe3fziadA== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:42 +0200 Subject: [PATCH v2 16/19] fbdev: clps711x: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-16-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=917; i=krzk@kernel.org; h=from:subject:message-id; bh=QXNbru9NGCM4zVjapmJStHbmabBPmDui2fkd9b5Wp+s=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKfrWj28tn3LWcrTWjpauc+CvW3QK/dCOFObz J+UNlWsn6iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin6wAKCRDBN2bmhouD 1+mlD/9fb+7DnzYZGRX01UeoybWGZDF3nW2aZbNa/mxgyWvYxm2HUqUy6zj3+qcMguiOVh+mbnQ xZd1j0wOjnPh4DM2W1QiGwefia+jAQb8f+QYYzMLxLsaDYguizYmc6TpxD8xKdEfptig/ZCzznF p4jM81f4pLxrPvzonNCTfd8r77oKD+Tny77r99ccMpikICEumGkVdAA2x/kfnDDetDapyLWI7R4 UnfBgk0IYvrOqEdIElmoAuQc2SBDxB2tD6//eQX3DbvKHiOosQPTtHJnCC9f9vffXQhkSXVwAMn wfQPHg3tbyiJtyAU1hlqv0O28v348tNwpbNuh6Tl4ziXWh10Fb5vIeSYfXKvlrIZeWGlT1zMP5m yca87NFkNv1xlip8NZdgbPCT6WdkLzaR9O84m6I53t87gUlI4WFv/96xiE6S9tJeohMvn1qdEm4 ZgTisIG90u9f3z+qmFZYutXfS5rNdqmuYacwV5SxQ6Mw7nJaB+4BEwUWVz+VdMA0DGRwWyuTJj4 Mxtww40VTQ9dDBJPDxGeBqD5W2GmSX3P9eO9lvoVDziI7jDH8HWHB2Qo4ju7VjADL9bDb6jMBID fosGm3DXO8XIC3PbvwPlWpnxriTNg3kfkEov7Lt7G+sB4SpElYFI3pUYdedgWhWloeK7Gy1axfI NFvp7r+k8E0izTQ== 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/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 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: 13641341 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: imx@lists.linux.dev 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 Reviewed-by: Peng Fan --- 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:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13641342 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 D5922157A74; Wed, 24 Apr 2024 06:36:21 +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=1713940582; cv=none; b=tLtciTEDVWxs7opZGKfRkVYum4q0YmBfw0yQqYyi8IHv2WevCvBG3yOSevO7I5qDGhJ3/paQbnctlMzrxbE5b+5MLW9L9CkKSeOrdz7Y2bYZckV7kXivsv3FG9WBEPkBUSTgSNHDpIxyVu9o9F+0dSNa7WoM84BhmUhCONmyy/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940582; c=relaxed/simple; bh=pWTvPRblCBNixub9cvr1im1fK9AjWZstRNm/LOmLlSI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=huk6gfTUxOo8cqlrdanczqLuYWwfb3yJ7uSM1JhGYiOiRvipzIkOHnKGoUIrinz/2wBgb+/KWFbWwJyCnvyGHfFpUag+f2C+YKZd6/upQENCyeRyXAxQF4OQqITffQ6f84veEBCRoTHy/KKCfmGlxuwafgwsZWvJWM+CI4Cafoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kIQPaSra; 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="kIQPaSra" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF753C2BD11; Wed, 24 Apr 2024 06:36:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713940581; bh=pWTvPRblCBNixub9cvr1im1fK9AjWZstRNm/LOmLlSI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kIQPaSraYPpkNqJDLVq/3V71x9Avn1Y9IoOIrwoekLAQpP3c7BCJokvWe689hhPjt COYj7mpX7bT2DrmY/MaiEftznTdE0IQb+PwDAStni00s/0oDChvHoMRXH2N35tbEjH +vTXzQnQSBs2hXQ6cHZgWzu5yaTyoXS+0TqUqRBZEDosFajGodg3dtGv1DJ/3+Qel5 /LIuo0OYzuuWJptpSDZ4bZDGTQ3LZZYGCyPkd/AkigBZbs4WFyVaCw6LDXSsfNF/jS oWEMEt0qIocGFIf6H0jpwz9yUzCPMnhvf8p2dWRQjGn/f5J9vgX95q7ojmjO5KOY/N xMfRn+sgRCEWQ== From: Krzysztof Kozlowski Date: Wed, 24 Apr 2024 08:33:44 +0200 Subject: [PATCH v2 18/19] fbdev: omap: lcd_ams_delta: Constify lcd_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240424-video-backlight-lcd-ops-v2-18-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=990; i=krzk@kernel.org; h=from:subject:message-id; bh=pWTvPRblCBNixub9cvr1im1fK9AjWZstRNm/LOmLlSI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmKKftmm3FnyH0c8ZapIjiaRSDuKNvLbICJ53Tu +qqRZuB/++JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZiin7QAKCRDBN2bmhouD 1439D/4pVsJu1f3Xvi8hmVDQuIos/Maf1iCjIvbsiizAkfBoWwXCLqk1SASLj07n928Xg4D9SpQ WBE0WMVTqLfw4u19v+WqNunGMsUkIExGU+AAQZBGEKmVg5VxCLiAdSTnc07Ys8GdLD7S4UuymFb ijeT4ucSJ59hfRJgHHpIhdphNIV4CEYK7dd+hbpEhBYMF7w0ThaQqAxS+X1RMCw2nA1N1+/LyeL H4wKncClZmWa7dZoQMlN/wWeaP4m9rmdRmsSSdOuJhKthMlvQLM4kKIAsub0hbqFgsKR9BaoK1v wfTpyIGN4Ukejfgonf7bl+zV4brZKhGdmtZZMH5Avae76ZltNz7zAp4+ZGFNmbZQT36+gKyudNE YOxajN/1/XbXexKojbn/jxmt2vsqQOD5zf8MXOdPV7iXCJTOGGuc/Jt/a89ynfghenxeYUh1gTS 1gRRzUrIVHGa93CVsI0JO9gSK9KwfWtCik2o2Fx3Iwp+A+erxOenVBDzQrSJgtDKTx2orjlm4OF OUFSay5KqPG34pStikdgKaP7JhV/lSSHIfMt62G6rjRFemrh8qdQPKkG+AY/BfMEdwV/jrdgAcP SLeU4QzlBmsVYZr1fFY/0Zmut4OB2Y9yEM9LaGkb27v2oIw8ro3o0JDOFfSm/1BkV5S/nzMfBCA FpjLE4ux8x06WZA== 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/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, 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: 13641343 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: imx@lists.linux.dev 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 Reviewed-by: Daniel Thompson Acked-by: Lee Jones --- 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