Commit e6fee79e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi-data: remove irq parameter from i_pci_card_data()

The irq parameter passed to i_pci_card_data() is used to get the pci_dev
irq that is cached in the card data. This information can easily be found
when needed in i_ADDI_Attach() from the 'card' pointer to the card data.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7954006f
......@@ -231,8 +231,7 @@ struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id,
int pci_card_alloc(struct pcilst_struct *amcc, int master);
int i_pci_card_free(struct pcilst_struct *amcc);
int i_pci_card_data(struct pcilst_struct *amcc,
resource_size_t *io_addr,
unsigned int *irq);
resource_size_t *io_addr);
/****************************************************************************/
......@@ -382,8 +381,7 @@ int i_pci_card_free(struct pcilst_struct *amcc)
/****************************************************************************/
/* return all card information for driver */
int i_pci_card_data(struct pcilst_struct *amcc,
resource_size_t *io_addr,
unsigned int *irq)
resource_size_t *io_addr)
{
int i;
......@@ -391,7 +389,6 @@ int i_pci_card_data(struct pcilst_struct *amcc,
return -1;
for (i = 0; i < 5; i++)
io_addr[i] = amcc->io_addr[i];
*irq = amcc->irq;
return 0;
}
......
......@@ -92,7 +92,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
int ret, pages, i, n_subdevices;
unsigned int dw_Dummy;
resource_size_t io_addr[5];
unsigned int irq;
resource_size_t iobase_a, iobase_main, iobase_addon, iobase_reserved;
struct pcilst_struct *card = NULL;
int i_Dma = 0;
......@@ -121,7 +120,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->allocated = 1;
if ((i_pci_card_data(card, &io_addr[0], &irq)) < 0) {
if ((i_pci_card_data(card, &io_addr[0])) < 0) {
i_pci_card_free(card);
return -EIO;
}
......@@ -176,15 +175,13 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* ## */
if (irq > 0) {
if (request_irq(irq, v_ADDI_Interrupt, IRQF_SHARED,
this_board->pc_DriverName, dev) < 0) {
irq = 0; /* Can't use IRQ */
}
if (card->irq > 0) {
ret = request_irq(card->irq, v_ADDI_Interrupt, IRQF_SHARED,
this_board->pc_DriverName, dev);
if (ret == 0)
dev->irq = card->irq;
}
dev->irq = irq;
/* Read eepeom and fill addi_board Structure */
if (this_board->i_PCIEeprom) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment