Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337523
b: refs/heads/master
c: e6fee79
h: refs/heads/master
i:
  337521: a2f48da
  337519: 6e43883
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 1, 2012
1 parent 1caf183 commit a0906f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 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: 7954006f0d5feb391efe3cc1b836b57fa9908ecf
refs/heads/master: e6fee79e0dcb4dd0c22cde52dfea633b46e6e5df
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/****************************************************************************/

Expand Down Expand Up @@ -382,16 +381,14 @@ 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;

if (!amcc)
return -1;
for (i = 0; i < 5; i++)
io_addr[i] = amcc->io_addr[i];
*irq = amcc->irq;
return 0;
}

Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/staging/comedi/drivers/addi-data/addi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit a0906f7

Please sign in to comment.