Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324947
b: refs/heads/master
c: 8407593
h: refs/heads/master
i:
  324945: 04828b9
  324943: 8e37dc4
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 8, 2012
1 parent 1cb960c commit 51414ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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: 2d504528f2b6a067c2d49885bc15345238dbaaba
refs/heads/master: 8407593ac3961d2da7ebc01541a993ed0dc6d029
14 changes: 8 additions & 6 deletions trunk/drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct pci_dev *pci_device = NULL;
int result, i;
struct me4000_board *board;
const struct me4000_board *board;

/* Allocate private memory */
if (alloc_private(dev, sizeof(struct me4000_info)) < 0)
Expand Down Expand Up @@ -254,9 +254,7 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it)
}
}
dev->board_ptr = me4000_boards + i;
board =
(struct me4000_board *)
dev->board_ptr;
board = comedi_board(dev);
info->pci_dev_p = pci_device;
goto found;
}
Expand Down Expand Up @@ -445,6 +443,7 @@ static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p)

static int init_ao_context(struct comedi_device *dev)
{
const struct me4000_board *thisboard = comedi_board(dev);
int i;

for (i = 0; i < thisboard->ao_nchan; i++) {
Expand Down Expand Up @@ -726,7 +725,7 @@ static int me4000_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *subdevice,
struct comedi_insn *insn, unsigned int *data)
{

const struct me4000_board *thisboard = comedi_board(dev);
int chan = CR_CHAN(insn->chanspec);
int rang = CR_RANGE(insn->chanspec);
int aref = CR_AREF(insn->chanspec);
Expand Down Expand Up @@ -864,6 +863,7 @@ static int me4000_ai_cancel(struct comedi_device *dev,
static int ai_check_chanlist(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
const struct me4000_board *thisboard = comedi_board(dev);
int aref;
int i;

Expand Down Expand Up @@ -1658,7 +1658,7 @@ static int me4000_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{

const struct me4000_board *thisboard = comedi_board(dev);
int chan = CR_CHAN(insn->chanspec);
int rang = CR_RANGE(insn->chanspec);
int aref = CR_AREF(insn->chanspec);
Expand Down Expand Up @@ -2098,12 +2098,14 @@ static int me4000_cnt_insn_write(struct comedi_device *dev,

static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct me4000_board *thisboard;
struct comedi_subdevice *s;
int result;

result = me4000_probe(dev, it);
if (result)
return result;
thisboard = comedi_board(dev);

result = comedi_alloc_subdevices(dev, 4);
if (result)
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/comedi/drivers/me4000.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ struct me4000_board {
int has_counter;
};

#define thisboard ((const struct me4000_board *)dev->board_ptr)

/*=============================================================================
Global board and subdevice information structures
===========================================================================*/
Expand Down

0 comments on commit 51414ad

Please sign in to comment.