===================================================================
@@ -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))) {
===================================================================
@@ -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;