diff mbox series

[v1,3/9] media: vimc: Constify the ent_config array

Message ID 20240424235741.17093-4-laurent.pinchart@ideasonboard.com
State Accepted
Commit 27d8f61ee977e15bc1b6c36fca1abe5d08919782
Headers show
Series media: vimc improvements | expand

Commit Message

Laurent Pinchart April 24, 2024, 11:57 p.m. UTC
The ent_config array contains data that is never modified. Make it
const.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shuah Khan May 30, 2024, 7:29 p.m. UTC | #1
On 4/24/24 17:57, Laurent Pinchart wrote:
> The ent_config array contains data that is never modified. Make it
> const.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>   drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
> index af127476e920..2083c60e34d6 100644
> --- a/drivers/media/test-drivers/vimc/vimc-core.c
> +++ b/drivers/media/test-drivers/vimc/vimc-core.c
> @@ -81,7 +81,7 @@ struct vimc_pipeline_config {
>    * Topology Configuration
>    */
>   
> -static struct vimc_ent_config ent_config[] = {
> +static const struct vimc_ent_config ent_config[] = {
>   	[SENSOR_A] = {
>   		.name = "Sensor A",
>   		.type = &vimc_sensor_type

Looks good to me.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
index af127476e920..2083c60e34d6 100644
--- a/drivers/media/test-drivers/vimc/vimc-core.c
+++ b/drivers/media/test-drivers/vimc/vimc-core.c
@@ -81,7 +81,7 @@  struct vimc_pipeline_config {
  * Topology Configuration
  */
 
-static struct vimc_ent_config ent_config[] = {
+static const struct vimc_ent_config ent_config[] = {
 	[SENSOR_A] = {
 		.name = "Sensor A",
 		.type = &vimc_sensor_type