Re: [PATCH 1/2] ux500: Adding support for u8500 Hsem functionality V2

From: Ohad Ben-Cohen
Date: Wed Apr 13 2011 - 04:17:19 EST

On Tue, Apr 12, 2011 at 8:46 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> When you do that, this can be a single allocation.
> Thinking about it some more, it may actually be worthwhile to still improve
> the API here: I think the owner field should be part of the operations structure,
> because it is constant. It would also be nice to have a "private" pointer
> in struct hwspinlock, so you don't need to wrap it if you don't want to.

These are good improvements, part of which I planned to do so too
(especially to take out the dev, ops and owner fields into a dedicated
structure, and have all the hwspinlock instances, which belong to that
block, point at it).

By introducing a "private" pointer, and removing the platform-specific
wrapping around it, we can also get rid of the 'id' field, and induce
it with a simple pointers arithmetic (namely, id = pointer of instance
- array base address).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at