diff options
author | Romain Perier <romain.perier@gmail.com> | 2014-08-26 09:14:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-27 19:40:26 -0400 |
commit | 93e91b3dda17be19ecf52de2400a02c6469decfa (patch) | |
tree | c74ffabc1c714cf8d3094ba35572586a72ed8196 /drivers/net/ethernet/arc | |
parent | f15f44e0839793ea03ffef5bae532cd63d92948c (diff) |
ethernet: arc: mdio changes for future SoC glue layer devtree support
This is an api changes for the emac_mdio.c module.
It will be required later when arc_emac_probe/arc_emac_remove
will no longer use 'struct platform_device'.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc')
-rw-r--r-- | drivers/net/ethernet/arc/emac.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/arc/emac_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/arc/emac_mdio.c | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/arc/emac.h b/drivers/net/ethernet/arc/emac.h index 36cc9bd07c47..8011445adcba 100644 --- a/drivers/net/ethernet/arc/emac.h +++ b/drivers/net/ethernet/arc/emac.h | |||
@@ -204,7 +204,7 @@ static inline void arc_reg_clr(struct arc_emac_priv *priv, int reg, int mask) | |||
204 | arc_reg_set(priv, reg, value & ~mask); | 204 | arc_reg_set(priv, reg, value & ~mask); |
205 | } | 205 | } |
206 | 206 | ||
207 | int arc_mdio_probe(struct platform_device *pdev, struct arc_emac_priv *priv); | 207 | int arc_mdio_probe(struct arc_emac_priv *priv); |
208 | int arc_mdio_remove(struct arc_emac_priv *priv); | 208 | int arc_mdio_remove(struct arc_emac_priv *priv); |
209 | 209 | ||
210 | #endif /* ARC_EMAC_H */ | 210 | #endif /* ARC_EMAC_H */ |
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index 761b936e0f0a..bbc3157bed92 100644 --- a/drivers/net/ethernet/arc/emac_main.c +++ b/drivers/net/ethernet/arc/emac_main.c | |||
@@ -799,7 +799,7 @@ static int arc_emac_probe(struct platform_device *pdev) | |||
799 | dev_dbg(dev, "EMAC Device addr: Rx Ring [0x%x], Tx Ring[%x]\n", | 799 | dev_dbg(dev, "EMAC Device addr: Rx Ring [0x%x], Tx Ring[%x]\n", |
800 | (unsigned int)priv->rxbd_dma, (unsigned int)priv->txbd_dma); | 800 | (unsigned int)priv->rxbd_dma, (unsigned int)priv->txbd_dma); |
801 | 801 | ||
802 | err = arc_mdio_probe(pdev, priv); | 802 | err = arc_mdio_probe(priv); |
803 | if (err) { | 803 | if (err) { |
804 | dev_err(dev, "failed to probe MII bus\n"); | 804 | dev_err(dev, "failed to probe MII bus\n"); |
805 | goto out_clken; | 805 | goto out_clken; |
diff --git a/drivers/net/ethernet/arc/emac_mdio.c b/drivers/net/ethernet/arc/emac_mdio.c index 26ba2423f33a..d5ee986936da 100644 --- a/drivers/net/ethernet/arc/emac_mdio.c +++ b/drivers/net/ethernet/arc/emac_mdio.c | |||
@@ -100,7 +100,6 @@ static int arc_mdio_write(struct mii_bus *bus, int phy_addr, | |||
100 | 100 | ||
101 | /** | 101 | /** |
102 | * arc_mdio_probe - MDIO probe function. | 102 | * arc_mdio_probe - MDIO probe function. |
103 | * @pdev: Pointer to platform device. | ||
104 | * @priv: Pointer to ARC EMAC private data structure. | 103 | * @priv: Pointer to ARC EMAC private data structure. |
105 | * | 104 | * |
106 | * returns: 0 on success, -ENOMEM when mdiobus_alloc | 105 | * returns: 0 on success, -ENOMEM when mdiobus_alloc |
@@ -108,7 +107,7 @@ static int arc_mdio_write(struct mii_bus *bus, int phy_addr, | |||
108 | * | 107 | * |
109 | * Sets up and registers the MDIO interface. | 108 | * Sets up and registers the MDIO interface. |
110 | */ | 109 | */ |
111 | int arc_mdio_probe(struct platform_device *pdev, struct arc_emac_priv *priv) | 110 | int arc_mdio_probe(struct arc_emac_priv *priv) |
112 | { | 111 | { |
113 | struct mii_bus *bus; | 112 | struct mii_bus *bus; |
114 | int error; | 113 | int error; |
@@ -124,9 +123,9 @@ int arc_mdio_probe(struct platform_device *pdev, struct arc_emac_priv *priv) | |||
124 | bus->read = &arc_mdio_read; | 123 | bus->read = &arc_mdio_read; |
125 | bus->write = &arc_mdio_write; | 124 | bus->write = &arc_mdio_write; |
126 | 125 | ||
127 | snprintf(bus->id, MII_BUS_ID_SIZE, "%s", pdev->name); | 126 | snprintf(bus->id, MII_BUS_ID_SIZE, "%s", bus->name); |
128 | 127 | ||
129 | error = of_mdiobus_register(bus, pdev->dev.of_node); | 128 | error = of_mdiobus_register(bus, priv->dev->of_node); |
130 | if (error) { | 129 | if (error) { |
131 | dev_err(priv->dev, "cannot register MDIO bus %s\n", bus->name); | 130 | dev_err(priv->dev, "cannot register MDIO bus %s\n", bus->name); |
132 | mdiobus_free(bus); | 131 | mdiobus_free(bus); |