diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2011-05-08 19:03:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 18:51:46 -0400 |
commit | e23d9ae343f9d196382ab213612d76126f9c99af (patch) | |
tree | 4186b95e86737506446ffd0e3efd18cca646208d | |
parent | 15cc2bb385ced95be35d13895a67bfe52066778c (diff) |
[media] DVB: call get_property at the end of dtv_property_process_get
- 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>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 67558bd26d89..fe6cd73620e6 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -1196,14 +1196,7 @@ static int dtv_property_process_get(struct dvb_frontend *fe, | |||
1196 | struct dtv_property *tvp, | 1196 | struct dtv_property *tvp, |
1197 | struct file *file) | 1197 | struct file *file) |
1198 | { | 1198 | { |
1199 | int r = 0; | 1199 | int r; |
1200 | |||
1201 | /* Allow the frontend to validate incoming properties */ | ||
1202 | if (fe->ops.get_property) | ||
1203 | r = fe->ops.get_property(fe, tvp); | ||
1204 | |||
1205 | if (r < 0) | ||
1206 | return r; | ||
1207 | 1200 | ||
1208 | switch(tvp->cmd) { | 1201 | switch(tvp->cmd) { |
1209 | case DTV_FREQUENCY: | 1202 | case DTV_FREQUENCY: |
@@ -1323,6 +1316,13 @@ static int dtv_property_process_get(struct dvb_frontend *fe, | |||
1323 | return -EINVAL; | 1316 | return -EINVAL; |
1324 | } | 1317 | } |
1325 | 1318 | ||
1319 | /* Allow the frontend to override outgoing properties */ | ||
1320 | if (fe->ops.get_property) { | ||
1321 | r = fe->ops.get_property(fe, tvp); | ||
1322 | if (r < 0) | ||
1323 | return r; | ||
1324 | } | ||
1325 | |||
1326 | dtv_property_dump(tvp); | 1326 | dtv_property_dump(tvp); |
1327 | 1327 | ||
1328 | return 0; | 1328 | return 0; |