Re: [PATCH 35/65] OMAPDSS: APPLY: move spinlock outside the struct

From
Sergey Kibrik <hidden>
Date
2011-11-23 10:29:27
Also in
linux-omap
Reply to
Tomi Valkeinen, 2011-11-22
On 11/22/2011 11:21 AM, Tomi Valkeinen wrote:
dss_cache struct contains a spinlock used to protect the struct. A more
logical place for the spinlock is outside the struct that it is
protecting. So move it there.
a small question: isn't it clearer to keep lock inside struct, so it would be easier to read code? Say, if we meet
spin_lock_irqsave(&dss_cache.lock, flags);
in code we already aware of what struct being actually protected, and in case of external lock it's not that obvious

-- 
regards,
Sergey
Thread (91 messages) 91 messages, 3 authors, last reply 2011-12-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help