[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zp4O1tomRx42sD9o@pengutronix.de>
Date: Mon, 22 Jul 2024 09:48:38 +0200
From: Michael Tretter <m.tretter@...gutronix.de>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] media: platform: allegro-dvt: Constify struct
regmap_config
On Fri, 05 Jul 2024 12:53:51 +0200, Javier Carrasco wrote:
> `allegro_regmap_config` and `allegro_sram_config` are not modified and
> can be declared as const to move their data to a read-only section.
Christophe sent a similar patch [0] before, which already has my
Reviewed-by.
Michael
[0[ https://lore.kernel.org/linux-media/01b9b16b2f86f4d16d9871a29dcda9245512a1f7.1714894086.git.christophe.jaillet@wanadoo.fr/
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
> drivers/media/platform/allegro-dvt/allegro-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/allegro-dvt/allegro-core.c b/drivers/media/platform/allegro-dvt/allegro-core.c
> index da61f9beb6b4..1a19fef62e81 100644
> --- a/drivers/media/platform/allegro-dvt/allegro-core.c
> +++ b/drivers/media/platform/allegro-dvt/allegro-core.c
> @@ -179,7 +179,7 @@ struct allegro_dev {
> struct list_head channels;
> };
>
> -static struct regmap_config allegro_regmap_config = {
> +static const struct regmap_config allegro_regmap_config = {
> .name = "regmap",
> .reg_bits = 32,
> .val_bits = 32,
> @@ -188,7 +188,7 @@ static struct regmap_config allegro_regmap_config = {
> .cache_type = REGCACHE_NONE,
> };
>
> -static struct regmap_config allegro_sram_config = {
> +static const struct regmap_config allegro_sram_config = {
> .name = "sram",
> .reg_bits = 32,
> .val_bits = 32,
>
> --
> 2.40.1
>
>
Powered by blists - more mailing lists