Re: [PATCH 1/10] drivers/char: pci_find_device remove (drivers/char/ip2main.c)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cc: [email protected] [maintainer]

Jiri Slaby napsal(a):

Signed-off-by: Jiri Slaby <[email protected]>

ip2main.c |    8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/char/ip2main.c b/drivers/char/ip2main.c
--- a/drivers/char/ip2main.c
+++ b/drivers/char/ip2main.c
@@ -442,6 +442,7 @@ cleanup_module(void)
#ifdef CONFIG_PCI
		if (ip2config.type[i] == PCI && ip2config.pci_dev[i]) {
			pci_disable_device(ip2config.pci_dev[i]);
+			pci_dev_put(ip2config.pci_dev[i]);
			ip2config.pci_dev[i] = NULL;
		}
#endif
@@ -594,9 +595,10 @@ ip2_loadmain(int *iop, int *irqp, unsign
		case PCI:
#ifdef CONFIG_PCI
			{
-				struct pci_dev *pci_dev_i = NULL;
-				pci_dev_i = pci_find_device(PCI_VENDOR_ID_COMPUTONE,
-							  PCI_DEVICE_ID_COMPUTONE_IP2EX, pci_dev_i);
+				struct pci_dev *pci_dev_i;
+				pci_dev_i = pci_get_device(
+					PCI_VENDOR_ID_COMPUTONE,
+					PCI_DEVICE_ID_COMPUTONE_IP2EX, NULL);
				if (pci_dev_i != NULL) {
					unsigned int addr;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux