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

Commit 336fb81b authored by Wang, Yalin's avatar Wang, Yalin Committed by Mark Brown
Browse files

regmap: change struct regmap's internal locks as union



this patch change struct regmap->mutex and struct regmap->spinlock
as an union, because these 2 members are only used one of them,
we change it to shrink the struct size.

Signed-off-by: default avatarYalin Wang <yalin.wang@sonymobile.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9ba1e456
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -49,8 +49,10 @@ struct regmap_async {
};

struct regmap {
	union {
		struct mutex mutex;
		spinlock_t spinlock;
	};
	unsigned long spinlock_flags;
	regmap_lock lock;
	regmap_unlock unlock;