Merge tag 'hwspinlock-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock

Pull hwspinlock fix from Ohad Ben-Cohen:
 "A single hwspinlock core fix for multiple hwspinlock devices
  scenarios, from Shinya Kuribayashi."

* tag 'hwspinlock-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/core: use global ID to register hwspinlocks on multiple devices
This commit is contained in:
Linus Torvalds
2012-07-09 13:22:40 -07:00

View File

@@ -345,7 +345,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
spin_lock_init(&hwlock->lock); spin_lock_init(&hwlock->lock);
hwlock->bank = bank; hwlock->bank = bank;
ret = hwspin_lock_register_single(hwlock, i); ret = hwspin_lock_register_single(hwlock, base_id + i);
if (ret) if (ret)
goto reg_failed; goto reg_failed;
} }
@@ -354,7 +354,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
reg_failed: reg_failed:
while (--i >= 0) while (--i >= 0)
hwspin_lock_unregister_single(i); hwspin_lock_unregister_single(base_id + i);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(hwspin_lock_register); EXPORT_SYMBOL_GPL(hwspin_lock_register);