Skip to content
Commit f1b19006 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Felipe Balbi
Browse files

usb: phy: phy-fsl-usb: Make structure fsl_otg_initdata constant



Static structure fsl_otg_initdata, of type fsl_otg_config, is used only
once, when the value of its field otg_port is assigned to another
variable. As fsl_otg_initdata.otg_port is of type u8, any changes to
its copy do not affect the original, and fsl_otg_initdata itself is
never modified. Hence make fsl_otg_initdata constant to protect it from
unintended modification.
Issue found with Coccinelle.

Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent c33f1416
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment