2024-05-03 08:27:34

by Tudor Ambarus

[permalink] [raw]
Subject: [PATCH] iommu/exynos: trivial use of local dev variable

exynos_sysmmu_probe() defines:
struct device *dev = &pdev->dev;
then initializes:
data->sysmmu = dev;

Replace further &pdev->dev and data->sysmmu use with dev.

Signed-off-by: Tudor Ambarus <[email protected]>
---
drivers/iommu/exynos-iommu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index d98c9161948a..447cf0d07625 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -774,8 +774,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)

__sysmmu_get_version(data);

- ret = iommu_device_sysfs_add(&data->iommu, &pdev->dev, NULL,
- dev_name(data->sysmmu));
+ ret = iommu_device_sysfs_add(&data->iommu, dev, NULL, dev_name(dev));
if (ret)
return ret;

@@ -806,7 +805,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
* dma mapping operations on iommu page tables (cpu cache flush)
*/
if (!dma_dev)
- dma_dev = &pdev->dev;
+ dma_dev = dev;

pm_runtime_enable(dev);

--
2.45.0.rc1.225.g2a3ae87e7f-goog