diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2020-05-16 15:04:40 +0300 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2020-05-18 17:00:55 +0300 |
commit | cbe72af1a713f40e2ecd7f0b2c4580a7ab70fcd6 (patch) | |
tree | 59544d551e9aa2114da454136f1c6c336eac3f7d /drivers/phy | |
parent | 11c82afac8d19eb0364521ebfc3b76cb6863dcb8 (diff) | |
download | linux-cbe72af1a713f40e2ecd7f0b2c4580a7ab70fcd6.tar.xz |
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>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/broadcom/phy-bcm-sr-usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c index fe6c58910e4c..e04be8f52744 100644 --- a/drivers/phy/broadcom/phy-bcm-sr-usb.c +++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c @@ -256,7 +256,7 @@ static int bcm_usb_phy_init(struct phy *phy) return ret; } -static struct phy_ops sr_phy_ops = { +static const struct phy_ops sr_phy_ops = { .init = bcm_usb_phy_init, .reset = bcm_usb_phy_reset, .owner = THIS_MODULE, |