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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html