From b25e09232ca22b9dcebe51078011d18b3aea7c3a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 8 Oct 2012 10:42:34 -0700 Subject: [PATCH] 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ssv_dnp.c | 26 ++---------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c index ae3aa1c5caef..afa4016f906a 100644 --- a/drivers/staging/comedi/drivers/ssv_dnp.c +++ b/drivers/staging/comedi/drivers/ssv_dnp.c @@ -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); -- 2.20.1