aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dib9000.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-30 09:30:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 07:28:23 -0500
commit7c61d80a9bcfc3fdec8ffd75756cad6a64678229 (patch)
treecd62cf4852ba56a7a5f12cc630cae44000393f34 /drivers/media/dvb/frontends/dib9000.c
parentac3852c41b36cb408bea1400892dd6c61c3b225a (diff)
[media] dvb: don't require a parameter for get_frontend
Just like set_frontend, use the dvb cache properties for get_frontend. This is more consistent, as both functions are now symetric. Also, at the places get_frontend is called, it makes sense to update the cache. Most of this patch were generated by this small perl script: while (<>) { $file .= $_; } if ($file =~ m/\.get_frontend\s*=\s*([\d\w_]+)/) { my $get = $1; $file =~ s/($get)(\s*\([^\,\)]+)\,\s*struct\s+dtv_frontend_properties\s*\*\s*([_\d\w]+)\)\s*\{/\1\2)\n{\n\tstruct dtv_frontend_properties *\3 = &fe->dtv_property_cache;/g; } print $file; Of course, the changes at dvb_frontend.[ch] were made by hand, as well as the changes on a few other places, where get_frontend() is called internally inside the driver. On some places, get_frontend() were just a void function. Those occurrences were removed, as the DVB core handles such cases. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/dib9000.c')
-rw-r--r--drivers/media/dvb/frontends/dib9000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c
index 974c2b7dc201..2312b4d20d4a 100644
--- a/drivers/media/dvb/frontends/dib9000.c
+++ b/drivers/media/dvb/frontends/dib9000.c
@@ -1867,7 +1867,7 @@ static int dib9000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_fron
1867 return 0; 1867 return 0;
1868} 1868}
1869 1869
1870static int dib9000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *c) 1870static int dib9000_get_frontend(struct dvb_frontend *fe)
1871{ 1871{
1872 struct dib9000_state *state = fe->demodulator_priv; 1872 struct dib9000_state *state = fe->demodulator_priv;
1873 u8 index_frontend, sub_index_frontend; 1873 u8 index_frontend, sub_index_frontend;
@@ -1883,7 +1883,7 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_pro
1883 dprintk("TPS lock on the slave%i", index_frontend); 1883 dprintk("TPS lock on the slave%i", index_frontend);
1884 1884
1885 /* synchronize the cache with the other frontends */ 1885 /* synchronize the cache with the other frontends */
1886 state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend], c); 1886 state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend]);
1887 for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL); 1887 for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL);
1888 sub_index_frontend++) { 1888 sub_index_frontend++) {
1889 if (sub_index_frontend != index_frontend) { 1889 if (sub_index_frontend != index_frontend) {
@@ -2054,7 +2054,7 @@ static int dib9000_set_frontend(struct dvb_frontend *fe)
2054 2054
2055 /* synchronize all the channel cache */ 2055 /* synchronize all the channel cache */
2056 state->get_frontend_internal = 1; 2056 state->get_frontend_internal = 1;
2057 dib9000_get_frontend(state->fe[0], &state->fe[0]->dtv_property_cache); 2057 dib9000_get_frontend(state->fe[0]);
2058 state->get_frontend_internal = 0; 2058 state->get_frontend_internal = 0;
2059 2059
2060 /* retune the other frontends with the found channel */ 2060 /* retune the other frontends with the found channel */