aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/cphy.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/chelsio/cphy.h')
-rw-r--r--drivers/net/chelsio/cphy.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/chelsio/cphy.h b/drivers/net/chelsio/cphy.h
index 8b5165a5af3f..1f095a9fc739 100644
--- a/drivers/net/chelsio/cphy.h
+++ b/drivers/net/chelsio/cphy.h
@@ -137,10 +137,11 @@ static inline int simple_mdio_write(struct cphy *cphy, int reg,
137} 137}
138 138
139/* Convenience initializer */ 139/* Convenience initializer */
140static inline void cphy_init(struct cphy *phy, adapter_t *adapter, 140static inline void cphy_init(struct cphy *phy, struct net_device *dev,
141 int phy_addr, struct cphy_ops *phy_ops, 141 int phy_addr, struct cphy_ops *phy_ops,
142 const struct mdio_ops *mdio_ops) 142 const struct mdio_ops *mdio_ops)
143{ 143{
144 struct adapter *adapter = netdev_priv(dev);
144 phy->adapter = adapter; 145 phy->adapter = adapter;
145 phy->ops = phy_ops; 146 phy->ops = phy_ops;
146 if (mdio_ops) { 147 if (mdio_ops) {
@@ -150,12 +151,13 @@ static inline void cphy_init(struct cphy *phy, adapter_t *adapter,
150 phy->mdio.mdio_read = mdio_ops->read; 151 phy->mdio.mdio_read = mdio_ops->read;
151 phy->mdio.mdio_write = mdio_ops->write; 152 phy->mdio.mdio_write = mdio_ops->write;
152 } 153 }
154 phy->mdio.dev = dev;
153} 155}
154 156
155/* Operations of the PHY-instance factory */ 157/* Operations of the PHY-instance factory */
156struct gphy { 158struct gphy {
157 /* Construct a PHY instance with the given PHY address */ 159 /* Construct a PHY instance with the given PHY address */
158 struct cphy *(*create)(adapter_t *adapter, int phy_addr, 160 struct cphy *(*create)(struct net_device *dev, int phy_addr,
159 const struct mdio_ops *mdio_ops); 161 const struct mdio_ops *mdio_ops);
160 162
161 /* 163 /*