phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
Subsystems (2)
PATCH 1/1 phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
The only usage of imx8mp_usb_phy_ops is to assign its address to the data field in the of_device_id struct, which is a const void pointer. Make it const to allow the compiler to put it in read-only memory.
Signed-off-by Rikard Falkeborn <[email protected]>
--- drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/freescale/phy-fsl-imx8mq-usb.c +1 -1
@@ -131,7 +131,7 @@ static const struct phy_ops imx8mq_usb_phy_ops = { .owner = THIS_MODULE, }; -static struct phy_ops imx8mp_usb_phy_ops = { +static const struct phy_ops imx8mp_usb_phy_ops = { .init = imx8mp_usb_phy_init, .power_on = imx8mq_phy_power_on, .power_off = imx8mq_phy_power_off,
Signature · 1 line
2.28.0
Quoted 3 lines · Rikard Falkeborn
The only usage of
imx8mp_usb_phy_opsis to assign its address to the data field in theof_device_idstruct, which is a const void pointer. Make it const to allow the compiler to put it in read-only memory.
Applied, thanks
Signature · 6 lines
~Vinod _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel