From: Dave Jones <davej@redhat.com>
To: Hartley Sweeten <HartleyS@visionengravers.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: staging: comedi: Fix boolean/logical and mix-up.
Date: Tue, 26 Nov 2013 21:57:24 -0500 [thread overview]
Message-ID: <20131127025724.GA18860@redhat.com> (raw)
In-Reply-To: <DC148C5AA1CEBA4E87973D432B1C2D8817E08AC5@P3PWEX4MB008.ex4.secureserver.net>
Introduced in commit b3ff824a81e8.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c
index d041b714db29..2baaf1db6fbf 100644
--- a/drivers/staging/comedi/drivers/pcl730.c
+++ b/drivers/staging/comedi/drivers/pcl730.c
@@ -173,11 +173,11 @@ static int pcl730_do_insn_bits(struct comedi_device *dev,
if (mask) {
if (mask & 0x00ff)
outb(s->state & 0xff, dev->iobase + reg);
- if ((mask & 0xff00) & (s->n_chan > 8))
+ if ((mask & 0xff00) && (s->n_chan > 8))
outb((s->state >> 8) & 0xff, dev->iobase + reg + 1);
- if ((mask & 0xff0000) & (s->n_chan > 16))
+ if ((mask & 0xff0000) && (s->n_chan > 16))
outb((s->state >> 16) & 0xff, dev->iobase + reg + 2);
- if ((mask & 0xff000000) & (s->n_chan > 24))
+ if ((mask & 0xff000000) && (s->n_chan > 24))
outb((s->state >> 24) & 0xff, dev->iobase + reg + 3);
}
next prev parent reply other threads:[~2013-11-27 2:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20131107062754.93B2D660F4A@gitolite.kernel.org>
2013-11-08 20:06 ` staging: comedi: drivers: use comedi_dio_update_state() for complex cases Dave Jones
2013-11-26 18:07 ` Hartley Sweeten
2013-11-27 2:57 ` Dave Jones [this message]
2013-11-27 16:38 ` staging: comedi: Fix boolean/logical and mix-up Hartley Sweeten
2013-11-27 16:59 ` Hartley Sweeten
2013-11-27 17:11 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131127025724.GA18860@redhat.com \
--to=davej@redhat.com \
--cc=HartleyS@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.