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).
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
config SX
tristate "Specialix SX (and SI) card support"
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.
help
This is a driver for the SX and SI multiport serial cards.
Please read the file <file:Documentation/sx.txt> for details.
/* It is safe/allowed to del_timer a non-active timer */
del_timer(&board->timer);
if (pdev) {
/* It is safe/allowed to del_timer a non-active timer */
del_timer(&board->timer);
if (pdev) {
pci_iounmap(pdev, board->base);
pci_release_region(pdev, IS_CF_BOARD(board) ? 3 : 2);
pci_iounmap(pdev, board->base);
pci_release_region(pdev, IS_CF_BOARD(board) ? 3 : 2);
} else {
iounmap(board->base);
release_region(board->hw_base, board->hw_len);
} else {
iounmap(board->base);
release_region(board->hw_base, board->hw_len);
/********************************************************
* Setting bit 17 in the CNTRL register of the PLX 9050 *
* chip forces a retry on writes while a read is pending.*
/********************************************************
* Setting bit 17 in the CNTRL register of the PLX 9050 *
* chip forces a retry on writes while a read is pending.*
static int __devinit sx_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
static int __devinit sx_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct sx_board *board;
unsigned int i, reg;
int retval = -EIO;
struct sx_board *board;
unsigned int i, reg;
int retval = -EIO;
board->flags &= ~SX_BOARD_PRESENT;
err:
return retval;
board->flags &= ~SX_BOARD_PRESENT;
err:
return retval;
+#else
+ return -ENODEV;
+#endif
}
static void __devexit sx_pci_remove(struct pci_dev *pdev)
}
static void __devexit sx_pci_remove(struct pci_dev *pdev)