diff mbox

[5/5] spi-imx: don't access struct device directly but use dev_get_platdata

Message ID 1260306850-14945-5-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted
Headers show

Commit Message

Uwe Kleine-König Dec. 8, 2009, 9:14 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 59b3a30..ea6d701 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;