diff options
author | Wang, Yalin <Yalin.Wang@sonymobile.com> | 2014-09-11 16:19:49 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-12 14:57:26 +0100 |
commit | 336fb81b319ec4d5c09aa6417de7c042cfcd7461 (patch) | |
tree | 7b1e75a60878d8f2d9ac3a6de329eda643795832 /drivers/base | |
parent | 9ba1e456e1fa3729fc6be73403a7b2083f9590eb (diff) |
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: Yalin Wang <yalin.wang@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/internal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 7d1326985bee..f82e8faa5d93 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -49,8 +49,10 @@ struct regmap_async { }; struct regmap { - struct mutex mutex; - spinlock_t spinlock; + union { + struct mutex mutex; + spinlock_t spinlock; + }; unsigned long spinlock_flags; regmap_lock lock; regmap_unlock unlock; |