summaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_compat.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2016-08-13 10:13:36 +0900
committerTakashi Iwai <tiwai@suse.de>2016-08-22 11:11:05 +0200
commite12ec251e4db472e00df2aaefc13430efa25b5ea (patch)
treea9fc3ae6ac223d8ae99c5c72a69947b7973af6c1 /sound/core/seq/seq_compat.c
parent04a56dd8ed0de401ccc10e7825d5785844c307fa (diff)
downloadlinux-e12ec251e4db472e00df2aaefc13430efa25b5ea.tar.bz2
ALSA: seq: obsolete change of address limit
Former commits change existent functions so that they don't handle data in kernel space. Copying from/to userspace is done outside of the functions, thus no need to change address limit of running task. This commit obsoletes get_fs()/set_fs() and applies corresponding changes. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/seq_compat.c')
-rw-r--r--sound/core/seq/seq_compat.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c
index 4cfc50584218..fce5697e4261 100644
--- a/sound/core/seq/seq_compat.c
+++ b/sound/core/seq/seq_compat.c
@@ -47,7 +47,6 @@ static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned
{
int err = -EFAULT;
struct snd_seq_port_info *data;
- mm_segment_t fs;
data = kmalloc(sizeof(*data), GFP_KERNEL);
if (!data)
@@ -59,12 +58,7 @@ static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned
goto error;
data->kernel = NULL;
- if (snd_seq_kernel_client_ctl(client->number, cmd, &data) >= 0)
- return 0;
-
- fs = snd_enter_user();
- err = snd_seq_do_ioctl(client, cmd, data);
- snd_leave_user(fs);
+ err = snd_seq_kernel_client_ctl(client->number, cmd, &data);
if (err < 0)
goto error;
@@ -126,9 +120,7 @@ static long snd_seq_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
case SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION:
case SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT:
case SNDRV_SEQ_IOCTL_RUNNING_MODE:
- if (seq_ioctl(file, cmd, arg) >= 0)
- return 0;
- return snd_seq_do_ioctl(client, cmd, argp);
+ return snd_seq_ioctl(file, cmd, arg);
case SNDRV_SEQ_IOCTL_CREATE_PORT32:
return snd_seq_call_port_info_ioctl(client, SNDRV_SEQ_IOCTL_CREATE_PORT, argp);
case SNDRV_SEQ_IOCTL_DELETE_PORT32: