diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-09-06 13:56:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:01 -0400 |
commit | 30650961907368b1077cade35455fe931b14da6b (patch) | |
tree | a27bbcb9319529b6d13da933adff4c069a12b853 /drivers/media/video/cx88 | |
parent | 2a6003c20771ca16fc6386b5fd258df2f2fa8232 (diff) |
V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()
Dont pass devptr in xc5000_attach, dont store it in xc5000_priv.
This pointer is passed into the tuner_callback function, which always
expects a pointer to fe->dvb->priv or i2c_adapter->algo_data.
This prevents future possible bugs in new drivers, such as using a "devptr"
other that the standard fe->dvb->priv in a DVB driver.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index d96173ff1dba..07270b77ed8a 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -813,13 +813,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
813 | &pinnacle_pctv_hd_800i_config, | 813 | &pinnacle_pctv_hd_800i_config, |
814 | &core->i2c_adap); | 814 | &core->i2c_adap); |
815 | if (dev->dvb.frontend != NULL) { | 815 | if (dev->dvb.frontend != NULL) { |
816 | /* tuner_config.video_dev must point to | ||
817 | * i2c_adap.algo_data | ||
818 | */ | ||
819 | if (!dvb_attach(xc5000_attach, dev->dvb.frontend, | 816 | if (!dvb_attach(xc5000_attach, dev->dvb.frontend, |
820 | &core->i2c_adap, | 817 | &core->i2c_adap, |
821 | &pinnacle_pctv_hd_800i_tuner_config, | 818 | &pinnacle_pctv_hd_800i_tuner_config)) |
822 | core->i2c_adap.algo_data)) | ||
823 | goto frontend_detach; | 819 | goto frontend_detach; |
824 | } | 820 | } |
825 | break; | 821 | break; |
@@ -874,13 +870,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
874 | &dvico_fusionhdtv7_config, | 870 | &dvico_fusionhdtv7_config, |
875 | &core->i2c_adap); | 871 | &core->i2c_adap); |
876 | if (dev->dvb.frontend != NULL) { | 872 | if (dev->dvb.frontend != NULL) { |
877 | /* tuner_config.video_dev must point to | ||
878 | * i2c_adap.algo_data | ||
879 | */ | ||
880 | if (!dvb_attach(xc5000_attach, dev->dvb.frontend, | 873 | if (!dvb_attach(xc5000_attach, dev->dvb.frontend, |
881 | &core->i2c_adap, | 874 | &core->i2c_adap, |
882 | &dvico_fusionhdtv7_tuner_config, | 875 | &dvico_fusionhdtv7_tuner_config)) |
883 | core->i2c_adap.algo_data)) | ||
884 | goto frontend_detach; | 876 | goto frontend_detach; |
885 | } | 877 | } |
886 | break; | 878 | break; |