mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-26 23:39:34 +07:00
staging: comedi: ssv_dnp: remove boardinfo
This driver only supports a single "boardtype". Remove the unneeded boardinfo struct and its use in the driver. Change the "driver_name" to match what the boardinfo supplied. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4aef37caf5
commit
b25e09232c
@ -50,15 +50,6 @@ Status: unknown
|
||||
#define PCMR 0xa3 /* Port C Mode Register */
|
||||
#define PCDR 0xa7 /* Port C Data Register */
|
||||
|
||||
/* This data structure holds information about the supported boards -------- */
|
||||
|
||||
struct dnp_board {
|
||||
const char *name;
|
||||
int ai_chans;
|
||||
int ai_bits;
|
||||
int have_dio;
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* The insn_bits interface allows packed reading/writing of DIO channels. */
|
||||
/* The comedi core can convert between insn_bits and insn_read/write, so you */
|
||||
@ -173,11 +164,10 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
|
||||
|
||||
static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
const struct dnp_board *board = comedi_board(dev);
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
|
||||
dev->board_name = board->name;
|
||||
dev->board_name = dev->driver->driver_name;
|
||||
|
||||
ret = comedi_alloc_subdevices(dev, 1);
|
||||
if (ret)
|
||||
@ -219,23 +209,11 @@ static void dnp_detach(struct comedi_device *dev)
|
||||
outb((inb(CSCDR) & 0xAA), CSCDR);
|
||||
}
|
||||
|
||||
static const struct dnp_board dnp_boards[] = {
|
||||
{
|
||||
.name = "dnp-1486",
|
||||
.ai_chans = 16,
|
||||
.ai_bits = 12,
|
||||
.have_dio = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct comedi_driver dnp_driver = {
|
||||
.driver_name = "ssv_dnp",
|
||||
.driver_name = "dnp-1486",
|
||||
.module = THIS_MODULE,
|
||||
.attach = dnp_attach,
|
||||
.detach = dnp_detach,
|
||||
.board_name = &dnp_boards[0].name,
|
||||
.offset = sizeof(struct dnp_board),
|
||||
.num_names = ARRAY_SIZE(dnp_boards),
|
||||
};
|
||||
module_comedi_driver(dnp_driver);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user