From patchwork Wed Dec 9 23:38:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 66133 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB9Nd1Es032382 for ; Wed, 9 Dec 2009 23:39:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758701AbZLIXix (ORCPT ); Wed, 9 Dec 2009 18:38:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758697AbZLIXiw (ORCPT ); Wed, 9 Dec 2009 18:38:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41655 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758667AbZLIXiw (ORCPT ); Wed, 9 Dec 2009 18:38:52 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB9NctLD002920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Dec 2009 18:38:55 -0500 Received: from [172.17.92.9] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB9NcqJE015966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Dec 2009 18:38:54 -0500 Message-ID: <4B20350B.2050006@redhat.com> Date: Wed, 09 Dec 2009 21:38:51 -0200 From: Mauro Carvalho Chehab User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Julian Scheel CC: Manu Abraham , linux-media@vger.kernel.org Subject: Re: New DVB-Statistics API References: <4B1E1974.6000207@jusst.de> <4B1E532C.9040903@redhat.com> <1a297b360912081346k45b7844bg5d408d47a38da5b4@mail.gmail.com> <4B1EE49A.8030701@redhat.com> <1a297b360912090342r3c73496x3abe8ccba62b701@mail.gmail.com> <4B1F9FD0.4020702@redhat.com> <4B2020BD.709@jusst.de> In-Reply-To: <4B2020BD.709@jusst.de> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: master/linux/drivers/media/dvb/dvb-core/dvb_frontend.c =================================================================== --- master.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ master/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1220,6 +1220,7 @@ static int dtv_property_prepare_get_stat switch (tvp->cmd) { case DTV_FE_QUALITY: fe->dtv_property_cache.need_stats |= FE_NEED_QUALITY; + fe->dtv_property_cache.quality = &tvp->u.data; break; case DTV_FE_QUALITY_UNIT: fe->dtv_property_cache.need_stats |= FE_NEED_QUALITY_UNIT; @@ -1384,9 +1385,6 @@ static int dtv_property_process_get(stru break; /* Quality measures */ - case DTV_FE_QUALITY: - tvp->u.data = fe->dtv_property_cache.quality; - break; case DTV_FE_QUALITY_UNIT: tvp->u.data = fe->dtv_property_cache.quality_unit; break; @@ -1696,10 +1697,12 @@ static int dvb_frontend_ioctl_properties } } - for (i = 0; i < tvps->num; i++) { - (tvp + i)->result = dtv_property_process_get(fe, - tvp + i, inode, file, need_get_ops); - err |= (tvp + i)->result; + if (need_get_ops) { + for (i = 0; i < tvps->num; i++) { + (tvp + i)->result = dtv_property_process_get(fe, + tvp + i, inode, file, need_get_ops); + err |= (tvp + i)->result; + } } if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct dtv_property))) { Index: master/linux/drivers/media/dvb/dvb-core/dvb_frontend.h =================================================================== --- master.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h +++ master/linux/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -374,7 +374,7 @@ struct dtv_frontend_properties { #define FE_NEED_SIGNAL_UNIT (1 << 7) int need_stats; - u32 quality; + u32 *quality; u32 strength; u32 error; u32 unc;