mwifiex: Use pci_release_region() instead of a pci_release_regions()
authorYogesh Ashok Powar <yogeshp@marvell.com>
Tue, 23 Apr 2013 23:49:47 +0000 (16:49 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 26 Apr 2013 12:42:20 +0000 (08:42 -0400)
PCI regions are associated with the device using
pci_request_region() call. Hence use pci_release_region()
instead of pci_release_regions().

Cc: <stable@vger.kernel.org> # 3.2+
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/pcie.c

index 80f282c0bd4d0a4dcf9f159f6c831b91a0003f8d..fec2a617bf984440111f058d43e843c6def73fba 100644 (file)
@@ -2294,8 +2294,8 @@ static void mwifiex_pcie_cleanup(struct mwifiex_adapter *adapter)
        if (pdev) {
                pci_iounmap(pdev, card->pci_mmap);
                pci_iounmap(pdev, card->pci_mmap1);
-
-               pci_release_regions(pdev);
+               pci_release_region(pdev, 2);
+               pci_release_region(pdev, 0);
                pci_disable_device(pdev);
                pci_set_drvdata(pdev, NULL);
        }