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

phy: phy-bcm-ns2-usbdrd: Constify phy_ops

phy_ops are never modified and can therefore be made const to allow the
compiler to put it in read-only memory.

Before:
text data bss dec hex filename
7831 3144 128 11103 2b5f drivers/phy/broadcom/phy-bcm-ns2-usbdrd.o

After:
text data bss dec hex filename
7959 3016 128 11103 2b5f drivers/phy/broadcom/phy-bcm-ns2-usbdrd.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200516120441.7627-2-rikard.falkeborn@gmail.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Rikard Falkeborn and committed by
Kishon Vijay Abraham I
728ac1ba c79cc3d5

+1 -1
+1 -1
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
··· 279 279 return IRQ_HANDLED; 280 280 } 281 281 282 - static struct phy_ops ops = { 282 + static const struct phy_ops ops = { 283 283 .init = ns2_drd_phy_init, 284 284 .power_on = ns2_drd_phy_poweron, 285 285 .power_off = ns2_drd_phy_poweroff,