diff mbox

regmap:change spinlock_flags into the union

Message ID 35FD53F367049845BC99AC72306C23D103EDAF89E148@CNBJMBX05.corpusers.net (mailing list archive)
State New, archived
Headers show

Commit Message

Wang, Yalin Dec. 15, 2014, 8:05 a.m. UTC
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>
---
 drivers/base/regmap/internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Mark Brown Dec. 15, 2014, 5:41 p.m. UTC | #1
On Mon, Dec 15, 2014 at 04:05:50PM +0800, Wang, Yalin wrote:
> This patch move struct regmap.spinlock_flags into the union of
> spinlock, so that we can shrink struct regmap size.

Applied, thanks.  Please always remember to CC your posts to the
relevant mailing lists - in the case of regmap that's linux-kernel.
diff mbox

Patch

diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 0da5865..8e94584 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -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 */