diff mbox series

[5/5] drm/bridge: ti-dlpc3433: constify regmap_config

Message ID 20240908-regmap-config-const-v1-5-28f349004811@linaro.org (mailing list archive)
State New
Delegated to: Neil Armstrong
Headers show
Series drm: misc: few simple cleanups | expand

Commit Message

Krzysztof Kozlowski Sept. 8, 2024, 2:21 p.m. UTC
Mark local static 'struct regmap_config' as const for safer and more
obvious code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Neil Armstrong Sept. 13, 2024, 7:43 a.m. UTC | #1
On 08/09/2024 16:21, Krzysztof Kozlowski wrote:
> Mark local static 'struct regmap_config' as const for safer and more
> obvious code.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>   drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-dlpc3433.c b/drivers/gpu/drm/bridge/ti-dlpc3433.c
> index 6b559e071301..a0a1b5dd794e 100644
> --- a/drivers/gpu/drm/bridge/ti-dlpc3433.c
> +++ b/drivers/gpu/drm/bridge/ti-dlpc3433.c
> @@ -94,7 +94,7 @@ static const struct regmap_access_table dlpc_volatile_table = {
>   	.n_yes_ranges = ARRAY_SIZE(dlpc_volatile_ranges),
>   };
>   
> -static struct regmap_config dlpc_regmap_config = {
> +static const struct regmap_config dlpc_regmap_config = {
>   	.reg_bits		= 8,
>   	.val_bits		= 8,
>   	.max_register		= WR_DSI_PORT_EN,
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-dlpc3433.c b/drivers/gpu/drm/bridge/ti-dlpc3433.c
index 6b559e071301..a0a1b5dd794e 100644
--- a/drivers/gpu/drm/bridge/ti-dlpc3433.c
+++ b/drivers/gpu/drm/bridge/ti-dlpc3433.c
@@ -94,7 +94,7 @@  static const struct regmap_access_table dlpc_volatile_table = {
 	.n_yes_ranges = ARRAY_SIZE(dlpc_volatile_ranges),
 };
 
-static struct regmap_config dlpc_regmap_config = {
+static const struct regmap_config dlpc_regmap_config = {
 	.reg_bits		= 8,
 	.val_bits		= 8,
 	.max_register		= WR_DSI_PORT_EN,