summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch
new file mode 100644
index 00000000..11ba36d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0034-hwspinlock-core-use-global-ID-to-register-hwspinlock.patch
@@ -0,0 +1,52 @@
1From 6c6190dbd1e0054c77445ed61dcbc70db441d4d2 Mon Sep 17 00:00:00 2001
2From: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
3Date: Sat, 7 Jul 2012 13:37:42 +0300
4Subject: [PATCH 034/109] hwspinlock/core: use global ID to register
5 hwspinlocks on multiple devices
6
7commit 476a7eeb60e70ddab138e7cb4bc44ef5ac20782e upstream.
8
9Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
10single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
11to register numerous (a bank of) hwspinlock instances in a single API,
12'hwspin_lock_register()'.
13
14At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
15to 'hwspin_lock_register_single()', despite that ..._single() requires
16'global IDs' to register hwspinlocks.
17
18We have to convert into global IDs by supplying the missing 'base_id'.
19
20Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
21[ohad: fix error path of hwspin_lock_register, too]
22Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 drivers/hwspinlock/hwspinlock_core.c | 4 ++--
26 1 files changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
29index 61c9cf1..1201a15 100644
30--- a/drivers/hwspinlock/hwspinlock_core.c
31+++ b/drivers/hwspinlock/hwspinlock_core.c
32@@ -345,7 +345,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
33 spin_lock_init(&hwlock->lock);
34 hwlock->bank = bank;
35
36- ret = hwspin_lock_register_single(hwlock, i);
37+ ret = hwspin_lock_register_single(hwlock, base_id + i);
38 if (ret)
39 goto reg_failed;
40 }
41@@ -354,7 +354,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
42
43 reg_failed:
44 while (--i >= 0)
45- hwspin_lock_unregister_single(i);
46+ hwspin_lock_unregister_single(base_id + i);
47 return ret;
48 }
49 EXPORT_SYMBOL_GPL(hwspin_lock_register);
50--
511.7.7.6
52