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 4/7] staging: comedi: comedi_fops: remove unnecessary s->async use
Date: Fri, 27 Mar 2015 15:13:03 +0000	[thread overview]
Message-ID: <1427469186-11222-5-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1427469186-11222-1-git-send-email-abbotti@mev.co.uk>

In places where the `s->async` value has been stored in a local
variable, use the variable instead of repeating `s->async`.

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

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 9e49c8a..999e7d0 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -687,7 +687,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
 		kfree(async->cmd.chanlist);
 		async->cmd.chanlist = NULL;
 		s->busy = NULL;
-		wake_up_interruptible_all(&s->async->wait_head);
+		wake_up_interruptible_all(&async->wait_head);
 	} else {
 		dev_err(dev->class_dev,
 			"BUG: (?) do_become_nonbusy called with async=NULL\n");
@@ -2652,14 +2652,14 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
 	if (!comedi_is_subdevice_running(s))
 		return;
 
-	if (s->async->events & COMEDI_CB_CANCEL_MASK)
+	if (async->events & COMEDI_CB_CANCEL_MASK)
 		runflags_mask |= COMEDI_SRF_RUNNING;
 
 	/*
 	 * Remember if an error event has occurred, so an error
 	 * can be returned the next time the user does a read().
 	 */
-	if (s->async->events & COMEDI_CB_ERROR_MASK) {
+	if (async->events & COMEDI_CB_ERROR_MASK) {
 		runflags_mask |= COMEDI_SRF_ERROR;
 		runflags |= COMEDI_SRF_ERROR;
 	}
@@ -2671,14 +2671,14 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
 		comedi_update_subdevice_runflags(s, runflags_mask, runflags);
 	}
 
-	if (async->cb_mask & s->async->events) {
+	if (async->cb_mask & async->events) {
 		wake_up_interruptible(&async->wait_head);
 		if (s->subdev_flags & SDF_CMD_READ)
 			kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
 		if (s->subdev_flags & SDF_CMD_WRITE)
 			kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
 	}
-	s->async->events = 0;
+	async->events = 0;
 }
 EXPORT_SYMBOL_GPL(comedi_event);
 
-- 
2.1.4


  parent reply	other threads:[~2015-03-27 15:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 15:12 [PATCH 0/7] staging: comedi: comedi_fops: some runflag and event handling changes Ian Abbott
2015-03-27 15:13 ` [PATCH 1/7] staging: comedi: comedi_fops: rename comedi_set_subdevice_runflags() Ian Abbott
2015-03-27 15:13 ` [PATCH 2/7] staging: comedi: comedi_fops: eliminate a use of subdevice spin-lock Ian Abbott
2015-03-27 15:13 ` [PATCH 3/7] staging: comedi: comedi_fops: simplify comedi_is_subdevice_idle() Ian Abbott
2015-03-27 15:13 ` Ian Abbott [this message]
2015-03-27 15:13 ` [PATCH 5/7] staging: comedi: comedi_fops: always clear events Ian Abbott
2015-03-27 15:13 ` [PATCH 6/7] staging: comedi: comedi_fops: send SIGIO according to command direction Ian Abbott
2015-03-27 15:13 ` [PATCH 7/7] staging: comedi: comedi_fops: extend spin-lock scope in comedi_event() Ian Abbott
2015-03-30 16:47   ` Hartley Sweeten
2015-03-31  9:42     ` Ian Abbott
2015-03-31 16:13       ` Hartley Sweeten
2015-04-01  9:10         ` Ian Abbott
2015-03-30 17:13 ` [PATCH 0/7] staging: comedi: comedi_fops: some runflag and event handling changes 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=1427469186-11222-5-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®