mirror of https://gitee.com/openkylin/linux.git
A single hwspinlock core fix for multiple hwspinlock devices scenarios,
from Shinya Kuribayashi. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJP+ZcQAAoJELLolMlTRIoMUP8P/iRgrwLmfsUN/w+/PAv8rRCP aprvEamj+Jq6DiA63C3Fg6j03mN4ADIzjanqupttMEJekKXyW2mJh2WzDdi5qQ39 pWBhp8wBl0vIdZXOEpOc3baE82XQFTgv4iTxFmcjXCDRoaOlLJqNGpehs5h4yvRK +QoiBfucmoa7atKkOoQxlZQyUZvkuxcSnpZSd4m39ylrk4LTQHoXJ1+6OrBKFeGV wzHTO9kGdPdAkpW73TatBMsu2unzLAAO1ImP2ETKL/JlqG8W5NhLZwrEbtq5JKtr nUyskUp3xdZYcevXOzZNwTp6uRcdoUUEh3OzT+xEGpoh8V5lU5NSSFOCaR4UQrm+ lyz1HePAc9nNG7MErpcLu4WSY5xPqukAk3ML07t2zRgzMp/8BUHKDT0n43HJchSO JXKz9k0x21hE+uGfyi0euC1dnJpiZxFVIsn5m7YP/WeQdyKpO4EKOi1N7LGWALUh s6rE7czWfpXxHfBwXpWpqIVZQsFG8KN19XAe3uEXDZVBMJwFUiJcQxBPJn7nE9Tl wQNeD7Lj1It4AyL8zSTRVpLjwXWbzG2LrLx5VhPDgLNGGnoFAmMb+2O6oFutCHwM T+zJH7il9IroSArMGDZaGWRc/+EDWTqEBBwm/JFAyAzWw/SIxkJhfdl6IrJ9cMtw AvW/7lYyE3EbUfZOR4sX =dKmT -----END PGP SIGNATURE----- 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:
commit
17cda2082d
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue