public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.5] Fix compilation of ip2main (fwd)
@ 2003-06-24 17:34 Adrian Bunk
  2003-06-24 17:40 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2003-06-24 17:34 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel, Eduardo Pereira Habkost

Could anyone comment on this patch?

This patch by Eduardo Pereira Habkost <ehabkost@conectiva.com.br> or 
something similar is still needed in 2.5.73 to fix the compilation of 
ip2main.c .

TIA
Adrian


----- Forwarded message from Eduardo Pereira Habkost <ehabkost@conectiva.com.br> -----

Date:	Wed, 11 Jun 2003 19:32:21 -0300
From: Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
To: "Michael H. Warfield" <mhw@wittsend.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.5] Fix compilation of ip2main

The following patch fix compilation of drivers/char/ip2main.c. It was
broken by the removal of pci_present().

It just adds open and closing braces around the code that declares the
pci_dev_i variable. The rest of the patch just change the indentation.

--
Eduardo


diff -Nru a/drivers/char/ip2main.c b/drivers/char/ip2main.c
--- a/drivers/char/ip2main.c	Wed Jun 11 19:18:27 2003
+++ b/drivers/char/ip2main.c	Wed Jun 11 19:18:27 2003
@@ -691,40 +691,42 @@
 				} 
 			} 
 #else /* LINUX_VERSION_CODE > 2.1.99 */
-			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
 			printk( KERN_ERR "IP2: PCI card specified but PCI support not\n");



----- End forwarded message -----


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

* Re: [PATCH][2.5] Fix compilation of ip2main (fwd)
  2003-06-24 17:34 [PATCH][2.5] Fix compilation of ip2main (fwd) Adrian Bunk
@ 2003-06-24 17:40 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-06-24 17:40 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, Eduardo Pereira Habkost

On Tue, Jun 24, 2003 at 07:34:34PM +0200, Adrian Bunk wrote:
> Could anyone comment on this patch?
> 
> This patch by Eduardo Pereira Habkost <ehabkost@conectiva.com.br> or 
> something similar is still needed in 2.5.73 to fix the compilation of 
> ip2main.c .

Bleah, yeah, that's my fault.  I'll apply this and forward it on to
Linus.

Sorry about that.

greg k-h

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

end of thread, other threads:[~2003-06-24 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-24 17:34 [PATCH][2.5] Fix compilation of ip2main (fwd) Adrian Bunk
2003-06-24 17:40 ` Greg KH

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