Skip to content

Commit cbe72af

Browse files
rikardfalkebornkishon
authored andcommitted
phy: sr-usb: 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 4310 1244 0 5554 15b2 drivers/phy/broadcom/phy-bcm-sr-usb.o After: text data bss dec hex filename 4438 1116 0 5554 15b2 drivers/phy/broadcom/phy-bcm-sr-usb.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200516120441.7627-3-rikard.falkeborn@gmail.com Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
1 parent 11c82af commit cbe72af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/phy/broadcom/phy-bcm-sr-usb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int bcm_usb_phy_init(struct phy *phy)
256256
return ret;
257257
}
258258

259-
static struct phy_ops sr_phy_ops = {
259+
static const struct phy_ops sr_phy_ops = {
260260
.init = bcm_usb_phy_init,
261261
.reset = bcm_usb_phy_reset,
262262
.owner = THIS_MODULE,

0 commit comments

Comments
 (0)