Skip to content

Commit

Permalink
staging: sst: remove the kernel locking in ioctl
Browse files Browse the repository at this point in the history
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@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vinod Koul authored and Greg Kroah-Hartman committed Oct 14, 2010
1 parent 6e2c2dc commit 88eea8d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/staging/intel_sst/intel_sst_app_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,19 +812,15 @@ 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;
str_id = data->str_id;
} 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):
Expand Down Expand Up @@ -1227,7 +1223,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;
}
Expand Down

0 comments on commit 88eea8d

Please sign in to comment.