Skip to content

Commit 7f805f6

Browse files
javiercarrascocruzkuba-moo
authored andcommitted
net: ti: icss-iep: constify struct regmap_config
`am654_icss_iep_regmap_config` is only assigned to a pointer that passes the data as read-only. Add the const modifier to the struct and pointer to move the data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8dfbb06 commit 7f805f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/ti/icssg/icss_iep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ enum {
9595
* @flags: Flags to represent IEP properties
9696
*/
9797
struct icss_iep_plat_data {
98-
struct regmap_config *config;
98+
const struct regmap_config *config;
9999
u32 reg_offs[ICSS_IEP_MAX_REGS];
100100
u32 flags;
101101
};
@@ -952,7 +952,7 @@ static int icss_iep_regmap_read(void *context, unsigned int reg,
952952
return 0;
953953
}
954954

955-
static struct regmap_config am654_icss_iep_regmap_config = {
955+
static const struct regmap_config am654_icss_iep_regmap_config = {
956956
.name = "icss iep",
957957
.reg_stride = 1,
958958
.reg_write = icss_iep_regmap_write,

0 commit comments

Comments
 (0)