diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-30 01:05:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-30 17:43:38 -0400 |
commit | a0ea2ac8976772b9a38bbfddf01a86223d84b863 (patch) | |
tree | 8056ceb539086b03d879976bdfa1484ae14e1753 | |
parent | df3f1c39406740712f0a2cacb8c3699bf6413ebe (diff) |
net: cpmac: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 31bbbca341a7..2dc16b6efaf0 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c | |||
@@ -636,7 +636,7 @@ static void cpmac_hw_stop(struct net_device *dev) | |||
636 | { | 636 | { |
637 | int i; | 637 | int i; |
638 | struct cpmac_priv *priv = netdev_priv(dev); | 638 | struct cpmac_priv *priv = netdev_priv(dev); |
639 | struct plat_cpmac_data *pdata = priv->pdev->dev.platform_data; | 639 | struct plat_cpmac_data *pdata = dev_get_platdata(&priv->pdev->dev); |
640 | 640 | ||
641 | ar7_device_reset(pdata->reset_bit); | 641 | ar7_device_reset(pdata->reset_bit); |
642 | cpmac_write(priv->regs, CPMAC_RX_CONTROL, | 642 | cpmac_write(priv->regs, CPMAC_RX_CONTROL, |
@@ -659,7 +659,7 @@ static void cpmac_hw_start(struct net_device *dev) | |||
659 | { | 659 | { |
660 | int i; | 660 | int i; |
661 | struct cpmac_priv *priv = netdev_priv(dev); | 661 | struct cpmac_priv *priv = netdev_priv(dev); |
662 | struct plat_cpmac_data *pdata = priv->pdev->dev.platform_data; | 662 | struct plat_cpmac_data *pdata = dev_get_platdata(&priv->pdev->dev); |
663 | 663 | ||
664 | ar7_device_reset(pdata->reset_bit); | 664 | ar7_device_reset(pdata->reset_bit); |
665 | for (i = 0; i < 8; i++) { | 665 | for (i = 0; i < 8; i++) { |
@@ -1118,7 +1118,7 @@ static int cpmac_probe(struct platform_device *pdev) | |||
1118 | struct net_device *dev; | 1118 | struct net_device *dev; |
1119 | struct plat_cpmac_data *pdata; | 1119 | struct plat_cpmac_data *pdata; |
1120 | 1120 | ||
1121 | pdata = pdev->dev.platform_data; | 1121 | pdata = dev_get_platdata(&pdev->dev); |
1122 | 1122 | ||
1123 | if (external_switch || dumb_switch) { | 1123 | if (external_switch || dumb_switch) { |
1124 | strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */ | 1124 | strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */ |