lkml.org 
[lkml]   [2012]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t
From
Date
On Tue, 2012-05-29 at 12:06 +0200, Christian Dietrich wrote:
> Since nw_gpio_lock is a raw_spinlock_t it should be used with the
> raw_spinlock_* functions and not the spinlock_* variants. Functionally
> this is equivalent at the moment, because the raw_spinlock_t is the
> first field of spinlock_t, and therefore &nw_gpio_lock ==
> &(nw_gpio_lock->rlock). But when other spinlock_t functions use other
> field they read and write random memory.

Hm, why are we exposing a raw spinlock to drivers?

Should we export a helper function (or macro, I suppose) which does the
appropriate locking *and* the GPIO operation?

--
dwmw2
[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2012-05-29 13:01    [W:0.117 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site