Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mxser: Use non-hybrid PCI devres API

mxser enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_region() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_region() with one to
the always-managed pcim_request_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250417081333.20917-2-phasta@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Philipp Stanner and committed by
Greg Kroah-Hartman
92557dea 926040da

+2 -2
+2 -2
drivers/tty/mxser.c
··· 1812 1812 1813 1813 /* io address */ 1814 1814 ioaddress = pci_resource_start(pdev, 2); 1815 - retval = pci_request_region(pdev, 2, "mxser(IO)"); 1815 + retval = pcim_request_region(pdev, 2, "mxser(IO)"); 1816 1816 if (retval) 1817 1817 goto err_zero; 1818 1818 ··· 1822 1822 1823 1823 /* vector */ 1824 1824 ioaddress = pci_resource_start(pdev, 3); 1825 - retval = pci_request_region(pdev, 3, "mxser(vector)"); 1825 + retval = pcim_request_region(pdev, 3, "mxser(vector)"); 1826 1826 if (retval) 1827 1827 goto err_zero; 1828 1828 brd->vector = ioaddress;