Commit a0ea2ac8 authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df3f1c39
...@@ -636,7 +636,7 @@ static void cpmac_hw_stop(struct net_device *dev) ...@@ -636,7 +636,7 @@ static void cpmac_hw_stop(struct net_device *dev)
{ {
int i; int i;
struct cpmac_priv *priv = netdev_priv(dev); struct cpmac_priv *priv = netdev_priv(dev);
struct plat_cpmac_data *pdata = priv->pdev->dev.platform_data; struct plat_cpmac_data *pdata = dev_get_platdata(&priv->pdev->dev);
ar7_device_reset(pdata->reset_bit); ar7_device_reset(pdata->reset_bit);
cpmac_write(priv->regs, CPMAC_RX_CONTROL, cpmac_write(priv->regs, CPMAC_RX_CONTROL,
...@@ -659,7 +659,7 @@ static void cpmac_hw_start(struct net_device *dev) ...@@ -659,7 +659,7 @@ static void cpmac_hw_start(struct net_device *dev)
{ {
int i; int i;
struct cpmac_priv *priv = netdev_priv(dev); struct cpmac_priv *priv = netdev_priv(dev);
struct plat_cpmac_data *pdata = priv->pdev->dev.platform_data; struct plat_cpmac_data *pdata = dev_get_platdata(&priv->pdev->dev);
ar7_device_reset(pdata->reset_bit); ar7_device_reset(pdata->reset_bit);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
...@@ -1118,7 +1118,7 @@ static int cpmac_probe(struct platform_device *pdev) ...@@ -1118,7 +1118,7 @@ static int cpmac_probe(struct platform_device *pdev)
struct net_device *dev; struct net_device *dev;
struct plat_cpmac_data *pdata; struct plat_cpmac_data *pdata;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
if (external_switch || dumb_switch) { if (external_switch || dumb_switch) {
strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */ strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
......
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