diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-05 09:42:36 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-21 12:45:32 -0400 |
commit | e467b6421435f467e274d4f25d62900e1e0e4286 (patch) | |
tree | 9b9b9eb7ab9680b89d34a2732f73b78b2d107582 /drivers/hwspinlock/hwspinlock_internal.h | |
parent | 315d8f5ccdbb2abb609d1ca1119fb32273a09cf8 (diff) |
hwspinlock/core: simplify 'owner' handling
Use struct device_driver's owner member instead of asking drivers to
explicitly pass the owner again.
This simplifies drivers and also save some memory, since there's no
point now in maintaining a separate owner pointer per hwspinlock.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'drivers/hwspinlock/hwspinlock_internal.h')
-rw-r--r-- | drivers/hwspinlock/hwspinlock_internal.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwspinlock/hwspinlock_internal.h b/drivers/hwspinlock/hwspinlock_internal.h index 69935e6b93e5..fb25830c2ee7 100644 --- a/drivers/hwspinlock/hwspinlock_internal.h +++ b/drivers/hwspinlock/hwspinlock_internal.h | |||
@@ -44,10 +44,9 @@ struct hwspinlock_ops { | |||
44 | * @ops: platform-specific hwspinlock handlers | 44 | * @ops: platform-specific hwspinlock handlers |
45 | * @id: a global, unique, system-wide, index of the lock. | 45 | * @id: a global, unique, system-wide, index of the lock. |
46 | * @lock: initialized and used by hwspinlock core | 46 | * @lock: initialized and used by hwspinlock core |
47 | * @owner: underlying implementation module, used to maintain module ref count | ||
48 | * | 47 | * |
49 | * Note: currently simplicity was opted for, but later we can squeeze some | 48 | * Note: currently simplicity was opted for, but later we can squeeze some |
50 | * memory bytes by grouping the dev, ops and owner members in a single | 49 | * memory bytes by grouping dev, ops in a single |
51 | * per-platform struct, and have all hwspinlocks point at it. | 50 | * per-platform struct, and have all hwspinlocks point at it. |
52 | */ | 51 | */ |
53 | struct hwspinlock { | 52 | struct hwspinlock { |
@@ -55,7 +54,6 @@ struct hwspinlock { | |||
55 | const struct hwspinlock_ops *ops; | 54 | const struct hwspinlock_ops *ops; |
56 | int id; | 55 | int id; |
57 | spinlock_t lock; | 56 | spinlock_t lock; |
58 | struct module *owner; | ||
59 | }; | 57 | }; |
60 | 58 | ||
61 | #endif /* __HWSPINLOCK_HWSPINLOCK_H */ | 59 | #endif /* __HWSPINLOCK_HWSPINLOCK_H */ |