summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-08-23 13:45:10 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-26 13:41:56 (GMT)
commit7322b320d6376c5f5e3a8ec5a59eb117f81e9f69 (patch)
treefb581e3ad04c8417a7ab6c55d0cdda75e6c87c76
parenta55de0f4931028622e2f6059007454758403f7c0 (diff)
downloadlinux-fsl-qoriq-7322b320d6376c5f5e3a8ec5a59eb117f81e9f69.tar.xz
staging: comedi: comedi_bond: use correct minor device numbers in name
The board name for "comedi_bond" is constructed from a space-separated list of items of the form "minor:subdevice" where "minor" is a minor device number and "subdevice" is a subdevice number. Currently, all the "minor" device numbers are for the "comedi_bond" device itself and the "subdevice" numbers are for the bonded devices. It makes makes more sense for the "minor" device numbers to come from the bonded devices as well so that the string is a list of bonded "minor:subdevice" pairs. Fix it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/comedi_bond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
index ccac7b9..51a59e5 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -263,8 +263,8 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
char buf[20];
int left =
MAX_BOARD_NAME - strlen(devpriv->name) - 1;
- snprintf(buf, sizeof(buf), "%d:%d ", dev->minor,
- bdev->subdev);
+ snprintf(buf, sizeof(buf), "%d:%d ",
+ bdev->minor, bdev->subdev);
buf[sizeof(buf) - 1] = 0;
strncat(devpriv->name, buf, left);
}