public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch 2/2] Staging: intel_sst: cleanup naming a little
Date: Fri, 15 Oct 2010 03:44:58 +0000	[thread overview]
Message-ID: <20101015034458.GJ6614@bicker> (raw)

&sst_drv_ctx->streams[str_id].lock and &stream->lock are the same.
The mutex_lock() uses &stream->lock so this makes things consistent and
it's nicer to read as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/staging/intel_sst/intel_sst_app_interface.c b/drivers/staging/intel_sst/intel_sst_app_interface.c
index baf0ddc..086999b 100644
--- a/drivers/staging/intel_sst/intel_sst_app_interface.c
+++ b/drivers/staging/intel_sst/intel_sst_app_interface.c
@@ -1060,20 +1062,18 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
 				retval = sst_capture_frame(str_id);
 			else {
 				retval = -EINVAL;
-				mutex_unlock(
-					&sst_drv_ctx->streams[str_id].lock);
+				mutex_unlock(&stream->lock);
 				break;
 			}
 			if (retval < 0) {
 				stream->status = STREAM_INIT;
-				mutex_unlock(
-					&sst_drv_ctx->streams[str_id].lock);
+				mutex_unlock(&stream->lock);
 				break;
 			}
 		} else {
 			retval = -EINVAL;
 		}
-		mutex_unlock(&sst_drv_ctx->streams[str_id].lock);
+		mutex_unlock(&stream->lock);
 		break;
 	}
 

             reply	other threads:[~2010-10-15  3:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  3:44 Dan Carpenter [this message]
2010-10-15  4:36 ` [patch 2/2] Staging: intel_sst: cleanup naming a little Koul, Vinod

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=20101015034458.GJ6614@bicker \
    --to=error27@gmail.com \
    --cc=kernel-janitors@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