From: Kefeng Wang Date: Tue, 23 Apr 2019 07:50:08 +0000 (+0800) Subject: iommu/omap: Use dev_get_drvdata() X-Git-Tag: v5.3-rc1~172^2^4~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6e8b566806b7a8788dfde59b88ed79faa422fbaf;p=users%2Fhch%2Fuuid.git iommu/omap: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Kefeng Wang Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index d2fb347aa4ff..b16c711fc5fc 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -38,8 +38,7 @@ static const struct iommu_ops omap_iommu_ops; -#define to_iommu(dev) \ - ((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev))) +#define to_iommu(dev) ((struct omap_iommu *)dev_get_drvdata(dev)) /* bitmap of the page sizes currently supported */ #define OMAP_IOMMU_PGSIZES (SZ_4K | SZ_64K | SZ_1M | SZ_16M)