* [PATCH 19/33] staging: comedi: cb_das16_cs: cleanup dio subdevice initialization
@ 2012-06-26 0:00 H Hartley Sweeten
2012-06-26 0:09 ` H Hartley Sweeten
0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2012-06-26 0:00 UTC (permalink / raw)
To: Linux Kernel; +Cc: devel, abbotti, fmhess, gregkh
The digital i/o subdevice is always initialized due to the 'if (1)'.
Simplify the attach by removing the test.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/comedi/drivers/cb_das16_cs.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index b0a2223..f3d5ca0 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -513,17 +513,13 @@ static int das16cs_attach(struct comedi_device *dev,
s = dev->subdevices + 2;
/* digital i/o subdevice */
- if (1) {
- s->type = COMEDI_SUBD_DIO;
- s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
- s->n_chan = 8;
- s->maxdata = 1;
- s->range_table = &range_digital;
- s->insn_bits = das16cs_dio_insn_bits;
- s->insn_config = das16cs_dio_insn_config;
- } else {
- s->type = COMEDI_SUBD_UNUSED;
- }
+ s->type = COMEDI_SUBD_DIO;
+ s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+ s->n_chan = 8;
+ s->maxdata = 1;
+ s->range_table = &range_digital;
+ s->insn_bits = das16cs_dio_insn_bits;
+ s->insn_config = das16cs_dio_insn_config;
return 1;
}
--
1.7.11
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH 19/33] staging: comedi: cb_das16_cs: cleanup dio subdevice initialization
2012-06-26 0:00 [PATCH 19/33] staging: comedi: cb_das16_cs: cleanup dio subdevice initialization H Hartley Sweeten
@ 2012-06-26 0:09 ` H Hartley Sweeten
2012-06-26 0:24 ` gregkh
0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2012-06-26 0:09 UTC (permalink / raw)
To: H Hartley Sweeten, Linux Kernel
Cc: devel@driverdev.osuosl.org, fmhess@users.sourceforge.net,
abbotti@mev.co.uk, gregkh@linuxfoundation.org
On Monday, June 25, 2012 5:00 PM, H Hartley Sweeten wrote:
> The digital i/o subdevice is always initialized due to the 'if (1)'.
> Simplify the attach by removing the test.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ian Abbott <abbotti@mev.co.uk>
> Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grr... Did it again.
Sorry Greg. That should be a Cc not a Signed-off-by. Do you want
me to repost these?
Regards,
Hartley
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 19/33] staging: comedi: cb_das16_cs: cleanup dio subdevice initialization
2012-06-26 0:09 ` H Hartley Sweeten
@ 2012-06-26 0:24 ` gregkh
0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2012-06-26 0:24 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: Linux Kernel, devel@driverdev.osuosl.org,
fmhess@users.sourceforge.net, abbotti@mev.co.uk
On Mon, Jun 25, 2012 at 07:09:39PM -0500, H Hartley Sweeten wrote:
> On Monday, June 25, 2012 5:00 PM, H Hartley Sweeten wrote:
> > The digital i/o subdevice is always initialized due to the 'if (1)'.
> > Simplify the attach by removing the test.
> >
> > Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> > Cc: Ian Abbott <abbotti@mev.co.uk>
> > Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> Grr... Did it again.
>
> Sorry Greg. That should be a Cc not a Signed-off-by. Do you want
> me to repost these?
No problem, I'll edit it out.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-26 0:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26 0:00 [PATCH 19/33] staging: comedi: cb_das16_cs: cleanup dio subdevice initialization H Hartley Sweeten
2012-06-26 0:09 ` H Hartley Sweeten
2012-06-26 0:24 ` gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox