Skip to content

Commit

Permalink
ARM: davinci: make argument to davinci_common_init() as const
Browse files Browse the repository at this point in the history
Make the function argument of the function davinci_common_init
as const as it's memory contents are only copied during a
memcpy call. So, the fields of the structure to which the argument
soc_info points to never gets modified and therefore the argument can
be made const.
Add const to the prototype too.

Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
goyalbhumika authored and nsekhar committed Dec 23, 2017
1 parent 3984d64 commit 1a6d490
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int __init davinci_init_id(struct davinci_soc_info *soc_info)
return -EINVAL;
}

void __init davinci_common_init(struct davinci_soc_info *soc_info)
void __init davinci_common_init(const struct davinci_soc_info *soc_info)
{
int ret;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct davinci_soc_info {

extern struct davinci_soc_info davinci_soc_info;

extern void davinci_common_init(struct davinci_soc_info *soc_info);
extern void davinci_common_init(const struct davinci_soc_info *soc_info);
extern void davinci_init_ide(void);
void davinci_restart(enum reboot_mode mode, const char *cmd);
void davinci_init_late(void);
Expand Down

0 comments on commit 1a6d490

Please sign in to comment.