]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: spear: Drop __initdata from spear13xx_pcie_driver
authorMatwey V. Kornilov <matwey@sai.msu.ru>
Thu, 19 Feb 2015 17:41:48 +0000 (20:41 +0300)
committerSasha Levin <sasha.levin@oracle.com>
Thu, 23 Apr 2015 03:31:01 +0000 (23:31 -0400)
commita78cff341ce3c7085f574e266f88306deca54dc4
treeccd5beeb9b5af6e2df9441dd670f5be094105f85
parentf31d6097a87dc1355df5a8527e86570caf1df539
PCI: spear: Drop __initdata from spear13xx_pcie_driver

[ Upstream commit a43f32d647273023edddb0dc8f91c4c6378b252b ]

Struct spear13xx_pcie_driver was in initdata, but we passed a pointer to it
to platform_driver_register(), which can use the pointer at arbitrary times
in the future, even after the initdata is freed.  That leads to crashes.

Move spear13xx_pcie_driver and things referenced by it
(spear13xx_pcie_probe() and dw_pcie_host_init()) out of initdata.

[bhelgaas: changelog]
Fixes: 6675ef212dac ("PCI: spear: Fix Section mismatch compilation warning for probe()")
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
CC: stable@vger.kernel.org # v3.17+
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-spear13xx.c