Commit 3009e8aa authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: sja1105: constify the sja1105_regs structures

The struct sja1105_regs tables are not modified during the runtime of
the driver, so they can be made constant. In fact, struct sja1105_info
already holds a const pointer to these.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b703008
...@@ -404,7 +404,7 @@ int sja1105_static_config_upload(struct sja1105_private *priv) ...@@ -404,7 +404,7 @@ int sja1105_static_config_upload(struct sja1105_private *priv)
return rc; return rc;
} }
static struct sja1105_regs sja1105et_regs = { static const struct sja1105_regs sja1105et_regs = {
.device_id = 0x0, .device_id = 0x0,
.prod_id = 0x100BC3, .prod_id = 0x100BC3,
.status = 0x1, .status = 0x1,
...@@ -440,7 +440,7 @@ static struct sja1105_regs sja1105et_regs = { ...@@ -440,7 +440,7 @@ static struct sja1105_regs sja1105et_regs = {
.mdio_100base_t1 = SJA1105_RSV_ADDR, .mdio_100base_t1 = SJA1105_RSV_ADDR,
}; };
static struct sja1105_regs sja1105pqrs_regs = { static const struct sja1105_regs sja1105pqrs_regs = {
.device_id = 0x0, .device_id = 0x0,
.prod_id = 0x100BC3, .prod_id = 0x100BC3,
.status = 0x1, .status = 0x1,
...@@ -479,7 +479,7 @@ static struct sja1105_regs sja1105pqrs_regs = { ...@@ -479,7 +479,7 @@ static struct sja1105_regs sja1105pqrs_regs = {
.mdio_100base_t1 = SJA1105_RSV_ADDR, .mdio_100base_t1 = SJA1105_RSV_ADDR,
}; };
static struct sja1105_regs sja1110_regs = { static const struct sja1105_regs sja1110_regs = {
.device_id = SJA1110_SPI_ADDR(0x0), .device_id = SJA1110_SPI_ADDR(0x0),
.prod_id = SJA1110_ACU_ADDR(0xf00), .prod_id = SJA1110_ACU_ADDR(0xf00),
.status = SJA1110_SPI_ADDR(0x4), .status = SJA1110_SPI_ADDR(0x4),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment