net: dsa: sja1105: make the instantiations of struct sja1105_info constant
Since struct sja1105_private only holds a const pointer to one of these structures based on device tree compatible string, the structures themselves can be made const. Also add an empty line between each structure definition, to appease checkpatch. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
718e44b6ea
commit
13c832a41d
|
@ -262,12 +262,12 @@ int sja1105_static_config_upload(struct sja1105_private *priv);
|
|||
int sja1105_inhibit_tx(const struct sja1105_private *priv,
|
||||
unsigned long port_bitmap, bool tx_inhibited);
|
||||
|
||||
extern struct sja1105_info sja1105e_info;
|
||||
extern struct sja1105_info sja1105t_info;
|
||||
extern struct sja1105_info sja1105p_info;
|
||||
extern struct sja1105_info sja1105q_info;
|
||||
extern struct sja1105_info sja1105r_info;
|
||||
extern struct sja1105_info sja1105s_info;
|
||||
extern const struct sja1105_info sja1105e_info;
|
||||
extern const struct sja1105_info sja1105t_info;
|
||||
extern const struct sja1105_info sja1105p_info;
|
||||
extern const struct sja1105_info sja1105q_info;
|
||||
extern const struct sja1105_info sja1105r_info;
|
||||
extern const struct sja1105_info sja1105s_info;
|
||||
|
||||
/* From sja1105_clocking.c */
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ static struct sja1105_regs sja1105pqrs_regs = {
|
|||
.ptpsyncts = 0x1F,
|
||||
};
|
||||
|
||||
struct sja1105_info sja1105e_info = {
|
||||
const struct sja1105_info sja1105e_info = {
|
||||
.device_id = SJA1105E_DEVICE_ID,
|
||||
.part_no = SJA1105ET_PART_NO,
|
||||
.static_ops = sja1105e_table_ops,
|
||||
|
@ -523,7 +523,8 @@ struct sja1105_info sja1105e_info = {
|
|||
.regs = &sja1105et_regs,
|
||||
.name = "SJA1105E",
|
||||
};
|
||||
struct sja1105_info sja1105t_info = {
|
||||
|
||||
const struct sja1105_info sja1105t_info = {
|
||||
.device_id = SJA1105T_DEVICE_ID,
|
||||
.part_no = SJA1105ET_PART_NO,
|
||||
.static_ops = sja1105t_table_ops,
|
||||
|
@ -539,7 +540,8 @@ struct sja1105_info sja1105t_info = {
|
|||
.regs = &sja1105et_regs,
|
||||
.name = "SJA1105T",
|
||||
};
|
||||
struct sja1105_info sja1105p_info = {
|
||||
|
||||
const struct sja1105_info sja1105p_info = {
|
||||
.device_id = SJA1105PR_DEVICE_ID,
|
||||
.part_no = SJA1105P_PART_NO,
|
||||
.static_ops = sja1105p_table_ops,
|
||||
|
@ -556,7 +558,8 @@ struct sja1105_info sja1105p_info = {
|
|||
.regs = &sja1105pqrs_regs,
|
||||
.name = "SJA1105P",
|
||||
};
|
||||
struct sja1105_info sja1105q_info = {
|
||||
|
||||
const struct sja1105_info sja1105q_info = {
|
||||
.device_id = SJA1105QS_DEVICE_ID,
|
||||
.part_no = SJA1105Q_PART_NO,
|
||||
.static_ops = sja1105q_table_ops,
|
||||
|
@ -573,7 +576,8 @@ struct sja1105_info sja1105q_info = {
|
|||
.regs = &sja1105pqrs_regs,
|
||||
.name = "SJA1105Q",
|
||||
};
|
||||
struct sja1105_info sja1105r_info = {
|
||||
|
||||
const struct sja1105_info sja1105r_info = {
|
||||
.device_id = SJA1105PR_DEVICE_ID,
|
||||
.part_no = SJA1105R_PART_NO,
|
||||
.static_ops = sja1105r_table_ops,
|
||||
|
@ -590,7 +594,8 @@ struct sja1105_info sja1105r_info = {
|
|||
.regs = &sja1105pqrs_regs,
|
||||
.name = "SJA1105R",
|
||||
};
|
||||
struct sja1105_info sja1105s_info = {
|
||||
|
||||
const struct sja1105_info sja1105s_info = {
|
||||
.device_id = SJA1105QS_DEVICE_ID,
|
||||
.part_no = SJA1105S_PART_NO,
|
||||
.static_ops = sja1105s_table_ops,
|
||||
|
|
Loading…
Reference in New Issue