Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: cadence: salvo: Constify cdns_salvo_phy_ops

The only usage is to pass its address to devm_phy_create() which takes a
const pointer. Make it const to allow the compiler to put it in
read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200823220025.17588-2-rikard.falkeborn@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Rikard Falkeborn and committed by
Vinod Koul
e947ef4d 4708ee37

+1 -1
+1 -1
drivers/phy/cadence/phy-cadence-salvo.c
··· 251 251 return 0; 252 252 } 253 253 254 - static struct phy_ops cdns_salvo_phy_ops = { 254 + static const struct phy_ops cdns_salvo_phy_ops = { 255 255 .init = cdns_salvo_phy_init, 256 256 .power_on = cdns_salvo_phy_power_on, 257 257 .power_off = cdns_salvo_phy_power_off,