From 57d21e283f15b067b77a999dac98c8871e7e7e55 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 10 Apr 2013 10:04:32 -0700 Subject: [PATCH] staging: comedi: acl7225b: use comedi_request_region() Use comedi_request_region() to request the I/O region used by this driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/acl7225b.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c index 0c98139c6d22..69d9fd71081c 100644 --- a/drivers/staging/comedi/drivers/acl7225b.c +++ b/drivers/staging/comedi/drivers/acl7225b.c @@ -77,13 +77,11 @@ static int acl7225b_attach(struct comedi_device *dev, { const struct acl7225b_boardinfo *board = comedi_board(dev); struct comedi_subdevice *s; - int iobase; int ret; - iobase = it->options[0]; - if (!request_region(iobase, board->io_range, dev->board_name)) - return -EIO; - dev->iobase = iobase; + ret = comedi_request_region(dev, it->options[0], board->io_range); + if (ret) + return ret; ret = comedi_alloc_subdevices(dev, 3); if (ret) -- 2.34.1