diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-05 16:42:36 +0300 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-21 19:45:32 +0300 |
commit | e467b6421435f467e274d4f25d62900e1e0e4286 (patch) | |
tree | 9b9b9eb7ab9680b89d34a2732f73b78b2d107582 /drivers/hwspinlock/hwspinlock_core.c | |
parent | 315d8f5ccdbb2abb609d1ca1119fb32273a09cf8 (diff) | |
download | linux-e467b6421435f467e274d4f25d62900e1e0e4286.tar.bz2 |
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_core.c')
-rw-r--r-- | drivers/hwspinlock/hwspinlock_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index 43a62714b4fb..af5175c5d5f4 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ -352,7 +352,7 @@ static int __hwspin_lock_request(struct hwspinlock *hwlock) int ret; /* prevent underlying implementation from being removed */ - if (!try_module_get(hwlock->owner)) { + if (!try_module_get(hwlock->dev->driver->owner)) { dev_err(hwlock->dev, "%s: can't get owner\n", __func__); return -EINVAL; } @@ -535,7 +535,7 @@ int hwspin_lock_free(struct hwspinlock *hwlock) /* sanity check (this shouldn't happen) */ WARN_ON(tmp != hwlock); - module_put(hwlock->owner); + module_put(hwlock->dev->driver->owner); out: spin_unlock(&hwspinlock_tree_lock); |