[lkml]   [2011]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] ux500: Adding support for u8500 Hsem functionality V2
On Tue, Apr 12, 2011 at 8:46 PM, Arnd Bergmann <> 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).

 \ /
  Last update: 2011-04-13 10:19    [W:0.097 / U:20.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site