fpga: altera-hps2fpga: fix multiple init of l3_remap_lock
authorIan Abbott <abbotti@mev.co.uk>
Wed, 2 Aug 2017 02:20:54 +0000 (21:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Aug 2017 21:27:55 +0000 (14:27 -0700)
commit4ae2bd4b3ada3dfd80ca8110b4f567752966ca1e
tree277884885cce92190d9476499a87118005e602b5
parent26ffca5ec406213da347cd3c5858d1414943caea
fpga: altera-hps2fpga: fix multiple init of l3_remap_lock

The global spinlock `l3_remap_lock` is reinitialized every time the
"probe" function `alt_fpga_bridge_probe()` is called.  It should only be
initialized once.  Use `DEFINE_SPINLOCK()` to initialize it statically.

Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support")
Cc: <stable@vger.kernel.org> # 4.10+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-By: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/altera-hps2fpga.c