Skip to content

Commit 932bc8c

Browse files
Zhen Leiwilldeacon
authored andcommitted
iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code
No functional change. Signed-off-by: Zhen Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 86d2d92 commit 932bc8c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,11 +3479,7 @@ err_reset_pci_ops: __maybe_unused;
34793479
static void __iomem *arm_smmu_ioremap(struct device *dev, resource_size_t start,
34803480
resource_size_t size)
34813481
{
3482-
struct resource res = {
3483-
.flags = IORESOURCE_MEM,
3484-
.start = start,
3485-
.end = start + size - 1,
3486-
};
3482+
struct resource res = DEFINE_RES_MEM(start, size);
34873483

34883484
return devm_ioremap_resource(dev, &res);
34893485
}

0 commit comments

Comments
 (0)