Skip to content

Commit a90ac76

Browse files
Russell King (Oracle)davem330
authored andcommitted
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: Russell King (Oracle) <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e3cbdcb commit a90ac76

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/net/phy/sfp-bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ static void sfp_upstream_clear(struct sfp_bus *bus)
593593
* - %-ENOMEM if we failed to allocate the bus.
594594
* - an error from the upstream's connect_phy() method.
595595
*/
596-
struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode)
596+
struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode)
597597
{
598598
struct fwnode_reference_args ref;
599599
struct sfp_bus *bus;

include/linux/sfp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ int sfp_get_module_eeprom_by_page(struct sfp_bus *bus,
557557
void sfp_upstream_start(struct sfp_bus *bus);
558558
void sfp_upstream_stop(struct sfp_bus *bus);
559559
void sfp_bus_put(struct sfp_bus *bus);
560-
struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode);
560+
struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode);
561561
int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
562562
const struct sfp_upstream_ops *ops);
563563
void sfp_bus_del_upstream(struct sfp_bus *bus);
@@ -619,7 +619,8 @@ static inline void sfp_bus_put(struct sfp_bus *bus)
619619
{
620620
}
621621

622-
static inline struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode)
622+
static inline struct sfp_bus *
623+
sfp_bus_find_fwnode(const struct fwnode_handle *fwnode)
623624
{
624625
return NULL;
625626
}

0 commit comments

Comments
 (0)