aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-04-13 05:49:04 -0400
committerTakashi Iwai <tiwai@suse.de>2010-04-13 06:01:21 -0400
commit02f4865fa415a87de28cc8c2e4d798ff46be1cf8 (patch)
tree7d8e1087fd17e0390439ad4fe3cdd59477c3032c /sound/core/timer.c
parent73029e0ff18dfac8a1aab1dc188e1e150bbe3adc (diff)
ALSA: core - Define llseek fops
Set no_llseek to llseek file ops of each sound component (but for hwdep). This avoids the implicit BKL invocation via generic_file_llseek() used as default when fops.llseek is NULL. Also call nonseekable_open() at each open ops to ensure the file flags have no seek bit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 73943651caed..8c9a661df05b 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1237,6 +1237,11 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
1237static int snd_timer_user_open(struct inode *inode, struct file *file) 1237static int snd_timer_user_open(struct inode *inode, struct file *file)
1238{ 1238{
1239 struct snd_timer_user *tu; 1239 struct snd_timer_user *tu;
1240 int err;
1241
1242 err = nonseekable_open(inode, file);
1243 if (err < 0)
1244 return err;
1240 1245
1241 tu = kzalloc(sizeof(*tu), GFP_KERNEL); 1246 tu = kzalloc(sizeof(*tu), GFP_KERNEL);
1242 if (tu == NULL) 1247 if (tu == NULL)
@@ -1921,6 +1926,7 @@ static const struct file_operations snd_timer_f_ops =
1921 .read = snd_timer_user_read, 1926 .read = snd_timer_user_read,
1922 .open = snd_timer_user_open, 1927 .open = snd_timer_user_open,
1923 .release = snd_timer_user_release, 1928 .release = snd_timer_user_release,
1929 .llseek = no_llseek,
1924 .poll = snd_timer_user_poll, 1930 .poll = snd_timer_user_poll,
1925 .unlocked_ioctl = snd_timer_user_ioctl, 1931 .unlocked_ioctl = snd_timer_user_ioctl,
1926 .compat_ioctl = snd_timer_user_ioctl_compat, 1932 .compat_ioctl = snd_timer_user_ioctl_compat,