Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdc38967 authored by Robin Murphy's avatar Robin Murphy Committed by Will Deacon
Browse files

iommu/io-pgtable: Make io_pgtable_ops_to_pgtable() macro common



There is no need to keep a useful accessor for a public structure hidden
away in a private implementation. Move it out alongside the structure
definition so that other implementations may reuse it.

Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 75df1386
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -38,9 +38,6 @@
#define io_pgtable_to_data(x)						\
	container_of((x), struct arm_lpae_io_pgtable, iop)

#define io_pgtable_ops_to_pgtable(x)					\
	container_of((x), struct io_pgtable, ops)

#define io_pgtable_ops_to_data(x)					\
	io_pgtable_to_data(io_pgtable_ops_to_pgtable(x))

+2 −0
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ struct io_pgtable {
	struct io_pgtable_ops	ops;
};

#define io_pgtable_ops_to_pgtable(x) container_of((x), struct io_pgtable, ops)

/**
 * struct io_pgtable_init_fns - Alloc/free a set of page tables for a
 *                              particular format.