aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-09 19:07:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 15:47:35 -0400
commitf70c2b6d08d2b959597bdeb22577d51396794ad0 (patch)
treec7ff238dc4fe5adea600968475c8c8769a54ef07 /drivers/staging
parent531f4fd1fbd169b6a22efe829663e8a278b88766 (diff)
staging: comedi: pcl724: cleanup dev->board_name usage
This legacy driver does no additional probing so the dev->board_name will already be properly initialized by the comedi core before calling the (*attach) function. Remove the unnecessary initialization of dev->board_name and use it when requesting the resources instead of the open-coded strings. 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/staging')
-rw-r--r--drivers/staging/comedi/drivers/pcl724.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c
index 7b3c4293c01b..a8112e3af98f 100644
--- a/drivers/staging/comedi/drivers/pcl724.c
+++ b/drivers/staging/comedi/drivers/pcl724.c
@@ -114,15 +114,13 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
114 iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */ 114 iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */
115 printk(KERN_INFO "comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor, 115 printk(KERN_INFO "comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor,
116 board->name, iobase); 116 board->name, iobase);
117 if (!request_region(iobase, iorange, "pcl724")) { 117 if (!request_region(iobase, iorange, dev->board_name)) {
118 printk("I/O port conflict\n"); 118 printk("I/O port conflict\n");
119 return -EIO; 119 return -EIO;
120 } 120 }
121 121
122 dev->iobase = iobase; 122 dev->iobase = iobase;
123 123
124 dev->board_name = board->name;
125
126#ifdef PCL724_IRQ 124#ifdef PCL724_IRQ
127 irq = 0; 125 irq = 0;
128 if (board->IRQbits != 0) { /* board support IRQ */ 126 if (board->IRQbits != 0) { /* board support IRQ */
@@ -134,8 +132,8 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
134 "DISABLING IT", irq); 132 "DISABLING IT", irq);
135 irq = 0; /* Bad IRQ */ 133 irq = 0; /* Bad IRQ */
136 } else { 134 } else {
137 if (request_irq 135 if (request_irq(irq, interrupt_pcl724, 0,
138 (irq, interrupt_pcl724, 0, "pcl724", dev)) { 136 dev->board_name, dev)) {
139 printk(KERN_WARNING 137 printk(KERN_WARNING
140 ", unable to allocate IRQ %u, " 138 ", unable to allocate IRQ %u, "
141 "DISABLING IT", irq); 139 "DISABLING IT", irq);