aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-09 19:25:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 15:47:51 -0400
commitb1bc9276047d0b410dc0676edc12ce3c31e96a36 (patch)
treed99ee7d8d866fd9bcd5923cafef12f0931c91557 /drivers/staging
parent3671cae1d8fd4bc7fa7d85ec35f2d2149652c7ad (diff)
staging: comedi: ni_atmio: use comedi_request_region()
Use comedi_request_region() to request the I/O region used by this driver. Remove the noise when the board is first attached as well as the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/ni_atmio.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index 37372a1f9ed9..02e5ae1b4be9 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -437,15 +437,9 @@ static int ni_atmio_attach(struct comedi_device *dev,
437 devpriv->isapnp_dev = isapnp_dev; 437 devpriv->isapnp_dev = isapnp_dev;
438 } 438 }
439 439
440 /* reserve our I/O region */ 440 ret = comedi_request_region(dev, iobase, NI_SIZE);
441 441 if (ret)
442 printk("comedi%d: ni_atmio: 0x%04lx", dev->minor, iobase); 442 return ret;
443 if (!request_region(iobase, NI_SIZE, "ni_atmio")) {
444 printk(" I/O port conflict\n");
445 return -EIO;
446 }
447
448 dev->iobase = iobase;
449 443
450#ifdef DEBUG 444#ifdef DEBUG
451 /* board existence sanity check */ 445 /* board existence sanity check */