aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mxser_new.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-13 03:34:19 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:49 -0500
commitfb0c9295b81f5c7f51058aabfadd13d8e70b48f4 (patch)
tree0da52641ef141ca361a4ad0cea19831b1c6f7cb0 /drivers/char/mxser_new.c
parenta3808ac156f503dd2a00a059d9ff4677ce75244f (diff)
[PATCH] 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). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mxser_new.c')
-rw-r--r--drivers/char/mxser_new.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index efa8076c33e0..cd989dce7c53 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -315,6 +315,7 @@ static struct mxser_mon_ext mon_data_ext;
315static int mxser_set_baud_method[MXSER_PORTS + 1]; 315static int mxser_set_baud_method[MXSER_PORTS + 1];
316static spinlock_t gm_lock; 316static spinlock_t gm_lock;
317 317
318#ifdef CONFIG_PCI
318static int CheckIsMoxaMust(int io) 319static int CheckIsMoxaMust(int io)
319{ 320{
320 u8 oldmcr, hwid; 321 u8 oldmcr, hwid;
@@ -337,6 +338,7 @@ static int CheckIsMoxaMust(int io)
337 } 338 }
338 return MOXA_OTHER_UART; 339 return MOXA_OTHER_UART;
339} 340}
341#endif
340 342
341static void process_txrx_fifo(struct mxser_port *info) 343static void process_txrx_fifo(struct mxser_port *info)
342{ 344{
@@ -2380,9 +2382,11 @@ static void mxser_release_res(struct mxser_board *brd, struct pci_dev *pdev,
2380 if (irq) 2382 if (irq)
2381 free_irq(brd->irq, brd); 2383 free_irq(brd->irq, brd);
2382 if (pdev != NULL) { /* PCI */ 2384 if (pdev != NULL) { /* PCI */
2385#ifdef CONFIG_PCI
2383 pci_release_region(pdev, 2); 2386 pci_release_region(pdev, 2);
2384 pci_release_region(pdev, 3); 2387 pci_release_region(pdev, 3);
2385 pci_dev_put(pdev); 2388 pci_dev_put(pdev);
2389#endif
2386 } else { 2390 } else {
2387 release_region(brd->ports[0].ioaddr, 8 * brd->info->nports); 2391 release_region(brd->ports[0].ioaddr, 8 * brd->info->nports);
2388 release_region(brd->vector, 1); 2392 release_region(brd->vector, 1);
@@ -2546,6 +2550,7 @@ static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd)
2546static int __devinit mxser_probe(struct pci_dev *pdev, 2550static int __devinit mxser_probe(struct pci_dev *pdev,
2547 const struct pci_device_id *ent) 2551 const struct pci_device_id *ent)
2548{ 2552{
2553#ifdef CONFIG_PCI
2549 struct mxser_board *brd; 2554 struct mxser_board *brd;
2550 unsigned int i, j; 2555 unsigned int i, j;
2551 unsigned long ioaddress; 2556 unsigned long ioaddress;
@@ -2644,6 +2649,9 @@ err_relio:
2644 brd->info = NULL; 2649 brd->info = NULL;
2645err: 2650err:
2646 return retval; 2651 return retval;
2652#else
2653 return -ENODEV;
2654#endif
2647} 2655}
2648 2656
2649static void __devexit mxser_remove(struct pci_dev *pdev) 2657static void __devexit mxser_remove(struct pci_dev *pdev)