Skip to content

Commit

Permalink
staging: comedi: ssv_dnp: remove boardinfo
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 22, 2012
1 parent 4aef37c commit b25e092
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions drivers/staging/comedi/drivers/ssv_dnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit b25e092

Please sign in to comment.