net: phy: constify phydev->drv
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 2 Feb 2024 17:41:45 +0000 (17:41 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 11:44:40 +0000 (12:44 +0100)
commit0bd199fd9c19aa545f677fd0a99f2be101cb6309
treec341bba82a52372ce69b5dd8ed966e3f304d9c98
parent03ba6dc035c60991033529e630bd1552b2bca4d7
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>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
drivers/net/phy/xilinx_gmii2rgmii.c
include/linux/phy.h