Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363697
b: refs/heads/master
c: d72da60
h: refs/heads/master
i:
  363695: acb1283
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent a5eb844 commit 7f485fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: f65d971dfb3cb85ef4534a9e4a45a170da5970d9
refs/heads/master: d72da604afe9db30b1150a51734df3c25c15ed54
15 changes: 10 additions & 5 deletions trunk/drivers/staging/comedi/drivers/ni_labpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,6 @@ static const struct labpc_boardinfo labpc_boards[] = {
#endif
};

/*
* Useful for shorthand access to the particular board structure
*/
#define thisboard ((struct labpc_boardinfo *)dev->board_ptr)

/* size in bytes of dma buffer */
static const int dma_buffer_size = 0xff00;
/* 2 bytes per sample */
Expand All @@ -494,6 +489,8 @@ static inline int labpc_counter_load(struct comedi_device *dev,
unsigned int counter_number,
unsigned int count, unsigned int mode)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);

if (thisboard->memory_mapped_io)
return i8254_mm_load((void __iomem *)base_address, 0,
counter_number, count, mode);
Expand All @@ -504,6 +501,7 @@ static inline int labpc_counter_load(struct comedi_device *dev,
int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
unsigned int irq, unsigned int dma_chan)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s;
int i;
Expand Down Expand Up @@ -733,6 +731,7 @@ static int labpc_auto_attach(struct comedi_device *dev,

static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv;
unsigned long iobase = 0;
unsigned int irq = 0;
Expand Down Expand Up @@ -780,6 +779,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)

void labpc_common_detach(struct comedi_device *dev)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s;

Expand Down Expand Up @@ -995,6 +995,7 @@ static void labpc_set_ai_scan_period(struct comedi_cmd *cmd,
static int labpc_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
int err = 0;
int tmp, tmp2;
unsigned int stop_mask;
Expand Down Expand Up @@ -1092,6 +1093,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,

static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int channel, range, aref;
#ifdef CONFIG_ISA_DMA_API
Expand Down Expand Up @@ -1362,6 +1364,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
static irqreturn_t labpc_interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async;
Expand Down Expand Up @@ -1569,6 +1572,7 @@ static void labpc_drain_dregs(struct comedi_device *dev)
static int labpc_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int i, n;
int chan, range;
Expand Down Expand Up @@ -1659,6 +1663,7 @@ static int labpc_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int channel, range;
unsigned long flags;
Expand Down

0 comments on commit 7f485fe

Please sign in to comment.