summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-09 16:33:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 12:47:54 -0700
commit3cbc2810a60bc4c96aa583e1ce8699fb5acf8e90 (patch)
tree2feef49e5aff848f50329578423dbe9ae99e58a3 /drivers
parentdba89b14d44d463c33c3f49384475bd1316fe28a (diff)
staging: comedi: s526: use comedi_request_region()
Use comedi_request_region() to request the I/O region used by this driver. Remove the board attach noise 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')
-rw-r--r--drivers/staging/comedi/drivers/s526.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c
index b490b47b0bb8..0fd4ba1939bd 100644
--- a/drivers/staging/comedi/drivers/s526.c
+++ b/drivers/staging/comedi/drivers/s526.c
@@ -552,15 +552,11 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct s526_private *devpriv;
struct comedi_subdevice *s;
- int iobase;
int ret;
- iobase = it->options[0];
- if (!iobase || !request_region(iobase, S526_IOSIZE, dev->board_name)) {
- comedi_error(dev, "I/O port conflict");
- return -EIO;
- }
- dev->iobase = iobase;
+ ret = comedi_request_region(dev, it->options[0], S526_IOSIZE);
+ if (ret)
+ return ret;
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
@@ -614,8 +610,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_bits = s526_dio_insn_bits;
s->insn_config = s526_dio_insn_config;
- dev_info(dev->class_dev, "%s attached\n", dev->board_name);
-
return 1;
}