summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/comedi_bond.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-08-20 12:52:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 11:27:25 -0700
commit90db97d5d9ce05c12f6cd2565b696a53a245e0ca (patch)
tree13f94e6e3979684121cc63d3a0b623d48f8ab51b /drivers/staging/comedi/drivers/comedi_bond.c
parentf2c8042276338f1f40ccb9e5bef77887cdb626f4 (diff)
staging: comedi: comedi_bond: remove boardinfo
The only field in the boardinfo for this driver is a pointer to the board 'name'. This field is used by the comedi core to match against the driver when doing a legacy attach. If a driver does not have any boardinfo, the comedi core matches against the driver name. Since the boardinfo name and driver name are identical we can simplify this driver a bit bu just removing the boardinfo completely. 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/comedi_bond.c')
-rw-r--r--drivers/staging/comedi/drivers/comedi_bond.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
index 5ed324c4f620..69184397cf6e 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -79,20 +79,6 @@ MODULE_PARM_DESC(debug, "If true, print extra cryptic debugging output useful"
#define WARNING(x...) printk(KERN_WARNING MODULE_NAME ": WARNING: "x)
#define ERROR(x...) printk(KERN_ERR MODULE_NAME ": INTERNAL ERROR: "x)
-/*
- * Board descriptions for two imaginary boards. Describing the
- * boards in this way is optional, and completely driver-dependent.
- * Some drivers use arrays such as this, other do not.
- */
-struct BondingBoard {
- const char *name;
-};
-
-/*
- * Useful for shorthand access to the particular board structure
- */
-#define thisboard ((const struct BondingBoard *)dev->board_ptr)
-
struct BondedDevice {
struct comedi_device *dev;
unsigned minor;
@@ -351,10 +337,6 @@ static int bonding_attach(struct comedi_device *dev,
if (!doDevConfig(dev, it))
return -EINVAL;
- /*
- * Initialize dev->board_name. Note that we can use the "thisboard"
- * macro now, since we just initialized it in the last line.
- */
dev->board_name = devpriv->name;
ret = comedi_alloc_subdevices(dev, 1);
@@ -402,20 +384,11 @@ static void bonding_detach(struct comedi_device *dev)
}
}
-static const struct BondingBoard bondingBoards[] = {
- {
- .name = "comedi_bond",
- },
-};
-
static struct comedi_driver bonding_driver = {
.driver_name = "comedi_bond",
.module = THIS_MODULE,
.attach = bonding_attach,
.detach = bonding_detach,
- .board_name = &bondingBoards[0].name,
- .offset = sizeof(struct BondingBoard),
- .num_names = ARRAY_SIZE(bondingBoards),
};
module_comedi_driver(bonding_driver);