kernel_samsung_a53x/drivers/pci
Uwe Kleine-König af79046b9f PCI: exynos: Don't discard .remove() callback
[ Upstream commit 83a939f0fdc208ff3639dd3d42ac9b3c35607fd2 ]

With CONFIG_PCI_EXYNOS=y and exynos_pcie_remove() marked with __exit, the
function is discarded from the driver. In this case a bound device can
still get unbound, e.g via sysfs. Then no cleanup code is run resulting in
resource leaks or worse.

The right thing to do is do always have the remove callback available.
This fixes the following warning by modpost:

  WARNING: modpost: drivers/pci/controller/dwc/pci-exynos: section mismatch in reference: exynos_pcie_driver+0x8 (section: .data) -> exynos_pcie_remove (section: .exit.text)

(with ARCH=x86_64 W=1 allmodconfig).

Fixes: 340cba6092c2 ("pci: Add PCIe driver for Samsung Exynos")
Link: https://lore.kernel.org/r/20231001170254.2506508-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:43:27 +01:00
..
controller PCI: exynos: Don't discard .remove() callback 2024-11-18 11:43:27 +01:00
endpoint Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hotplug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common() 2024-11-18 11:43:22 +01:00
switch Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
access.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ecam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host-bridge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iov.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
p2pdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-11-18 11:43:21 +01:00
pci-bridge-emul.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-bridge-emul.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-driver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-label.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-mid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-pf-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-11-18 11:43:21 +01:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks.c PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device 2024-11-18 10:58:47 +01:00
remove.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
search.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-res.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
slot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vpd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-pcifront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00