regmap: Move spinlock_flags into the union
authorWang, Yalin <Yalin.Wang@sonymobile.com>
Mon, 15 Dec 2014 08:05:50 +0000 (16:05 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Dec 2014 17:41:07 +0000 (17:41 +0000)
This patch move struct regmap.spinlock_flags into the union of
spinlock, so that we can shrink struct regmap size.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/internal.h

index 0da5865..8e94584 100644 (file)
@@ -51,9 +51,11 @@ struct regmap_async {
 struct regmap {
        union {
                struct mutex mutex;
-               spinlock_t spinlock;
+               struct {
+                       spinlock_t spinlock;
+                       unsigned long spinlock_flags;
+               };
        };
-       unsigned long spinlock_flags;
        regmap_lock lock;
        regmap_unlock unlock;
        void *lock_arg; /* This is passed to lock/unlock functions */