spi-imx: don't access struct device directly but use dev_get_platdata
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 13 Dec 2009 08:02:09 +0000 (01:02 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 13 Dec 2009 08:02:09 +0000 (01:02 -0700)
Also there is no casting needed to assign a void pointer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_imx.c

index 4c9b1332b536f5d0366e1956b49d1c1cf9781f08..e334747ba2d9470bc9728f554353eb888431a0ac 100644 (file)
@@ -492,7 +492,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
        struct resource *res;
        int i, ret;
 
-       mxc_platform_info = (struct spi_imx_master *)pdev->dev.platform_data;
+       mxc_platform_info = dev_get_platdata(&pdev->dev);
        if (!mxc_platform_info) {
                dev_err(&pdev->dev, "can't get the platform data\n");
                return -EINVAL;