Skip to content

Commit 4a0faa0

Browse files
Russell King (Oracle)davem330
authored andcommitted
net: phy: constify fwnode_get_phy_node() fwnode argument
fwnode_get_phy_node() does not motify the fwnode structure, so make the argument const, Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 850a8d2 commit 4a0faa0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/phy/phy_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3057,7 +3057,7 @@ EXPORT_SYMBOL_GPL(device_phy_find_device);
30573057
* and "phy-device" are not supported in ACPI. DT supports all the three
30583058
* named references to the phy node.
30593059
*/
3060-
struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode)
3060+
struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode)
30613061
{
30623062
struct fwnode_handle *phy_node;
30633063

include/linux/phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ int fwnode_get_phy_id(struct fwnode_handle *fwnode, u32 *phy_id);
15471547
struct mdio_device *fwnode_mdio_find_device(struct fwnode_handle *fwnode);
15481548
struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
15491549
struct phy_device *device_phy_find_device(struct device *dev);
1550-
struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode);
1550+
struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode);
15511551
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
15521552
int phy_device_register(struct phy_device *phy);
15531553
void phy_device_free(struct phy_device *phydev);

0 commit comments

Comments
 (0)