mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Michael Tretter <m.tretter@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: [PATCH 2/2] media: platform: allegro-dvt: Constify struct regmap_config
Date: Fri, 05 Jul 2024 12:53:51 +0200	[thread overview]
Message-ID: <20240705-media-const-regmap_config-v1-2-56881442bb30@gmail.com> (raw)
In-Reply-To: <20240705-media-const-regmap_config-v1-0-56881442bb30@gmail.com>

`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.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.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


  parent reply	other threads:[~2024-07-05 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 10:53 [PATCH 0/2] media: " Javier Carrasco
2024-07-05 10:53 ` [PATCH 1/2] media: i2c: tvp5150: " Javier Carrasco
2024-08-07 10:00   ` Hans Verkuil
2024-07-05 10:53 ` Javier Carrasco [this message]
2024-07-22  7:48   ` [PATCH 2/2] media: platform: allegro-dvt: " Michael Tretter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240705-media-const-regmap_config-v1-2-56881442bb30@gmail.com \
    --to=javier.carrasco.cruz@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®