[PATCH 3/10] drivers/char: pci_find_device remove (drivers/char/mxser.c)

From: Jiri Slaby
Date: Sat Sep 10 2005 - 07:22:20 EST


Signed-off-by: Jiri Slaby <xslaby@xxxxxxxxxx>

mxser.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -511,6 +511,7 @@ static void __exit mxser_module_exit(voi
if (pdev != NULL) { //PCI
release_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2));
release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3));
+ pci_dev_put(pdev);
} else {
release_region(mxsercfg[i].ioaddr[0], 8 * mxsercfg[i].ports);
release_region(mxsercfg[i].vector, 1);
@@ -831,7 +832,7 @@ static int mxser_init(void)
index = 0;
b = 0;
while (b < n) {
- pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev);
+ pdev = pci_get_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev);
if (pdev == NULL) {
b++;
continue;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/