1 From 4a0faa02d419a6728abef0f1d8a32d8c35ef95e6 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 24 Mar 2023 09:23:53 +0000
4 Subject: [PATCH] net: phy: constify fwnode_get_phy_node() fwnode argument
6 fwnode_get_phy_node() does not motify the fwnode structure, so make
9 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 Reviewed-by: Simon Horman <simon.horman@corigine.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 drivers/net/phy/phy_device.c | 2 +-
14 include/linux/phy.h | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
17 --- a/drivers/net/phy/phy_device.c
18 +++ b/drivers/net/phy/phy_device.c
19 @@ -3003,7 +3003,7 @@ EXPORT_SYMBOL_GPL(device_phy_find_device
20 * and "phy-device" are not supported in ACPI. DT supports all the three
21 * named references to the phy node.
23 -struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode)
24 +struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode)
26 struct fwnode_handle *phy_node;
28 --- a/include/linux/phy.h
29 +++ b/include/linux/phy.h
30 @@ -1473,7 +1473,7 @@ int fwnode_get_phy_id(struct fwnode_hand
31 struct mdio_device *fwnode_mdio_find_device(struct fwnode_handle *fwnode);
32 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
33 struct phy_device *device_phy_find_device(struct device *dev);
34 -struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode);
35 +struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode);
36 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
37 int phy_device_register(struct phy_device *phy);
38 void phy_device_free(struct phy_device *phydev);