Skip to content

Commit

Permalink
net: cpmac: use dev_get_platdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and David S. Miller committed Aug 30, 2013
1 parent df3f1c3 commit a0ea2ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/ti/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static void cpmac_hw_stop(struct net_device *dev)
{
int i;
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);
cpmac_write(priv->regs, CPMAC_RX_CONTROL,
Expand All @@ -659,7 +659,7 @@ static void cpmac_hw_start(struct net_device *dev)
{
int i;
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);
for (i = 0; i < 8; i++) {
Expand Down Expand Up @@ -1118,7 +1118,7 @@ static int cpmac_probe(struct platform_device *pdev)
struct net_device *dev;
struct plat_cpmac_data *pdata;

pdata = pdev->dev.platform_data;
pdata = dev_get_platdata(&pdev->dev);

if (external_switch || dumb_switch) {
strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
Expand Down

0 comments on commit a0ea2ac

Please sign in to comment.