diff options
author | Michael Neuling <mikey@neuling.org> | 2015-02-12 12:57:51 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-12 16:06:08 +1100 |
commit | 89c145345e874ddd4739394b2115a1a84118572f (patch) | |
tree | f9d33825056082826aa1711facbf36c3baeaf451 /include | |
parent | 5ae363fc9fc7c138d020e58a5f2de69e5ede6068 (diff) | |
download | skiboot-89c145345e874ddd4739394b2115a1a84118572f.zip skiboot-89c145345e874ddd4739394b2115a1a84118572f.tar.gz skiboot-89c145345e874ddd4739394b2115a1a84118572f.tar.bz2 |
Use LOCK_UNLOCKED macro to in init_lock()
Avoids duplication of init values.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/lock.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/lock.h b/include/lock.h index 823160a..0ac943d 100644 --- a/include/lock.h +++ b/include/lock.h @@ -60,8 +60,7 @@ extern bool bust_locks; static inline void init_lock(struct lock *l) { - l->lock_val = 0; - l->in_con_path = false; + *l = (struct lock)LOCK_UNLOCKED; } extern bool __try_lock(struct lock *l); |