Commit 62203584 authored by David S. Miller's avatar David S. Miller

Merge branch 'constify-sfp-phy-nodes'

Russell King says:

====================
Constify a few sfp/phy fwnodes

This series constifies a bunch of fwnode_handle pointers that are only
used to refer to but not modify the contents of the fwnode structures.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e3cbdcb0 4a0faa02
...@@ -3057,7 +3057,7 @@ EXPORT_SYMBOL_GPL(device_phy_find_device); ...@@ -3057,7 +3057,7 @@ EXPORT_SYMBOL_GPL(device_phy_find_device);
* and "phy-device" are not supported in ACPI. DT supports all the three * and "phy-device" are not supported in ACPI. DT supports all the three
* named references to the phy node. * named references to the phy node.
*/ */
struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode) struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode)
{ {
struct fwnode_handle *phy_node; struct fwnode_handle *phy_node;
......
...@@ -17,7 +17,7 @@ struct sfp_bus { ...@@ -17,7 +17,7 @@ struct sfp_bus {
/* private: */ /* private: */
struct kref kref; struct kref kref;
struct list_head node; struct list_head node;
struct fwnode_handle *fwnode; const struct fwnode_handle *fwnode;
const struct sfp_socket_ops *socket_ops; const struct sfp_socket_ops *socket_ops;
struct device *sfp_dev; struct device *sfp_dev;
...@@ -390,7 +390,7 @@ static const struct sfp_upstream_ops *sfp_get_upstream_ops(struct sfp_bus *bus) ...@@ -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; 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; struct sfp_bus *sfp, *new, *found = NULL;
...@@ -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;
......
...@@ -1547,7 +1547,7 @@ int fwnode_get_phy_id(struct fwnode_handle *fwnode, u32 *phy_id); ...@@ -1547,7 +1547,7 @@ int fwnode_get_phy_id(struct fwnode_handle *fwnode, u32 *phy_id);
struct mdio_device *fwnode_mdio_find_device(struct fwnode_handle *fwnode); struct mdio_device *fwnode_mdio_find_device(struct fwnode_handle *fwnode);
struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode); struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
struct phy_device *device_phy_find_device(struct device *dev); struct phy_device *device_phy_find_device(struct device *dev);
struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode); struct fwnode_handle *fwnode_get_phy_node(const struct fwnode_handle *fwnode);
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
int phy_device_register(struct phy_device *phy); int phy_device_register(struct phy_device *phy);
void phy_device_free(struct phy_device *phydev); void phy_device_free(struct phy_device *phydev);
......
...@@ -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