public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FE_GET_PROPERTY should be _IOW, because the associated structure is transferred from userspace to kernelspace. Keep the old ioctl around for compatibility so that existing code is not broken.
@ 2011-05-23 13:58 Hans Petter Selasky
  2011-05-23 14:37 ` Andreas Oberritter
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Petter Selasky @ 2011-05-23 13:58 UTC (permalink / raw)
  To: linux-media@vger.kernel.org; +Cc: Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 6 bytes --]

--HPS

[-- Attachment #2: dvb-usb-0013.patch --]
[-- Type: text/x-patch, Size: 2083 bytes --]

From be7d0f72ebf4d945cfb2a5c9cc871707f72e1e3c Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hselasky@c2i.net>
Date: Mon, 23 May 2011 15:56:31 +0200
Subject: [PATCH] FE_GET_PROPERTY should be _IOW, because the associated structure is transferred from userspace to kernelspace. Keep the old ioctl around for compatibility so that existing code is not broken.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
---
 drivers/media/dvb/dvb-core/dvb_frontend.c |    5 +++--
 include/linux/dvb/frontend.h              |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 31e2c0d..d93c1ec 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1507,7 +1507,8 @@ static int dvb_frontend_ioctl(struct file *file,
 	if (down_interruptible (&fepriv->sem))
 		return -ERESTARTSYS;
 
-	if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
+	if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY) ||
+	    (cmd == FE_GET_PROPERTY_OLD))
 		err = dvb_frontend_ioctl_properties(file, cmd, parg);
 	else {
 		fe->dtv_property_cache.state = DTV_UNDEFINED;
@@ -1562,7 +1563,7 @@ static int dvb_frontend_ioctl_properties(struct file *file,
 			dprintk("%s() Property cache is full, tuning\n", __func__);
 
 	} else
-	if(cmd == FE_GET_PROPERTY) {
+	if(cmd == FE_GET_PROPERTY || cmd == FE_GET_PROPERTY_OLD) {
 
 		tvps = (struct dtv_properties __user *)parg;
 
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 493a2bf..05b38c4 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -374,7 +374,8 @@ struct dtv_properties {
 };
 
 #define FE_SET_PROPERTY		   _IOW('o', 82, struct dtv_properties)
-#define FE_GET_PROPERTY		   _IOR('o', 83, struct dtv_properties)
+#define FE_GET_PROPERTY		   _IOW('o', 83, struct dtv_properties)
+#define FE_GET_PROPERTY_OLD	   _IOR('o', 83, struct dtv_properties)
 
 
 /**
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-03 13:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23 13:58 [PATCH] FE_GET_PROPERTY should be _IOW, because the associated structure is transferred from userspace to kernelspace. Keep the old ioctl around for compatibility so that existing code is not broken Hans Petter Selasky
2011-05-23 14:37 ` Andreas Oberritter
2011-05-23 14:51   ` Hans Petter Selasky
2011-05-23 15:32     ` Andreas Oberritter
2011-06-01 21:15       ` Mauro Carvalho Chehab
2011-06-03 12:44         ` Andreas Oberritter
2011-06-03 13:55           ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox