diff mbox series

[28/71] hw/i2c: Constify all Property

Message ID 20241213190750.2513964-33-richard.henderson@linaro.org
State New
Headers show
Series whole-tree: Constify Property structures | expand

Commit Message

Richard Henderson Dec. 13, 2024, 7:07 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 hw/i2c/aspeed_i2c.c      | 4 ++--
 hw/i2c/core.c            | 2 +-
 hw/i2c/i2c_mux_pca954x.c | 2 +-
 hw/i2c/omap_i2c.c        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

Comments

Corey Minyard Dec. 13, 2024, 7:36 p.m. UTC | #1
Yeah, a no brainer.

Acked-by: Corey Minyard <cminyard@mvista.com>

On Fri, Dec 13, 2024 at 01:07:02PM -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  hw/i2c/aspeed_i2c.c      | 4 ++--
>  hw/i2c/core.c            | 2 +-
>  hw/i2c/i2c_mux_pca954x.c | 2 +-
>  hw/i2c/omap_i2c.c        | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
> index 3ae22cb052..2ea68c3090 100644
> --- a/hw/i2c/aspeed_i2c.c
> +++ b/hw/i2c/aspeed_i2c.c
> @@ -1258,7 +1258,7 @@ static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
>      }
>  }
>  
> -static Property aspeed_i2c_properties[] = {
> +static const Property aspeed_i2c_properties[] = {
>      DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
>                       TYPE_MEMORY_REGION, MemoryRegion *),
>      DEFINE_PROP_END_OF_LIST(),
> @@ -1446,7 +1446,7 @@ static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
>      sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr_pool);
>  }
>  
> -static Property aspeed_i2c_bus_properties[] = {
> +static const Property aspeed_i2c_bus_properties[] = {
>      DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
>      DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
>                       AspeedI2CState *),
> diff --git a/hw/i2c/core.c b/hw/i2c/core.c
> index 4cf30b2c86..4118d3db50 100644
> --- a/hw/i2c/core.c
> +++ b/hw/i2c/core.c
> @@ -18,7 +18,7 @@
>  
>  #define I2C_BROADCAST 0x00
>  
> -static Property i2c_props[] = {
> +static const Property i2c_props[] = {
>      DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
>      DEFINE_PROP_END_OF_LIST(),
>  };
> diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
> index db5db956a6..80c570fd10 100644
> --- a/hw/i2c/i2c_mux_pca954x.c
> +++ b/hw/i2c/i2c_mux_pca954x.c
> @@ -211,7 +211,7 @@ static void pca954x_init(Object *obj)
>      }
>  }
>  
> -static Property pca954x_props[] = {
> +static const Property pca954x_props[] = {
>      DEFINE_PROP_STRING("name", Pca954xState, name),
>      DEFINE_PROP_END_OF_LIST()
>  };
> diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
> index e78505ebdd..172df135f5 100644
> --- a/hw/i2c/omap_i2c.c
> +++ b/hw/i2c/omap_i2c.c
> @@ -511,7 +511,7 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
>      i2c->fclk = clk;
>  }
>  
> -static Property omap_i2c_properties[] = {
> +static const Property omap_i2c_properties[] = {
>      DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
>      DEFINE_PROP_END_OF_LIST(),
>  };
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 3ae22cb052..2ea68c3090 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -1258,7 +1258,7 @@  static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
     }
 }
 
-static Property aspeed_i2c_properties[] = {
+static const Property aspeed_i2c_properties[] = {
     DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_PROP_END_OF_LIST(),
@@ -1446,7 +1446,7 @@  static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
     sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr_pool);
 }
 
-static Property aspeed_i2c_bus_properties[] = {
+static const Property aspeed_i2c_bus_properties[] = {
     DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
     DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
                      AspeedI2CState *),
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index 4cf30b2c86..4118d3db50 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -18,7 +18,7 @@ 
 
 #define I2C_BROADCAST 0x00
 
-static Property i2c_props[] = {
+static const Property i2c_props[] = {
     DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
     DEFINE_PROP_END_OF_LIST(),
 };
diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
index db5db956a6..80c570fd10 100644
--- a/hw/i2c/i2c_mux_pca954x.c
+++ b/hw/i2c/i2c_mux_pca954x.c
@@ -211,7 +211,7 @@  static void pca954x_init(Object *obj)
     }
 }
 
-static Property pca954x_props[] = {
+static const Property pca954x_props[] = {
     DEFINE_PROP_STRING("name", Pca954xState, name),
     DEFINE_PROP_END_OF_LIST()
 };
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
index e78505ebdd..172df135f5 100644
--- a/hw/i2c/omap_i2c.c
+++ b/hw/i2c/omap_i2c.c
@@ -511,7 +511,7 @@  void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
     i2c->fclk = clk;
 }
 
-static Property omap_i2c_properties[] = {
+static const Property omap_i2c_properties[] = {
     DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
     DEFINE_PROP_END_OF_LIST(),
 };