diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-02-02 18:41:45 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-02-06 12:44:40 +0100 |
commit | 0bd199fd9c19aa545f677fd0a99f2be101cb6309 (patch) | |
tree | c341bba82a52372ce69b5dd8ed966e3f304d9c98 /drivers/net/phy/xilinx_gmii2rgmii.c | |
parent | net: dst: Make dst_destroy() static and return void. (diff) | |
download | linux-0bd199fd9c19aa545f677fd0a99f2be101cb6309.tar.xz linux-0bd199fd9c19aa545f677fd0a99f2be101cb6309.zip |
net: phy: constify phydev->drv
Device driver structures are shared between all devices that they
match, and thus nothing should never write to the device driver
structure through the phydev->drv pointer. Let's make this pointer
const to catch code that attempts to do so.
Suggested-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1rVxXt-002YqY-9G@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/phy/xilinx_gmii2rgmii.c')
-rw-r--r-- | drivers/net/phy/xilinx_gmii2rgmii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index 7fd9fe6a602b..7b1bc5fcef9b 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -22,7 +22,7 @@ struct gmii2rgmii { struct phy_device *phy_dev; - struct phy_driver *phy_drv; + const struct phy_driver *phy_drv; struct phy_driver conv_phy_drv; struct mdio_device *mdio; }; |