summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-26 05:16:25 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 13:37:11 +0200
commitd48cb402a1ba48c4ad4a36c3c561386027318459 (patch)
treeef41126f8718540d976e27819b39a1e31acf9a58 /drivers/media
parentV4L/DVB (9070): S2API: Removed the typedef for the commands, used defines ins... (diff)
downloadlinux-d48cb402a1ba48c4ad4a36c3c561386027318459.tar.xz
linux-d48cb402a1ba48c4ad4a36c3c561386027318459.zip
V4L/DVB (9071): S2API: Implement result codes for individual commands
This allows application developers to determine which particular command in a sequence is invalid, or failing with error. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 7da25372078c..0ef9c2a2af87 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1262,8 +1262,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
goto out;
}
- for (i = 0; i < tvps->num; i++)
- err |= dtv_property_process_set(fe, tvp + i, inode, file);
+ for (i = 0; i < tvps->num; i++) {
+ (tvp + i)->result = dtv_property_process_set(fe, tvp + i, inode, file);
+ err |= (tvp + i)->result;
+ }
if(fe->dtv_property_cache.state == DTV_TUNE) {
printk("%s() Property cache is full, tuning\n", __FUNCTION__);
@@ -1295,8 +1297,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
goto out;
}
- for (i = 0; i < tvps->num; i++)
- err |= dtv_property_process_get(fe, tvp + i, inode, file);
+ for (i = 0; i < tvps->num; i++) {
+ (tvp + i)->result = dtv_property_process_get(fe, tvp + i, inode, file);
+ err |= (tvp + i)->result;
+ }
if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct dtv_property))) {
err = -EFAULT;