[PATCH 03/10] staging: comedi: acl7225b: cleanup dev->board_name usage

H Hartley Sweeten hsweeten at visionengravers.com
Mon Apr 8 21:29:47 UTC 2013


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_resource() instead
of the open-coded string.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/acl7225b.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c
index 284232f..8d9e1ae 100644
--- a/drivers/staging/comedi/drivers/acl7225b.c
+++ b/drivers/staging/comedi/drivers/acl7225b.c
@@ -74,9 +74,8 @@ static int acl7225b_attach(struct comedi_device *dev,
 
 	iobase = it->options[0];
 	iorange = board->io_range;
-	if (!request_region(iobase, iorange, "acl7225b"))
+	if (!request_region(iobase, iorange, dev->board_name))
 		return -EIO;
-	dev->board_name = board->name;
 	dev->iobase = iobase;
 	dev->irq = 0;
 
-- 
1.8.1.4




More information about the devel mailing list