From: Alex Elder Date: Thu, 22 Aug 2013 16:31:31 +0000 (-0500) Subject: clk: get matching entry under lock in of_clk_init() X-Git-Tag: v3.12-rc1~78^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f7ed584d11be77a7521d170431bb14bc32a5980;p=pandora-kernel.git clk: get matching entry under lock in of_clk_init() Currently of_clk_init() finds a matching device node while holding the device tree spinlock. When a matching device node is found, the lock is dropped and then re-acquired in order to get a reference to the matching device id structure. Acquiring the spinlock twice is unnecessary (and it opens a vulnerable window that could conceivably lead to errors). There already exists an interface for both finding and taking a reference to a device id under lock, so use it. Signed-off-by: Alex Elder Reviewed-by: Christian Daudt Reviewed-by: Markus Mayer Reviewed-by: Matt Porter Signed-off-by: Mike Turquette --- Reading git-diff-tree failed