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

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
...@@ -49,8 +49,10 @@ struct regmap_async { ...@@ -49,8 +49,10 @@ struct regmap_async {
}; };
struct regmap { struct regmap {
struct mutex mutex; union {
spinlock_t spinlock; struct mutex mutex;
spinlock_t spinlock;
};
unsigned long spinlock_flags; unsigned long spinlock_flags;
regmap_lock lock; regmap_lock lock;
regmap_unlock unlock; regmap_unlock unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment