From: H Hartley Sweeten Date: Tue, 9 Apr 2013 23:15:14 +0000 (-0700) Subject: staging: comedi: das08_isa: use comedi_request_region() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ed34add734e33afa33e7bf5ee5826650efdc0fe8;p=linux-beck.git staging: comedi: das08_isa: 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 Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das08_isa.c b/drivers/staging/comedi/drivers/das08_isa.c index f12078247163..a6de825cff12 100644 --- a/drivers/staging/comedi/drivers/das08_isa.c +++ b/drivers/staging/comedi/drivers/das08_isa.c @@ -179,17 +179,18 @@ static int das08_isa_attach(struct comedi_device *dev, { const struct das08_board_struct *thisboard = comedi_board(dev); struct das08_private_struct *devpriv; + int ret; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; dev->private = devpriv; - if (!request_region(it->options[0], thisboard->iosize, - thisboard->name)) - return -EIO; + ret = comedi_request_region(dev, it->options[0], thisboard->iosize); + if (ret) + return ret; - return das08_common_attach(dev, it->options[0]); + return das08_common_attach(dev, dev->iobase); } static void das08_isa_detach(struct comedi_device *dev)