clk: get matching entry under lock in of_clk_init()
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 <f429030cf5c0faf36fac3d102073b6e63a647baa@linaro.org>
Reviewed-by: Christian Daudt <9f4921b51c2e573cead9af22c0e0d1a14ad7b643@broadcom.com>
Reviewed-by: Markus Mayer <b48eb3d058b2267190814a31041cdb9bcbf58bfd@linaro.org>
Reviewed-by: Matt Porter <8a12fa875e5339448b9a7bed8541135ca6b440a5@linaro.org>
Signed-off-by: Mike Turquette <6dab61939fc5e23761050a66932f032dceda5ebf@linaro.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs