Messages in this thread Patch in this message | | | From | Uwe Kleine-König <> | Subject | [PATCH 5/5] spi-imx: don't access struct device directly but use dev_get_platdata | Date | Tue, 8 Dec 2009 22:14:10 +0100 |
| |
Also there is no casting needed to assign a void pointer.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/spi/spi_imx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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; -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |