staging: comedi: adv_pci1710: rename boardinfo 'have_irq'
For aesthetics, rename this member of the boardinfo to 'has_irq' and change it to a bit-field flag. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
068de2b65b
commit
0b25aa79cc
@ -191,7 +191,6 @@ enum pci1710_boardid {
|
|||||||
|
|
||||||
struct boardtype {
|
struct boardtype {
|
||||||
const char *name; /* board name */
|
const char *name; /* board name */
|
||||||
char have_irq; /* 1=card support IRQ */
|
|
||||||
char cardtype; /* 0=1710& co. 2=1713, ... */
|
char cardtype; /* 0=1710& co. 2=1713, ... */
|
||||||
int n_aichan; /* num of A/D chans */
|
int n_aichan; /* num of A/D chans */
|
||||||
int n_aichand; /* num of A/D chans in diff mode */
|
int n_aichand; /* num of A/D chans in diff mode */
|
||||||
@ -203,6 +202,7 @@ struct boardtype {
|
|||||||
const struct comedi_lrange *rangelist_ao; /* rangelist for D/A */
|
const struct comedi_lrange *rangelist_ao; /* rangelist for D/A */
|
||||||
unsigned int ai_ns_min; /* max sample speed of card v ns */
|
unsigned int ai_ns_min; /* max sample speed of card v ns */
|
||||||
unsigned int fifo_half_size; /* size of FIFO/2 */
|
unsigned int fifo_half_size; /* size of FIFO/2 */
|
||||||
|
unsigned int has_irq:1;
|
||||||
unsigned int has_di_do:1;
|
unsigned int has_di_do:1;
|
||||||
unsigned int has_counter:1;
|
unsigned int has_counter:1;
|
||||||
};
|
};
|
||||||
@ -210,7 +210,6 @@ struct boardtype {
|
|||||||
static const struct boardtype boardtypes[] = {
|
static const struct boardtype boardtypes[] = {
|
||||||
[BOARD_PCI1710] = {
|
[BOARD_PCI1710] = {
|
||||||
.name = "pci1710",
|
.name = "pci1710",
|
||||||
.have_irq = 1,
|
|
||||||
.cardtype = TYPE_PCI171X,
|
.cardtype = TYPE_PCI171X,
|
||||||
.n_aichan = 16,
|
.n_aichan = 16,
|
||||||
.n_aichand = 8,
|
.n_aichand = 8,
|
||||||
@ -222,12 +221,12 @@ static const struct boardtype boardtypes[] = {
|
|||||||
.rangelist_ao = &range_pci171x_da,
|
.rangelist_ao = &range_pci171x_da,
|
||||||
.ai_ns_min = 10000,
|
.ai_ns_min = 10000,
|
||||||
.fifo_half_size = 2048,
|
.fifo_half_size = 2048,
|
||||||
|
.has_irq = 1,
|
||||||
.has_di_do = 1,
|
.has_di_do = 1,
|
||||||
.has_counter = 1,
|
.has_counter = 1,
|
||||||
},
|
},
|
||||||
[BOARD_PCI1710HG] = {
|
[BOARD_PCI1710HG] = {
|
||||||
.name = "pci1710hg",
|
.name = "pci1710hg",
|
||||||
.have_irq = 1,
|
|
||||||
.cardtype = TYPE_PCI171X,
|
.cardtype = TYPE_PCI171X,
|
||||||
.n_aichan = 16,
|
.n_aichan = 16,
|
||||||
.n_aichand = 8,
|
.n_aichand = 8,
|
||||||
@ -239,12 +238,12 @@ static const struct boardtype boardtypes[] = {
|
|||||||
.rangelist_ao = &range_pci171x_da,
|
.rangelist_ao = &range_pci171x_da,
|
||||||
.ai_ns_min = 10000,
|
.ai_ns_min = 10000,
|
||||||
.fifo_half_size = 2048,
|
.fifo_half_size = 2048,
|
||||||
|
.has_irq = 1,
|
||||||
.has_di_do = 1,
|
.has_di_do = 1,
|
||||||
.has_counter = 1,
|
.has_counter = 1,
|
||||||
},
|
},
|
||||||
[BOARD_PCI1711] = {
|
[BOARD_PCI1711] = {
|
||||||
.name = "pci1711",
|
.name = "pci1711",
|
||||||
.have_irq = 1,
|
|
||||||
.cardtype = TYPE_PCI171X,
|
.cardtype = TYPE_PCI171X,
|
||||||
.n_aichan = 16,
|
.n_aichan = 16,
|
||||||
.n_aochan = 2,
|
.n_aochan = 2,
|
||||||
@ -255,12 +254,12 @@ static const struct boardtype boardtypes[] = {
|
|||||||
.rangelist_ao = &range_pci171x_da,
|
.rangelist_ao = &range_pci171x_da,
|
||||||
.ai_ns_min = 10000,
|
.ai_ns_min = 10000,
|
||||||
.fifo_half_size = 512,
|
.fifo_half_size = 512,
|
||||||
|
.has_irq = 1,
|
||||||
.has_di_do = 1,
|
.has_di_do = 1,
|
||||||
.has_counter = 1,
|
.has_counter = 1,
|
||||||
},
|
},
|
||||||
[BOARD_PCI1713] = {
|
[BOARD_PCI1713] = {
|
||||||
.name = "pci1713",
|
.name = "pci1713",
|
||||||
.have_irq = 1,
|
|
||||||
.cardtype = TYPE_PCI1713,
|
.cardtype = TYPE_PCI1713,
|
||||||
.n_aichan = 32,
|
.n_aichan = 32,
|
||||||
.n_aichand = 16,
|
.n_aichand = 16,
|
||||||
@ -269,6 +268,7 @@ static const struct boardtype boardtypes[] = {
|
|||||||
.rangecode_ai = range_codes_pci1710_3,
|
.rangecode_ai = range_codes_pci1710_3,
|
||||||
.ai_ns_min = 10000,
|
.ai_ns_min = 10000,
|
||||||
.fifo_half_size = 2048,
|
.fifo_half_size = 2048,
|
||||||
|
.has_irq = 1,
|
||||||
},
|
},
|
||||||
[BOARD_PCI1720] = {
|
[BOARD_PCI1720] = {
|
||||||
.name = "pci1720",
|
.name = "pci1720",
|
||||||
@ -279,7 +279,6 @@ static const struct boardtype boardtypes[] = {
|
|||||||
},
|
},
|
||||||
[BOARD_PCI1731] = {
|
[BOARD_PCI1731] = {
|
||||||
.name = "pci1731",
|
.name = "pci1731",
|
||||||
.have_irq = 1,
|
|
||||||
.cardtype = TYPE_PCI171X,
|
.cardtype = TYPE_PCI171X,
|
||||||
.n_aichan = 16,
|
.n_aichan = 16,
|
||||||
.ai_maxdata = 0x0fff,
|
.ai_maxdata = 0x0fff,
|
||||||
@ -287,6 +286,7 @@ static const struct boardtype boardtypes[] = {
|
|||||||
.rangecode_ai = range_codes_pci17x1,
|
.rangecode_ai = range_codes_pci17x1,
|
||||||
.ai_ns_min = 10000,
|
.ai_ns_min = 10000,
|
||||||
.fifo_half_size = 512,
|
.fifo_half_size = 512,
|
||||||
|
.has_irq = 1,
|
||||||
.has_di_do = 1,
|
.has_di_do = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -1124,7 +1124,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
|
|||||||
|
|
||||||
pci1710_reset(dev);
|
pci1710_reset(dev);
|
||||||
|
|
||||||
if (this_board->have_irq && pcidev->irq) {
|
if (this_board->has_irq && pcidev->irq) {
|
||||||
ret = request_irq(pcidev->irq, interrupt_service_pci1710,
|
ret = request_irq(pcidev->irq, interrupt_service_pci1710,
|
||||||
IRQF_SHARED, dev->board_name, dev);
|
IRQF_SHARED, dev->board_name, dev);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user