Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fb0c9295b81f5c7f51058aabfadd13d8e70b48f4
Commit:     fb0c9295b81f5c7f51058aabfadd13d8e70b48f4
Parent:     a3808ac156f503dd2a00a059d9ff4677ce75244f
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:34:19 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:49 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/Kconfig     |    2 +-
 drivers/char/mxser_new.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 91133be..b1c07ed 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -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.
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index efa8076..cd989dc 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;
 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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to