Skip to content

Commit

Permalink
spi-imx: don't access struct device directly but use dev_get_platdata
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Grant Likely committed Dec 13, 2009
1 parent 87f673e commit 980f3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 980f3be

Please sign in to comment.