[Meego-kernel] [PATCH] sst: remove the kernel locking in ioctl

Koul, Vinod vinod.koul at intel.com
Thu Oct 14 04:18:03 PDT 2010


Hi,

Alan I have tested this and we don't need the kernel lock.

Please review and merge.

>From d9ad5e8b600ac46dec725cff81697b557f6e13a7 Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul at intel.com>
Date: Thu, 14 Oct 2010 14:32:55 +0530
Subject: [PATCH] sst: remove the kernel locking in ioctl

kernel locking in ioctl was introduced when ioctl function was
moved from ioctl to unlocked ioctl
This is no longer required hence removed

Signed-off-by: Vinod Koul <vinod.koul at intel.com>
---
 sound/pci/sst/intel_sst_app_interface.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/sound/pci/sst/intel_sst_app_interface.c b/sound/pci/sst/intel_sst_app_interface.c
index b82350f..671de17 100644
--- a/sound/pci/sst/intel_sst_app_interface.c
+++ b/sound/pci/sst/intel_sst_app_interface.c
@@ -35,7 +35,6 @@
 #include <linux/firmware.h>
 #include <linux/pm_runtime.h>
 #include <linux/ioctl.h>
-#include <linux/smp_lock.h>
 #ifdef CONFIG_MRST_RAR_HANDLER
 #include "../../../drivers/staging/rar_register/rar_register.h"
 #include "../../../drivers/staging/memrar/memrar.h"
@@ -831,8 +830,6 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
 	struct ioctl_pvt_data *data = NULL;
 	int str_id = 0, minor = 0;
 
-	lock_kernel();
-
 	data = file_ptr->private_data;
 	if (data) {
 		minor = 0;
@@ -840,10 +837,8 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
 	} else
 		minor = 1;
 
-	if (sst_drv_ctx->sst_state != SST_FW_RUNNING) {
-		unlock_kernel();
+	if (sst_drv_ctx->sst_state != SST_FW_RUNNING)
 		return -EBUSY;
-	}
 
 	switch (_IOC_NR(cmd)) {
 	case _IOC_NR(SNDRV_SST_STREAM_PAUSE):
@@ -1246,7 +1241,6 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
 	default:
 		retval = -EINVAL;
 	}
-	unlock_kernel();
 	pr_debug("sst: intel_sst_ioctl:complete ret code = %d\n", retval);
 	return retval;
 }
-- 
1.7.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sst-remove-the-kernel-locking-in-ioctl.patch
Type: application/octet-stream
Size: 1852 bytes
Desc: 0001-sst-remove-the-kernel-locking-in-ioctl.patch
URL: <http://lists.meego.com/pipermail/meego-kernel/attachments/20101014/655ed8c3/attachment.obj>


More information about the Meego-kernel mailing list