From: Uwe Kleine-König Date: Sun, 13 Dec 2009 08:02:09 +0000 (-0700) Subject: spi-imx: don't access struct device directly but use dev_get_platdata X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=980f3beeb68fd3b383908bac8a017b121df8ee29;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi-imx: don't access struct device directly but use dev_get_platdata Also there is no casting needed to assign a void pointer. Signed-off-by: Uwe Kleine-König Signed-off-by: Grant Likely --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 4c9b1332b536..e334747ba2d9 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -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;