Skip to contentSkip to conversation

Staging: intel_sst: cleanup naming a little

PATCH In review Dan Carpenter 2 participants 2 messages Oct 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Staging: intel_sst: cleanup naming a little

&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.

drivers/staging/intel_sst/intel_sst_app_interface.c +3 -5
index baf0ddc..086999b 100644
@@ -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;
 	}