|
|
[PATCH 3/3] hwspinlock/core: allow hwspinlock_device to have bank-specific private data |
It would be useful, for example, to save ioremap()ed 'io_base' address,
when a platform-specific driver uses 'priv' in 'struct hwspinlock' for
something different.
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@xxxxxxxxxxx>
---
drivers/hwspinlock/hwspinlock_internal.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hwspinlock/hwspinlock_internal.h b/drivers/hwspinlock/hwspinlock_internal.h
index c60318c..dc7e522 100644
--- a/drivers/hwspinlock/hwspinlock_internal.h
+++ b/drivers/hwspinlock/hwspinlock_internal.h
@@ -57,6 +57,9 @@ struct hwspinlock {
* @ops: platform-specific hwspinlock handlers
* @base_id: id index of the first lock in this device
* @num_locks: number of locks in this device
+ * @bank_data: private data which can be shared across 'struct hwspinlock'
+ * instances in this device, owned by the underlying platform-
+ * specific hwspinlock driver
* @lock: dynamically allocated array of 'struct hwspinlock' (must be placed
* at the end of the hwspinlock_device)
*/
@@ -65,6 +68,7 @@ struct hwspinlock_device {
const struct hwspinlock_ops *ops;
int base_id;
int num_locks;
+ void *bank_data;
struct hwspinlock lock[0];
};
--
1.7.11.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[Linux ARM (vger)] [Linux ARM MSM] [Linux Omap] [Linux Arm] [Linux Tegra] [Fedora ARM] [eCos] [Linux Fastboot] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
![]() |