[media] DVB: call get_property at the end of dtv_property_process_get
authorAndreas Oberritter <obi@linuxtv.org>
Sun, 8 May 2011 23:03:36 +0000 (20:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 22:51:46 +0000 (19:51 -0300)
- Drivers should be able to override properties returned to the user.
- The default values get prefilled from the cache.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c

index 67558bd26d89afaa88ca317710b2ab5d318480de..fe6cd73620e63d1b46937cf2a6b5fab67080bf58 100644 (file)
@@ -1196,14 +1196,7 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
                                    struct dtv_property *tvp,
                                    struct file *file)
 {
-       int r = 0;
-
-       /* Allow the frontend to validate incoming properties */
-       if (fe->ops.get_property)
-               r = fe->ops.get_property(fe, tvp);
-
-       if (r < 0)
-               return r;
+       int r;
 
        switch(tvp->cmd) {
        case DTV_FREQUENCY:
@@ -1323,6 +1316,13 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
                return -EINVAL;
        }
 
+       /* Allow the frontend to override outgoing properties */
+       if (fe->ops.get_property) {
+               r = fe->ops.get_property(fe, tvp);
+               if (r < 0)
+                       return r;
+       }
+
        dtv_property_dump(tvp);
 
        return 0;