patch-2.3.99-pre7 linux/drivers/char/moxa.c

Next file: linux/drivers/char/msp3400.c
Previous file: linux/drivers/char/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/char/moxa.c linux/drivers/char/moxa.c
@@ -482,13 +482,15 @@
 #endif
 	/* Find PCI boards here */
 #ifdef CONFIG_PCI
-	if (pci_present()) {
+	{
 		struct pci_dev *p = NULL;
 		n = sizeof(moxa_pcibrds) / sizeof(moxa_pciinfo);
 		i = 0;
 		while (i < n) {
 			while((p = pci_find_device(moxa_pcibrds[i].vendor_id, moxa_pcibrds[i].device_id, p))!=NULL)
 			{
+				if (pci_enable_device(p))
+					continue;
 				if (numBoards >= MAX_BOARDS) {
 					if (verbose)
 						printk("More than %d MOXA Intellio family boards found. Board is ignored.", MAX_BOARDS);
@@ -511,9 +513,7 @@
 
 static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board)
 {
-	unsigned int val;
-
-	board->baseAddr = p->resource[2].start;
+	board->baseAddr = pci_resource_start (p, 2);
 	board->boardType = board_type;
 	switch (board_type) {
 	case MOXA_BOARD_C218_ISA:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)