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>
This commit is contained in:
H Hartley Sweeten 2013-04-23 12:57:58 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель 63d6ba20ba
Коммит 70d52bce55
4 изменённых файлов: 3 добавлений и 10 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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,

Просмотреть файл

@ -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,