diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-04 01:02:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-05 22:33:32 (GMT) |
commit | 00b863964d3d24e7ae1dfb571e45707136c6cf42 (patch) | |
tree | 719a026bd45355f6d3c4d26d094ee5e2963a4cd4 | |
parent | 9e1087b5ae4c31c812e3f8a35256d7922a1cdbd6 (diff) | |
download | linux-fsl-qoriq-00b863964d3d24e7ae1dfb571e45707136c6cf42.tar.xz |
staging: comedi: pcmuio: remove 'CALC_N_SUBDEVS' macro
This macro is only used once in the driver, just remove it.
This also fixes a > 80 char line checkpatch.pl warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/pcmuio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 9d8b780..8ce7e53 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -90,7 +90,6 @@ #define INTR_PORTS_PER_SUBDEV (INTR_CHANS_PER_ASIC/CHANS_PER_PORT) #define MAX_DIO_CHANS (PORTS_PER_ASIC*2*CHANS_PER_PORT) #define MAX_ASICS (MAX_DIO_CHANS/CHANS_PER_ASIC) -#define CALC_N_SUBDEVS(nchans) ((nchans)/MAX_CHANS_PER_SUBDEV + (!!((nchans)%MAX_CHANS_PER_SUBDEV)) /*+ (nchans > INTR_CHANS_PER_ASIC ? 2 : 1)*/) /* IO Memory sizes */ #define ASIC_IOSIZE (0x10) #define PCMUIO48_IOSIZE ASIC_IOSIZE @@ -809,7 +808,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) } chans_left = CHANS_PER_ASIC * board->num_asics; - n_subdevs = CALC_N_SUBDEVS(chans_left); + n_subdevs = (chans_left / MAX_CHANS_PER_SUBDEV) + + (!!(chans_left % MAX_CHANS_PER_SUBDEV)); devpriv->sprivs = kcalloc(n_subdevs, sizeof(struct pcmuio_subdev_private), GFP_KERNEL); |