hwspinlock/core: use global ID to register hwspinlocks on multiple devices
authorShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Sat, 7 Jul 2012 10:37:42 +0000 (13:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 16:04:25 +0000 (09:04 -0700)
commit10ff23ae117665e886fed089cb5a2e015cd8b7b4
tree991cf610e97fb1fbafc708e045af549f06c6fe13
parent0ea4ad38312422221b1b8a4fd820f38119bfce92
hwspinlock/core: use global ID to register hwspinlocks on multiple devices

commit 476a7eeb60e70ddab138e7cb4bc44ef5ac20782e upstream.

Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
to register numerous (a bank of) hwspinlock instances in a single API,
'hwspin_lock_register()'.

At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
to 'hwspin_lock_register_single()', despite that ..._single() requires
'global IDs' to register hwspinlocks.

We have to convert into global IDs by supplying the missing 'base_id'.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
[ohad: fix error path of hwspin_lock_register, too]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwspinlock/hwspinlock_core.c