]> Pileus Git - ~andy/linux/commitdiff
net: netx-eth: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Fri, 30 Aug 2013 04:59:34 +0000 (13:59 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2013 21:43:36 +0000 (17:43 -0400)
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>
drivers/net/ethernet/netx-eth.c

index dc2c6f561e9ade6175fb72bf187db05e528d17f7..235fd51100aabc18c477e1e1893e592c8e383765 100644 (file)
@@ -390,7 +390,7 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
 
        priv = netdev_priv(ndev);
 
-       pdata = (struct netxeth_platform_data *)pdev->dev.platform_data;
+       pdata = (struct netxeth_platform_data *)dev_get_platdata(&pdev->dev);
        priv->xc = request_xc(pdata->xcno, &pdev->dev);
        if (!priv->xc) {
                dev_err(&pdev->dev, "unable to request xc engine\n");