mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: <driverdev-devel@linuxdriverproject.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hartleys@visionengravers.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 3/7] staging: comedi: ni_mio_common: don't change CMDF_WRITE flag
Date: Thu, 30 Oct 2014 12:42:28 +0000	[thread overview]
Message-ID: <1414672952-1587-4-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1414672952-1587-1-git-send-email-abbotti@mev.co.uk>

There is no need for `ni_ai_cmdtest()` or `ni_ao_cmdtest()` to set the
`CMDF_WRITE` flag to the correct state as it has already been done by
the core comedi module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/ni_mio_common.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 785ad70..852b645 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -2251,9 +2251,6 @@ static int ni_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
 
 	/* Step 1 : check if triggers are trivially valid */
 
-	if ((cmd->flags & CMDF_WRITE))
-		cmd->flags &= ~CMDF_WRITE;
-
 	err |= cfc_check_trigger_src(&cmd->start_src,
 					TRIG_NOW | TRIG_INT | TRIG_EXT);
 	err |= cfc_check_trigger_src(&cmd->scan_begin_src,
@@ -3286,9 +3283,6 @@ static int ni_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
 
 	/* Step 1 : check if triggers are trivially valid */
 
-	if ((cmd->flags & CMDF_WRITE) == 0)
-		cmd->flags |= CMDF_WRITE;
-
 	err |= cfc_check_trigger_src(&cmd->start_src, TRIG_INT | TRIG_EXT);
 	err |= cfc_check_trigger_src(&cmd->scan_begin_src,
 					TRIG_TIMER | TRIG_EXT);
-- 
2.1.1


  parent reply	other threads:[~2014-10-30 12:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 12:42 [PATCH 0/7] staging: comedi: enforce data transfer direction Ian Abbott
2014-10-30 12:42 ` [PATCH 1/7] staging: comedi: maybe force CMDF_WRITE command flag Ian Abbott
2014-10-30 12:42 ` [PATCH 2/7] staging: comedi: me4000: don't clobber command flags Ian Abbott
2014-10-30 12:42 ` Ian Abbott [this message]
2014-10-30 12:42 ` [PATCH 4/7] staging: comedi: don't allow read() on async command set up for "write" Ian Abbott
2014-10-30 18:05   ` Hartley Sweeten
2014-10-30 20:27     ` Ian Abbott
2014-10-30 20:45       ` Hartley Sweeten
2014-10-30 21:00         ` Ian Abbott
2014-10-30 12:42 ` [PATCH 5/7] staging: comedi: don't allow write() on async command set up for "read" Ian Abbott
2014-10-30 18:07   ` Hartley Sweeten
2014-10-30 20:29     ` Ian Abbott
2014-10-30 12:42 ` [PATCH 6/7] staging: comedi: check command direction in poll() file operation Ian Abbott
2014-10-30 12:42 ` [PATCH 7/7] staging: comedi: check actual data direction for COMEDI_BUFINFO ioctl Ian Abbott
2014-10-30 21:29 ` [PATCH 0/7] staging: comedi: enforce data transfer direction Hartley Sweeten

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=1414672952-1587-4-git-send-email-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®