Commit a0b79553 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by David S. Miller

net: phylink: constify fwnode arguments

Both phylink_create() and phylink_fwnode_phy_connect() do not modify
the fwnode argument that they are passed, so lets constify these.
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 144470c8
...@@ -708,7 +708,7 @@ static int phylink_validate(struct phylink *pl, unsigned long *supported, ...@@ -708,7 +708,7 @@ static int phylink_validate(struct phylink *pl, unsigned long *supported,
} }
static int phylink_parse_fixedlink(struct phylink *pl, static int phylink_parse_fixedlink(struct phylink *pl,
struct fwnode_handle *fwnode) const struct fwnode_handle *fwnode)
{ {
struct fwnode_handle *fixed_node; struct fwnode_handle *fixed_node;
bool pause, asym_pause, autoneg; bool pause, asym_pause, autoneg;
...@@ -819,7 +819,8 @@ static int phylink_parse_fixedlink(struct phylink *pl, ...@@ -819,7 +819,8 @@ static int phylink_parse_fixedlink(struct phylink *pl,
return 0; return 0;
} }
static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode) static int phylink_parse_mode(struct phylink *pl,
const struct fwnode_handle *fwnode)
{ {
struct fwnode_handle *dn; struct fwnode_handle *dn;
const char *managed; const char *managed;
...@@ -1441,7 +1442,7 @@ static void phylink_fixed_poll(struct timer_list *t) ...@@ -1441,7 +1442,7 @@ static void phylink_fixed_poll(struct timer_list *t)
static const struct sfp_upstream_ops sfp_phylink_ops; static const struct sfp_upstream_ops sfp_phylink_ops;
static int phylink_register_sfp(struct phylink *pl, static int phylink_register_sfp(struct phylink *pl,
struct fwnode_handle *fwnode) const struct fwnode_handle *fwnode)
{ {
struct sfp_bus *bus; struct sfp_bus *bus;
int ret; int ret;
...@@ -1480,7 +1481,7 @@ static int phylink_register_sfp(struct phylink *pl, ...@@ -1480,7 +1481,7 @@ static int phylink_register_sfp(struct phylink *pl,
* must use IS_ERR() to check for errors from this function. * must use IS_ERR() to check for errors from this function.
*/ */
struct phylink *phylink_create(struct phylink_config *config, struct phylink *phylink_create(struct phylink_config *config,
struct fwnode_handle *fwnode, const struct fwnode_handle *fwnode,
phy_interface_t iface, phy_interface_t iface,
const struct phylink_mac_ops *mac_ops) const struct phylink_mac_ops *mac_ops)
{ {
...@@ -1809,7 +1810,7 @@ EXPORT_SYMBOL_GPL(phylink_of_phy_connect); ...@@ -1809,7 +1810,7 @@ EXPORT_SYMBOL_GPL(phylink_of_phy_connect);
* Returns 0 on success or a negative errno. * Returns 0 on success or a negative errno.
*/ */
int phylink_fwnode_phy_connect(struct phylink *pl, int phylink_fwnode_phy_connect(struct phylink *pl,
struct fwnode_handle *fwnode, const struct fwnode_handle *fwnode,
u32 flags) u32 flags)
{ {
struct fwnode_handle *phy_fwnode; struct fwnode_handle *phy_fwnode;
......
...@@ -568,16 +568,17 @@ void phylink_generic_validate(struct phylink_config *config, ...@@ -568,16 +568,17 @@ void phylink_generic_validate(struct phylink_config *config,
unsigned long *supported, unsigned long *supported,
struct phylink_link_state *state); struct phylink_link_state *state);
struct phylink *phylink_create(struct phylink_config *, struct fwnode_handle *, struct phylink *phylink_create(struct phylink_config *,
phy_interface_t iface, const struct fwnode_handle *,
const struct phylink_mac_ops *mac_ops); phy_interface_t,
const struct phylink_mac_ops *);
void phylink_destroy(struct phylink *); void phylink_destroy(struct phylink *);
bool phylink_expects_phy(struct phylink *pl); bool phylink_expects_phy(struct phylink *pl);
int phylink_connect_phy(struct phylink *, struct phy_device *); int phylink_connect_phy(struct phylink *, struct phy_device *);
int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags); int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags);
int phylink_fwnode_phy_connect(struct phylink *pl, int phylink_fwnode_phy_connect(struct phylink *pl,
struct fwnode_handle *fwnode, const struct fwnode_handle *fwnode,
u32 flags); u32 flags);
void phylink_disconnect_phy(struct phylink *); void phylink_disconnect_phy(struct phylink *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment