]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitef747171399d4ec9eb531a95a45649f29804f0fa
tree277884885cce92190d9476499a87118005e602b5
parent919023796b705debc7255f799ec55c658250ee6d
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: d21699f5fe03 ("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