diff options
author | Wang, Yalin <Yalin.Wang@sonymobile.com> | 2014-09-11 04:19:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-12 09:57:26 -0400 |
commit | 336fb81b319ec4d5c09aa6417de7c042cfcd7461 (patch) | |
tree | 7b1e75a60878d8f2d9ac3a6de329eda643795832 /drivers/base/regmap | |
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/regmap')
-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 { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | struct regmap { | 51 | struct regmap { |
52 | struct mutex mutex; | 52 | union { |
53 | spinlock_t spinlock; | 53 | struct mutex mutex; |
54 | spinlock_t spinlock; | ||
55 | }; | ||
54 | unsigned long spinlock_flags; | 56 | unsigned long spinlock_flags; |
55 | regmap_lock lock; | 57 | regmap_lock lock; |
56 | regmap_unlock unlock; | 58 | regmap_unlock unlock; |