diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-23 19:57:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-13 21:32:30 (GMT) |
commit | 70d52bce5523f2c6a7bf3f9a54dacc0be112a3e8 (patch) | |
tree | 8d25965296fb1b99c645ce4ca85ad56681a12f5d | |
parent | 63d6ba20bab01ea1a92b3fe7718416a8527e009a (diff) | |
download | linux-70d52bce5523f2c6a7bf3f9a54dacc0be112a3e8.tar.xz |
staging: comedi: ni_labpc: remove range_labpc_1200_ai export
The 'ai_range_table' boardinfo is only used to initialize the
analog input subdevice s->range_table. We can use the 'is_labpc1200'
flag in the boardinfo to determine which range table is needed.
This allows making range_labpc_1200_ai static and removing the
export as well as removing the 'ai_range_table' from the boardinfo.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.c | 9 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.h | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc_cs.c | 1 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc_pci.c | 1 |
4 files changed, 3 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index da10a76..5ed9a6f 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -185,7 +185,7 @@ const int labpc_1200_ai_gain_bits[] = { }; EXPORT_SYMBOL_GPL(labpc_1200_ai_gain_bits); -const struct comedi_lrange range_labpc_1200_ai = { +static const struct comedi_lrange range_labpc_1200_ai = { 14, { BIP_RANGE(5), BIP_RANGE(2.5), @@ -203,7 +203,6 @@ const struct comedi_lrange range_labpc_1200_ai = { UNI_RANGE(0.1) } }; -EXPORT_SYMBOL_GPL(range_labpc_1200_ai); static const struct comedi_lrange range_labpc_ao = { 2, { @@ -238,7 +237,6 @@ static inline void labpc_writeb(unsigned int byte, unsigned long address) static const struct labpc_boardinfo labpc_boards[] = { { .name = "lab-pc-1200", - .ai_range_table = &range_labpc_1200_ai, .ai_range_code = labpc_1200_ai_gain_bits, .ai_speed = 10000, .ai_scan_up = 1, @@ -246,14 +244,12 @@ static const struct labpc_boardinfo labpc_boards[] = { .is_labpc1200 = 1, }, { .name = "lab-pc-1200ai", - .ai_range_table = &range_labpc_1200_ai, .ai_range_code = labpc_1200_ai_gain_bits, .ai_speed = 10000, .ai_scan_up = 1, .is_labpc1200 = 1, }, { .name = "lab-pc+", - .ai_range_table = &range_labpc_plus_ai, .ai_range_code = labpc_plus_ai_gain_bits, .ai_speed = 12000, .has_ao = 1, @@ -1625,7 +1621,8 @@ int labpc_common_attach(struct comedi_device *dev, s->n_chan = 8; s->len_chanlist = 8; s->maxdata = 0x0fff; - s->range_table = board->ai_range_table; + s->range_table = board->is_labpc1200 + ? &range_labpc_1200_ai : &range_labpc_plus_ai; s->insn_read = labpc_ai_insn_read; if (dev->irq) { dev->read_subdev = s; diff --git a/drivers/staging/comedi/drivers/ni_labpc.h b/drivers/staging/comedi/drivers/ni_labpc.h index f4381815..a309aa0 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.h +++ b/drivers/staging/comedi/drivers/ni_labpc.h @@ -33,7 +33,6 @@ enum transfer_type { fifo_not_empty_transfer, fifo_half_full_transfer, struct labpc_boardinfo { const char *name; - const struct comedi_lrange *ai_range_table; const int *ai_range_code; int ai_speed; /* maximum input speed in ns */ unsigned ai_scan_up:1; /* can auto scan up in ai channels */ @@ -95,6 +94,5 @@ int labpc_common_attach(struct comedi_device *dev, void labpc_common_detach(struct comedi_device *dev); extern const int labpc_1200_ai_gain_bits[]; -extern const struct comedi_lrange range_labpc_1200_ai; #endif /* _NI_LABPC_H */ diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 2c1ea01..9bbdee5 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -76,7 +76,6 @@ NI manuals: static const struct labpc_boardinfo labpc_cs_boards[] = { { .name = "daqcard-1200", - .ai_range_table = &range_labpc_1200_ai, .ai_range_code = labpc_1200_ai_gain_bits, .ai_speed = 10000, .has_ao = 1, diff --git a/drivers/staging/comedi/drivers/ni_labpc_pci.c b/drivers/staging/comedi/drivers/ni_labpc_pci.c index b993b69..4b472db 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_pci.c +++ b/drivers/staging/comedi/drivers/ni_labpc_pci.c @@ -49,7 +49,6 @@ enum labpc_pci_boardid { static const struct labpc_boardinfo labpc_pci_boards[] = { [BOARD_NI_PCI1200] = { .name = "ni_pci-1200", - .ai_range_table = &range_labpc_1200_ai, .ai_range_code = labpc_1200_ai_gain_bits, .ai_speed = 10000, .ai_scan_up = 1, |