[PATCH 3/3] hwspinlock/core: allow hwspinlock_device to have bank-specific private data
Ohad Ben-Cohen
ohad at wizery.com
Sat Jul 7 06:55:58 EDT 2012
Hi Shinya,
On Fri, Jul 6, 2012 at 7:56 AM, Shinya Kuribayashi
<shinya.kuribayashi.px at renesas.com> wrote:
> 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.
I don't mind taking this one as long as we have a (justifiable) user for it.
I assume you're using this in your driver, so let's with this patch
until you post your driver?
Thanks!
Ohad.
>
> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px at renesas.com>
> ---
> 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
>
More information about the linux-arm-kernel
mailing list