From a1dc16d33cdf5ad19155315e77eb038dd203d0de Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 12 Feb 2000 02:26:20 +0000 Subject: [PATCH] fixed _attach() using local variable for board number --- comedi/drivers/das1600.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/comedi/drivers/das1600.c b/comedi/drivers/das1600.c index 7a92a624..6f8881f9 100644 --- a/comedi/drivers/das1600.c +++ b/comedi/drivers/das1600.c @@ -325,12 +325,17 @@ static int das1600_attach(comedi_device * dev, comedi_devconfig * it) request_region(dev->iobase, DAS1600_BASE_SIZE, "das1600"); request_region(dev->iobase + 0x400, DAS1600_DIO_SIZE, "das1600"); - if (board == card_1601_12) { - dev->board_name = "das1601/12"; - } else if (board == card_1602_12) { - dev->board_name = "das1602/12"; - } else if (board == card_1602_16) { - dev->board_name = "das1602/16"; + switch(dev->board){ + case card_1601_12: + default: + dev->board_name = "das1601/12"; + break; + case card_1602_12: + dev->board_name = "das1601/12"; + break; + case card_1602_16: + dev->board_name = "das1602/16"; + break; } dev->n_subdevices=5; -- 2.26.2