Skip to content

Commit

Permalink
staging: comedi: me4000: absorb init_board_info() into its caller
Browse files Browse the repository at this point in the history
The init_board_info() function only gets the irq number from the
pci_dev. Just move the code into the function that calls it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 8, 2012
1 parent 109daa7 commit b3ca977
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ static const struct me4000_board me4000_boards[] = {
/*-----------------------------------------------------------------------------
Meilhaus function prototypes
---------------------------------------------------------------------------*/
static int init_board_info(struct comedi_device *dev,
struct pci_dev *pci_dev_p);
static int xilinx_download(struct comedi_device *dev);
static int reset_board(struct comedi_device *dev);

Expand Down Expand Up @@ -310,9 +308,7 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it)
if (!info->program_regbase)
return -ENODEV;

result = init_board_info(dev, pci_device);
if (result)
return result;
dev->irq = pci_device->irq;

result = xilinx_download(dev);
if (result)
Expand All @@ -325,18 +321,6 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it)
return 0;
}

static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p)
{
/* Init spin locks */
/* spin_lock_init(&info->preload_lock); */
/* spin_lock_init(&info->ai_ctrl_lock); */

/* Get the irq assigned to the board */
dev->irq = pci_dev_p->irq;

return 0;
}

#define FIRMWARE_NOT_AVAILABLE 1
#if FIRMWARE_NOT_AVAILABLE
extern unsigned char *xilinx_firm;
Expand Down

0 comments on commit b3ca977

Please sign in to comment.