aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-08 21:15:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-09 19:29:03 -0400
commit7b2234df5e2ec3fbb206fc4442099faf5859a177 (patch)
treedb9d582cfc1a8d9f3c9e3629c7f14d2ccd8126fa /drivers/staging
parent62d4d5613d8b4c35555ef338ac27c3df1e36e4b4 (diff)
staging: comedi: rti800: cleanup dev->board_name usage
The comedi core initializes the dev->board_name before calling the driver (*attach) function. There is not reason to reinitialize it in the driver. Use the dev->board_name when doing the request_{region,irq}() instead of the open-coded string. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/rti800.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index fdfbf412cc73..eac727e2dae2 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -309,7 +309,7 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
309 struct comedi_subdevice *s; 309 struct comedi_subdevice *s;
310 310
311 iobase = it->options[0]; 311 iobase = it->options[0];
312 if (!request_region(iobase, RTI800_SIZE, "rti800")) 312 if (!request_region(iobase, RTI800_SIZE, dev->board_name))
313 return -EIO; 313 return -EIO;
314 dev->iobase = iobase; 314 dev->iobase = iobase;
315 315
@@ -319,14 +319,13 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
319 319
320 irq = it->options[1]; 320 irq = it->options[1];
321 if (irq) { 321 if (irq) {
322 ret = request_irq(irq, rti800_interrupt, 0, "rti800", dev); 322 ret = request_irq(irq, rti800_interrupt, 0, dev->board_name,
323 dev);
323 if (ret < 0) 324 if (ret < 0)
324 return ret; 325 return ret;
325 dev->irq = irq; 326 dev->irq = irq;
326 } 327 }
327 328
328 dev->board_name = board->name;
329
330 ret = comedi_alloc_subdevices(dev, 4); 329 ret = comedi_alloc_subdevices(dev, 4);
331 if (ret) 330 if (ret)
332 return ret; 331 return ret;