From: Kiran Padwal Date: Thu, 30 Oct 2014 06:29:47 +0000 (+0530) Subject: iommu/omap: Use dev_get_platdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99cb9aee770e482ac5ab1fe77213a38df9dd4e77;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iommu/omap: Use dev_get_platdata() Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Kiran Padwal Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 2ba321921f81..839cd8bc9aaf 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -170,7 +170,7 @@ static int iommu_enable(struct omap_iommu *obj) { int err; struct platform_device *pdev = to_platform_device(obj->dev); - struct iommu_platform_data *pdata = pdev->dev.platform_data; + struct iommu_platform_data *pdata = dev_get_platdata(&pdev->dev); if (pdata && pdata->deassert_reset) { err = pdata->deassert_reset(pdev, pdata->reset_name); @@ -190,7 +190,7 @@ static int iommu_enable(struct omap_iommu *obj) static void iommu_disable(struct omap_iommu *obj) { struct platform_device *pdev = to_platform_device(obj->dev); - struct iommu_platform_data *pdata = pdev->dev.platform_data; + struct iommu_platform_data *pdata = dev_get_platdata(&pdev->dev); omap2_iommu_disable(obj); @@ -1007,7 +1007,7 @@ static int omap_iommu_probe(struct platform_device *pdev) int irq; struct omap_iommu *obj; struct resource *res; - struct iommu_platform_data *pdata = pdev->dev.platform_data; + struct iommu_platform_data *pdata = dev_get_platdata(&pdev->dev); struct device_node *of = pdev->dev.of_node; obj = devm_kzalloc(&pdev->dev, sizeof(*obj) + MMU_REG_SIZE, GFP_KERNEL);