public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Yet more PCI fixes for 2.5.70
Date: Tue, 10 Jun 2003 11:49:24 -0700	[thread overview]
Message-ID: <10552709641395@kroah.com> (raw)
In-Reply-To: <10552709641098@kroah.com>

ChangeSet 1.1322, 2003/06/09 15:32:18-07:00, greg@kroah.com

PCI: remove pci_present() from drivers/char/ip2main.c


 drivers/char/ip2main.c |   58 +++++++++++++++++++++++--------------------------
 1 files changed, 28 insertions(+), 30 deletions(-)


diff -Nru a/drivers/char/ip2main.c b/drivers/char/ip2main.c
--- a/drivers/char/ip2main.c	Tue Jun 10 11:22:13 2003
+++ b/drivers/char/ip2main.c	Tue Jun 10 11:22:13 2003
@@ -691,41 +691,39 @@
 				} 
 			} 
 #else /* LINUX_VERSION_CODE > 2.1.99 */
-			if (pci_present()) {
-				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);
-				if (pci_dev_i != NULL) {
-					unsigned int addr;
-					unsigned char pci_irq;
+			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);
+			if (pci_dev_i != NULL) {
+				unsigned int addr;
+				unsigned char pci_irq;
 
-					ip2config.type[i] = PCI;
-					status =
-					pci_read_config_dword(pci_dev_i, PCI_BASE_ADDRESS_1, &addr);
-					if ( addr & 1 ) {
-						ip2config.addr[i]=(USHORT)(addr&0xfffe);
-					} else {
-						printk( KERN_ERR "IP2: PCI I/O address error\n");
-					}
-					status =
-					pci_read_config_byte(pci_dev_i, PCI_INTERRUPT_LINE, &pci_irq);
+				ip2config.type[i] = PCI;
+				status =
+				pci_read_config_dword(pci_dev_i, PCI_BASE_ADDRESS_1, &addr);
+				if ( addr & 1 ) {
+					ip2config.addr[i]=(USHORT)(addr&0xfffe);
+				} else {
+					printk( KERN_ERR "IP2: PCI I/O address error\n");
+				}
+				status =
+				pci_read_config_byte(pci_dev_i, PCI_INTERRUPT_LINE, &pci_irq);
 
 //		If the PCI BIOS assigned it, lets try and use it.  If we
 //		can't acquire it or it screws up, deal with it then.
 
-//					if (!is_valid_irq(pci_irq)) {
-//						printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
-//						pci_irq = 0;
-//					}
-					ip2config.irq[i] = pci_irq;
-				} else {	// ann error
-					ip2config.addr[i] = 0;
-					if (status == PCIBIOS_DEVICE_NOT_FOUND) {
-						printk( KERN_ERR "IP2: PCI board %d not found\n", i );
-					} else {
-						pcibios_strerror(status);
-					}
-				} 
+//				if (!is_valid_irq(pci_irq)) {
+//					printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
+//					pci_irq = 0;
+//				}
+				ip2config.irq[i] = pci_irq;
+			} else {	// ann error
+				ip2config.addr[i] = 0;
+				if (status == PCIBIOS_DEVICE_NOT_FOUND) {
+					printk( KERN_ERR "IP2: PCI board %d not found\n", i );
+				} else {
+					pcibios_strerror(status);
+				}
 			} 
 #endif	/* ! 2_0_X */
 #else


  reply	other threads:[~2003-06-10 19:20 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 18:33 [BK PATCH] Yet more PCI fixes for 2.5.70 Greg KH
2003-06-10 18:49 ` [PATCH] " Greg KH
2003-06-10 18:49   ` Greg KH
2003-06-10 18:49     ` Greg KH
2003-06-10 18:49       ` Greg KH
2003-06-10 18:49         ` Greg KH
2003-06-10 18:49           ` Greg KH
2003-06-10 18:49             ` Greg KH [this message]
2003-06-10 18:49               ` Greg KH
2003-06-10 18:49                 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10 18:49 Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49   ` Greg KH
2003-06-10 18:49     ` Greg KH
2003-06-10 18:49       ` Greg KH
2003-06-10 18:49         ` Greg KH
2003-06-10 18:49           ` Greg KH
2003-06-10 18:49             ` Greg KH
2003-06-10 18:49               ` Greg KH
2003-06-10 18:49                 ` Greg KH
2003-06-10 18:49                   ` Greg KH
2003-06-10 18:49                     ` Greg KH
2003-06-10 18:49                       ` Greg KH
2003-06-10 18:49                         ` Greg KH
2003-06-10 18:49                           ` Greg KH
2003-06-10 18:49                             ` Greg KH
2003-06-10 18:49                               ` Greg KH
2003-06-10 18:49                                 ` Greg KH
2003-06-10 18:49                                   ` Greg KH
2003-06-10 18:49                                     ` Greg KH
2003-06-10 18:49                                       ` Greg KH
2003-06-10 18:49                                         ` Greg KH
2003-06-10 18:49                                           ` Greg KH
2003-06-10 18:49                                             ` Greg KH
2003-06-10 18:49                                               ` Greg KH
2003-06-10 18:49                                                 ` Greg KH
2003-06-10 18:49                                                   ` Greg KH
2003-06-10 18:49                                                     ` Greg KH
2003-06-10 18:49                                                       ` Greg KH
2003-06-10 18:49                                                         ` Greg KH
2003-06-10 18:49                                                           ` Greg KH
2003-06-10 18:49                                                             ` Greg KH
2003-06-10 18:49                                                               ` Greg KH
2003-06-10 18:49                                                                 ` Greg KH
2003-06-10 18:49                                                                   ` Greg KH
2003-06-10 18:49                                                                     ` Greg KH
2003-06-10 18:49                                                                       ` Greg KH
2003-06-10 18:49                                                                         ` Greg KH
2003-06-10 18:49                                                                           ` Greg KH
2003-06-10 18:49                                                                             ` Greg KH
2003-06-10 18:49                                                                               ` Greg KH
2003-06-10 18:49                                                                                 ` Greg KH
2003-06-10 18:49                                                                                   ` Greg KH
2003-06-10 18:49                                                                                     ` Greg KH
2003-06-10 18:49                                                                                       ` Greg KH
2003-06-10 18:49                                                                                         ` Greg KH
2003-06-10 18:49                                                                                           ` Greg KH
2003-06-10 18:49                                                                                             ` Greg KH
2003-06-10 18:49                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                   ` Greg KH
2003-06-10 18:49                                                                                                     ` Greg KH
2003-06-10 18:49                                                                                                       ` Greg KH
2003-06-10 18:49                                                                                                         ` Greg KH
2003-06-10 18:49                                                                                                           ` Greg KH
2003-06-10 18:49                                                                                                             ` Greg KH
2003-06-10 18:49                                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                                   ` Greg KH
2003-06-10 18:49                                                                                                                     ` Greg KH
2003-06-10 18:49                                                                                                                       ` Greg KH
2003-06-10 18:49                                                                                                                         ` Greg KH
2003-06-10 18:49                                                                                                                           ` Greg KH
2003-06-10 18:49                                                                                                                             ` Greg KH
2003-06-10 18:49                                                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                                                   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10552709641395@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox