Skip to content

Commit

Permalink
Staging: comedi: jr3_pci: Initialize transf variable fully in jr3_pci…
Browse files Browse the repository at this point in the history
…_poll_subdevice().

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Oct 9, 2009
1 parent b8b5cd9 commit b1f68dc
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions drivers/staging/comedi/drivers/jr3_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice *s)
{
struct poll_delay_t result = poll_delay_min_max(1000, 2000);
struct jr3_pci_subdev_private *p = s->private;
int i;

if (p) {
volatile struct jr3_channel *channel = p->channel;
Expand Down Expand Up @@ -570,18 +571,11 @@ static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice *s)
p->serial_no);

/* Transformation all zeros */
transf.link[0].link_type =
(enum link_types)0;
transf.link[0].link_amount = 0;
transf.link[1].link_type =
(enum link_types)0;
transf.link[1].link_amount = 0;
transf.link[2].link_type =
(enum link_types)0;
transf.link[2].link_amount = 0;
transf.link[3].link_type =
(enum link_types)0;
transf.link[3].link_amount = 0;
for (i = 0; i < ARRAY_SIZE(transf.link); i++) {
transf.link[i].link_type =
(enum link_types)0;
transf.link[i].link_amount = 0;
}

set_transforms(channel, transf, 0);
use_transform(channel, 0);
Expand Down

0 comments on commit b1f68dc

Please sign in to comment.