Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267380
b: refs/heads/master
c: d6aa836
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 5599f7e commit e283640
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13a9e03c0c209b59f07b72c5388845a5f55eda2a
refs/heads/master: d6aa8366dde1656f859b6ebf5face1718793a467
20 changes: 11 additions & 9 deletions trunk/drivers/staging/comedi/drivers/ni_labpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ static int labpc_eeprom_write_insn(struct comedi_device *dev,
struct comedi_insn *insn,
unsigned int *data);
static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd);
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_ISA_DMA_API
static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd);
#endif
#ifdef CONFIG_COMEDI_PCI_DRIVERS
static int labpc_find_device(struct comedi_device *dev, int bus, int slot);
#endif
static int labpc_dio_mem_callback(int dir, int port, int data,
Expand Down Expand Up @@ -459,7 +461,7 @@ static const struct labpc_board_struct labpc_boards[] = {
.ai_scan_up = 0,
.memory_mapped_io = 0,
},
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
{
.name = "pci-1200",
.device_id = 0x161,
Expand Down Expand Up @@ -503,14 +505,14 @@ static struct comedi_driver driver_labpc = {
.offset = sizeof(struct labpc_board_struct),
};

#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
static DEFINE_PCI_DEVICE_TABLE(labpc_pci_table) = {
{PCI_DEVICE(PCI_VENDOR_ID_NI, 0x161)},
{0}
};

MODULE_DEVICE_TABLE(pci, labpc_pci_table);
#endif /* CONFIG_COMEDI_PCI */
#endif /* CONFIG_COMEDI_PCI_DRIVERS */

static inline int labpc_counter_load(struct comedi_device *dev,
unsigned long base_address,
Expand Down Expand Up @@ -720,7 +722,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase = 0;
unsigned int irq = 0;
unsigned int dma_chan = 0;
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
int retval;
#endif

Expand All @@ -742,7 +744,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
#endif
break;
case pci_bustype:
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
retval = labpc_find_device(dev, it->options[0], it->options[1]);
if (retval < 0)
return retval;
Expand Down Expand Up @@ -772,7 +774,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
}

/* adapted from ni_pcimio for finding mite based boards (pc-1200) */
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
static int labpc_find_device(struct comedi_device *dev, int bus, int slot)
{
struct mite_struct *mite;
Expand Down Expand Up @@ -820,7 +822,7 @@ int labpc_common_detach(struct comedi_device *dev)
free_irq(dev->irq, dev);
if (thisboard->bustype == isa_bustype && dev->iobase)
release_region(dev->iobase, LABPC_SIZE);
#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
if (devpriv->mite)
mite_unsetup(devpriv->mite);
#endif
Expand Down Expand Up @@ -2135,7 +2137,7 @@ static void write_caldac(struct comedi_device *dev, unsigned int channel,
devpriv->write_byte(devpriv->command5_bits, dev->iobase + COMMAND5_REG);
}

#ifdef CONFIG_COMEDI_PCI
#ifdef CONFIG_COMEDI_PCI_DRIVERS
static int __devinit driver_labpc_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
Expand Down

0 comments on commit e283640

Please sign in to comment.