public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.9-rc2-mm4 bttv-driver.c][4/8] convert pci_find_device to pci_dev_present
@ 2004-09-29 20:55 Hanna Linder
  2004-09-29 21:03 ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: Hanna Linder @ 2004-09-29 20:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel-janitors, greg, hannal, kraxel


As pci_find_device is going away need to replace it. This file did not use the dev returned
from pci_find_device so is replaceable by pci_dev_present. I was not able to test it
as I do not have the hardware.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@us.ibm.com>

diff -Nrup linux-2.6.9-rc2-mm4cln/drivers/media/video/bttv-driver.c linux-2.6.9-rc2-mm4patch/drivers/media/video/bttv-driver.c
--- linux-2.6.9-rc2-mm4cln/drivers/media/video/bttv-driver.c	2004-09-28 14:58:35.000000000 -0700
+++ linux-2.6.9-rc2-mm4patch/drivers/media/video/bttv-driver.c	2004-09-29 13:08:59.369697520 -0700
@@ -4012,6 +4012,10 @@ static int bttv_init_module(void)
 {
 	int rc;
 	bttv_num = 0;
+	static struct pci_device_id cx2388x[] {
+		{ PCI_DEVICE(0x14f1, 0x8800) },
+		{ },
+	};
 
 	printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n",
 	       (BTTV_VERSION_CODE >> 16) & 0xff,
@@ -4036,7 +4040,7 @@ static int bttv_init_module(void)
 	rc = pci_module_init(&bttv_pci_driver);
 	if (-ENODEV == rc) {
 		/* plenty of people trying to use bttv for the cx2388x ... */
-		if (NULL != pci_find_device(0x14f1, 0x8800, NULL))
+		if (pci_dev_present(cx2388x))
 			printk("bttv doesn't support your Conexant 2388x card.\n");
 	}
 	return rc;


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-09-30  8:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-29 20:55 [PATCH 2.6.9-rc2-mm4 bttv-driver.c][4/8] convert pci_find_device to pci_dev_present Hanna Linder
2004-09-29 21:03 ` Christoph Hellwig
2004-09-29 21:11   ` Greg KH
2004-09-29 21:43     ` Hanna Linder
2004-09-29 22:28       ` [Kernel-janitors] " Matthew Wilcox
2004-09-29 22:32         ` Hanna Linder
2004-09-29 22:23   ` Tonnerre
2004-09-30  8:23     ` Gerd Knorr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox