net: sfp: constify sfp-bus internal fwnode uses
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 24 Mar 2023 09:23:48 +0000 (09:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Mar 2023 07:12:01 +0000 (08:12 +0100)
Constify sfp-bus internal fwnode uses, since we do not modify the
fwnode structures.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp-bus.c

index 8284f29b3644453cfb902c367c079da23749d252..9fc50fcc8fc99263330b7b84df839b82223d56d8 100644 (file)
@@ -17,7 +17,7 @@ struct sfp_bus {
        /* private: */
        struct kref kref;
        struct list_head node;
-       struct fwnode_handle *fwnode;
+       const struct fwnode_handle *fwnode;
 
        const struct sfp_socket_ops *socket_ops;
        struct device *sfp_dev;
@@ -390,7 +390,7 @@ static const struct sfp_upstream_ops *sfp_get_upstream_ops(struct sfp_bus *bus)
        return bus->registered ? bus->upstream_ops : NULL;
 }
 
-static struct sfp_bus *sfp_bus_get(struct fwnode_handle *fwnode)
+static struct sfp_bus *sfp_bus_get(const struct fwnode_handle *fwnode)
 {
        struct sfp_bus *sfp, *new, *found = NULL;