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 /Documentation/hwspinlock.txt | |
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 'Documentation/hwspinlock.txt')
-rw-r--r-- | Documentation/hwspinlock.txt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt index 7dcd1a4e726c..bbaa4649b637 100644 --- a/Documentation/hwspinlock.txt +++ b/Documentation/hwspinlock.txt | |||
@@ -256,18 +256,16 @@ underlying hwspinlock implementation using the hwspin_lock_register() API. | |||
256 | * @ops: vendor-specific hwspinlock handlers | 256 | * @ops: vendor-specific hwspinlock handlers |
257 | * @id: a global, unique, system-wide, index of the lock. | 257 | * @id: a global, unique, system-wide, index of the lock. |
258 | * @lock: initialized and used by hwspinlock core | 258 | * @lock: initialized and used by hwspinlock core |
259 | * @owner: underlying implementation module, used to maintain module ref count | ||
260 | */ | 259 | */ |
261 | struct hwspinlock { | 260 | struct hwspinlock { |
262 | struct device *dev; | 261 | struct device *dev; |
263 | const struct hwspinlock_ops *ops; | 262 | const struct hwspinlock_ops *ops; |
264 | int id; | 263 | int id; |
265 | spinlock_t lock; | 264 | spinlock_t lock; |
266 | struct module *owner; | ||
267 | }; | 265 | }; |
268 | 266 | ||
269 | The underlying implementation is responsible to assign the dev, ops, id and | 267 | The underlying implementation is responsible to assign the dev, ops and id |
270 | owner members. The lock member, OTOH, is initialized and used by the hwspinlock | 268 | members. The lock member, OTOH, is initialized and used by the hwspinlock |
271 | core. | 269 | core. |
272 | 270 | ||
273 | 6. Implementation callbacks | 271 | 6. Implementation callbacks |