From f3eb237002f9ecd1ccfd7deaf9111c7000c5c7b0 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 14 Aug 2012 16:31:28 +0100 Subject: [PATCH] --- yaml --- r: 324524 b: refs/heads/master c: 858c8ada41c5ff9700f23c6b41adb9586f2983b8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/comedi/drivers/amplc_dio200.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 4b5db4c311db..3d1b10358c7b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b7518888afc14e3d1e988837fef4471cd2b3c820 +refs/heads/master: 858c8ada41c5ff9700f23c6b41adb9586f2983b8 diff --git a/trunk/drivers/staging/comedi/drivers/amplc_dio200.c b/trunk/drivers/staging/comedi/drivers/amplc_dio200.c index 7a61831132be..f31d79893457 100644 --- a/trunk/drivers/staging/comedi/drivers/amplc_dio200.c +++ b/trunk/drivers/staging/comedi/drivers/amplc_dio200.c @@ -294,6 +294,9 @@ struct dio200_board { enum dio200_layout layout; }; +#define IS_ISA_BOARD(board) (DO_ISA && (board)->bustype == isa_bustype) +#define IS_PCI_BOARD(board) (DO_PCI && (board)->bustype == pci_bustype) + static const struct dio200_board dio200_boards[] = { #if DO_ISA { @@ -1231,10 +1234,10 @@ static void dio200_report_attach(struct comedi_device *dev, unsigned int irq) char tmpbuf[60]; int tmplen; - if (DO_ISA && thisboard->bustype == isa_bustype) + if (IS_ISA_BOARD(thisboard)) tmplen = scnprintf(tmpbuf, sizeof(tmpbuf), "(base %#lx) ", dev->iobase); - else if (DO_PCI && thisboard->bustype == pci_bustype) + else if (IS_PCI_BOARD(thisboard)) tmplen = scnprintf(tmpbuf, sizeof(tmpbuf), "(pci %s) ", pci_name(pcidev)); else @@ -1362,7 +1365,7 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) } /* Process options and reserve resources according to bus type. */ - if (DO_ISA && thisboard->bustype == isa_bustype) { + if (IS_ISA_BOARD(thisboard)) { unsigned long iobase; unsigned int irq; @@ -1372,7 +1375,7 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (ret < 0) return ret; return dio200_common_attach(dev, iobase, irq, 0); - } else if (DO_PCI && thisboard->bustype == pci_bustype) { + } else if (IS_PCI_BOARD(thisboard)) { struct pci_dev *pci_dev; pci_dev = dio200_find_pci_dev(dev, it);