Commit 980f3bee authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Grant Likely

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 87f673e9
...@@ -492,7 +492,7 @@ static int __init spi_imx_probe(struct platform_device *pdev) ...@@ -492,7 +492,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
int i, ret; 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) { if (!mxc_platform_info) {
dev_err(&pdev->dev, "can't get the platform data\n"); dev_err(&pdev->dev, "can't get the platform data\n");
return -EINVAL; return -EINVAL;
......
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