Skip to contentSkip to conversation

Char: From: Randy Dunlap <[email protected]>

PATCH New Jiri Slaby 1 participant 3 messages Dec 12, 2006

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/3 Char: From: Randy Dunlap <[email protected]>

From: Randy Dunlap <[email protected]>

isicom, fix build with PCI disabled

With CONFIG_PCI=n:
drivers/char/isicom.c: In function 'isicom_probe':
drivers/char/isicom.c:1793: warning: implicit declaration of function 'pci_request_region'
drivers/char/isicom.c:1827: warning: implicit declaration of function 'pci_release_region'

Let's CONFIG_ISI depend on CONFIG_PCI.

---
commit 1d9d86f80880cefeca436667a7824c9fe81ec6df
tree 33fb9396b07f853e05524014e6eef9ce287deb04
parent 722249cc1bbaf63d12237b16f0066df1436eb591
author Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:52:42 +0100 committer Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:52:42 +0100

 drivers/char/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/Kconfig +1 -1
index a84e37f..d9095ff 100644
@@ -218,7 +218,7 @@ config MOXA_SMARTIO_NEW
 
 config ISI
 	tristate "Multi-Tech multiport card support (EXPERIMENTAL)"
-	depends on SERIAL_NONSTANDARD
+	depends on SERIAL_NONSTANDARD && PCI
 	select FW_LOADER
 	help
 	  This is a driver for the Multi-Tech cards which provide several
author
#1 lore raw

PATCH 2/3 Char: mxser_new, fix non-PCI build

mxser_new, fix non-PCI build

When CONFIG_PCI is not defined (i.e. PCI bus is disabled), the mxser_new driver fails to link, since some pci functions are not available. Fix this behaviour to be able to compile this driver on machines with no PCI bus (but with ISA bus support).

---
commit 1bdc489336b6f2e6909c553f88f8275fafe741c6
tree 6030266a0852f5c00cc6714246f3ed8bde1dd58a
parent 1d9d86f80880cefeca436667a7824c9fe81ec6df
author Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:56:38 +0100 committer Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:56:38 +0100

 drivers/char/Kconfig     |    2 +-
 drivers/char/mxser_new.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
drivers/char/Kconfig +1 -1
index d9095ff..f64f131 100644
@@ -203,7 +203,7 @@ config MOXA_SMARTIO
 
 config MOXA_SMARTIO_NEW
 	tristate "Moxa SmartIO support v. 2.0 (EXPERIMENTAL)"
-	depends on SERIAL_NONSTANDARD
+	depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
 	help
 	  Say Y here if you have a Moxa SmartIO multiport serial card and/or
 	  want to help develop a new version of this driver.
drivers/char/mxser_new.c +8 -0
index efa8076..cd989dc 100644
@@ -315,6 +315,7 @@ static struct mxser_mon_ext mon_data_ext;
 static int mxser_set_baud_method[MXSER_PORTS + 1];
 static spinlock_t gm_lock;
 
+#ifdef CONFIG_PCI
 static int CheckIsMoxaMust(int io)
 {
 	u8 oldmcr, hwid;
@@ -337,6 +338,7 @@ static int CheckIsMoxaMust(int io)
 	}
 	return MOXA_OTHER_UART;
 }
+#endif
 
 static void process_txrx_fifo(struct mxser_port *info)
 {
@@ -2380,9 +2382,11 @@ static void mxser_release_res(struct mxser_board *brd, struct pci_dev *pdev,
 	if (irq)
 		free_irq(brd->irq, brd);
 	if (pdev != NULL) {	/* PCI */
+#ifdef CONFIG_PCI
 		pci_release_region(pdev, 2);
 		pci_release_region(pdev, 3);
 		pci_dev_put(pdev);
+#endif
 	} else {
 		release_region(brd->ports[0].ioaddr, 8 * brd->info->nports);
 		release_region(brd->vector, 1);
@@ -2546,6 +2550,7 @@ static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd)
 static int __devinit mxser_probe(struct pci_dev *pdev,
 		const struct pci_device_id *ent)
 {
+#ifdef CONFIG_PCI
 	struct mxser_board *brd;
 	unsigned int i, j;
 	unsigned long ioaddress;
@@ -2644,6 +2649,9 @@ err_relio:
 	brd->info = NULL;
 err:
 	return retval;
+#else
+	return -ENODEV;
+#endif
 }
 
 static void __devexit mxser_remove(struct pci_dev *pdev)
author
#2 lore raw

PATCH 3/3 Char: sx, fix non-PCI build

In reply to Jiri Slaby

sx, fix non-PCI build

When CONFIG_PCI is not defined (i.e. PCI bus is disabled), the sx driver fails to link, since some pci functions are not available. Fix this behaviour to be able to compile this driver on machines with no PCI bus (but with ISA bus support).

---
commit af8e1f039e2f0b822c5b96551b3363da7371b0b5
tree e954ee931dd5bab70494d4ae3a4e0f45a043646c
parent 1bdc489336b6f2e6909c553f88f8275fafe741c6
author Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:57:54 +0100 committer Jiri Slaby <[email protected]> Tue, 12 Dec 2006 18:57:54 +0100

 drivers/char/Kconfig |    2 +-
 drivers/char/sx.c    |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
drivers/char/Kconfig +1 -1
index f64f131..c599273 100644
@@ -312,7 +312,7 @@ config SPECIALIX_RTSCTS
 
 config SX
 	tristate "Specialix SX (and SI) card support"
-	depends on SERIAL_NONSTANDARD
+	depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
 	help
 	  This is a driver for the SX and SI multiport serial cards.
 	  Please read the file <file:Documentation/sx.txt> for details.
drivers/char/sx.c +8 -0
index a3008ce..1da92a6 100644
@@ -2498,8 +2498,10 @@ static void __devexit sx_remove_card(struct sx_board *board,
 		/* It is safe/allowed to del_timer a non-active timer */
 		del_timer(&board->timer);
 		if (pdev) {
+#ifdef CONFIG_PCI
 			pci_iounmap(pdev, board->base);
 			pci_release_region(pdev, IS_CF_BOARD(board) ? 3 : 2);
+#endif
 		} else {
 			iounmap(board->base);
 			release_region(board->hw_base, board->hw_len);
@@ -2601,6 +2603,7 @@ static struct eisa_driver sx_eisadriver = {
 
 #endif
 
+#ifdef CONFIG_PCI
  /******************************************************** 
  * Setting bit 17 in the CNTRL register of the PLX 9050  * 
  * chip forces a retry on writes while a read is pending.*
@@ -2632,10 +2635,12 @@ static void __devinit fix_sx_pci(struct pci_dev *pdev, struct sx_board *board)
 	}
 	iounmap(rebase);
 }
+#endif
 
 static int __devinit sx_pci_probe(struct pci_dev *pdev,
 				  const struct pci_device_id *ent)
 {
+#ifdef CONFIG_PCI
 	struct sx_board *board;
 	unsigned int i, reg;
 	int retval = -EIO;
@@ -2700,6 +2705,9 @@ err_flag:
 	board->flags &= ~SX_BOARD_PRESENT;
 err:
 	return retval;
+#else
+	return -ENODEV;
+#endif
 }
 
 static void __devexit sx_pci_remove(struct pci_dev *pdev)