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

net: sfp: make sfp_bus_find_fwnode() take a const fwnode

sfp_bus_find_fwnode() does not write to the fwnode, so let's make it
const.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3cbdcb0
...@@ -593,7 +593,7 @@ static void sfp_upstream_clear(struct sfp_bus *bus) ...@@ -593,7 +593,7 @@ static void sfp_upstream_clear(struct sfp_bus *bus)
* - %-ENOMEM if we failed to allocate the bus. * - %-ENOMEM if we failed to allocate the bus.
* - an error from the upstream's connect_phy() method. * - an error from the upstream's connect_phy() method.
*/ */
struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode) struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode)
{ {
struct fwnode_reference_args ref; struct fwnode_reference_args ref;
struct sfp_bus *bus; struct sfp_bus *bus;
......
...@@ -557,7 +557,7 @@ int sfp_get_module_eeprom_by_page(struct sfp_bus *bus, ...@@ -557,7 +557,7 @@ int sfp_get_module_eeprom_by_page(struct sfp_bus *bus,
void sfp_upstream_start(struct sfp_bus *bus); void sfp_upstream_start(struct sfp_bus *bus);
void sfp_upstream_stop(struct sfp_bus *bus); void sfp_upstream_stop(struct sfp_bus *bus);
void sfp_bus_put(struct sfp_bus *bus); void sfp_bus_put(struct sfp_bus *bus);
struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode); struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode);
int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream, int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
const struct sfp_upstream_ops *ops); const struct sfp_upstream_ops *ops);
void sfp_bus_del_upstream(struct sfp_bus *bus); void sfp_bus_del_upstream(struct sfp_bus *bus);
...@@ -619,7 +619,8 @@ static inline void sfp_bus_put(struct sfp_bus *bus) ...@@ -619,7 +619,8 @@ static inline void sfp_bus_put(struct sfp_bus *bus)
{ {
} }
static inline struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode) static inline struct sfp_bus *
sfp_bus_find_fwnode(const struct fwnode_handle *fwnode)
{ {
return NULL; return NULL;
} }
......
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