diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/amplc_pc236.c')
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pc236.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c index 31734e1142fd..b21d7b48f1da 100644 --- a/drivers/staging/comedi/drivers/amplc_pc236.c +++ b/drivers/staging/comedi/drivers/amplc_pc236.c @@ -368,32 +368,6 @@ static irqreturn_t pc236_interrupt(int irq, void *d) return IRQ_RETVAL(handled); } -static void pc236_report_attach(struct comedi_device *dev, unsigned int irq) -{ - const struct pc236_board *thisboard = comedi_board(dev); - struct pci_dev *pcidev = comedi_to_pci_dev(dev); - char tmpbuf[60]; - int tmplen; - - if (is_isa_board(thisboard)) - tmplen = scnprintf(tmpbuf, sizeof(tmpbuf), - "(base %#lx) ", dev->iobase); - else if (is_pci_board(thisboard)) - tmplen = scnprintf(tmpbuf, sizeof(tmpbuf), - "(pci %s) ", pci_name(pcidev)); - else - tmplen = 0; - if (irq) - tmplen += scnprintf(&tmpbuf[tmplen], sizeof(tmpbuf) - tmplen, - "(irq %u%s) ", irq, - (dev->irq ? "" : " UNAVAILABLE")); - else - tmplen += scnprintf(&tmpbuf[tmplen], sizeof(tmpbuf) - tmplen, - "(no irq) "); - dev_info(dev->class_dev, "%s %sattached\n", - dev->board_name, tmpbuf); -} - static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase, unsigned int irq, unsigned long req_irq_flags) { @@ -411,10 +385,9 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase, s = &dev->subdevices[0]; /* digital i/o subdevice (8255) */ ret = subdev_8255_init(dev, s, NULL, iobase); - if (ret < 0) { - dev_err(dev->class_dev, "error! out of memory!\n"); + if (ret) return ret; - } + s = &dev->subdevices[1]; dev->read_subdev = s; s->type = COMEDI_SUBD_UNUSED; @@ -434,8 +407,8 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase, s->cancel = pc236_intr_cancel; } } - pc236_report_attach(dev, irq); - return 1; + + return 0; } static int pc236_pci_common_attach(struct comedi_device *dev, |