From patchwork Mon May 23 13:58:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Petter Selasky X-Patchwork-Id: 808932 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4NDxRF2024714 for ; Mon, 23 May 2011 13:59:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754947Ab1EWN70 (ORCPT ); Mon, 23 May 2011 09:59:26 -0400 Received: from mailfe06.c2i.net ([212.247.154.162]:45323 "EHLO swip.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754107Ab1EWN7Z (ORCPT ); Mon, 23 May 2011 09:59:25 -0400 X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=NvrFngl24Vvwb7eBef0tfsytOWEnP/WlkqxQrRnklhk= c=1 sm=1 a=1Bp6vtPlOrwA:10 a=WQU8e4WWZSUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=SObZXD9RMCsnjX8LmoMA:9 a=CjuIK1q_8ugA:10 a=8kQB0OdkAAAA:8 a=zTDfAfxBgC1tQbNshkQA:9 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 129570441; Mon, 23 May 2011 15:59:24 +0200 To: "linux-media@vger.kernel.org" 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. Cc: Mauro Carvalho Chehab From: Hans Petter Selasky X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-15?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-15?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= Date: Mon, 23 May 2011 15:58:13 +0200 MIME-Version: 1.0 Message-Id: <201105231558.13084.hselasky@c2i.net> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 23 May 2011 13:59:28 +0000 (UTC) --HPS From be7d0f72ebf4d945cfb2a5c9cc871707f72e1e3c Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky 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 --- 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