From: Lars-Peter Clausen Date: Fri, 24 May 2013 08:29:22 +0000 (+0200) Subject: regmap: Make regmap-mmio usable from atomic contexts X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~30^2~3^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92ab1aab59c61b3e05200b9aa0e05ab770059142;p=pandora-kernel.git regmap: Make regmap-mmio usable from atomic contexts regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for locking. To be able to use the regmap API from different contexts (atomic vs non-atomic), without the risk of race conditions, we need to use spin_lock_irqsave() and spin_lock_irqrestore() instead. A new field, the spinlock_flags field, is added to regmap struct to store the flags between regmap_{,un}lock_spinlock(). The spinlock_flags field itself is also protected by the spinlock. Thanks to Stephen Warren for the suggestion of this particular solution. Signed-off-by: Lars-Peter Clausen Reviewed-by: Stephen Warren Signed-off-by: Mark Brown --- Reading git-diff-tree failed