aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-08-08 08:10:09 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:29 -0400
commit0912ad0b0fdee374f1f49d75fee341980f0868b6 (patch)
tree9845dc4c6e64d7964f1e7d3bcb7606a128f51711 /drivers/media/dvb
parentf52a838b74be70b4054ab27e435e9acb92d8c50a (diff)
V4L/DVB (4392): Fix dst_ca attach
Move the call to dst_attach into the dst_attach function to eliminate problems caused with dvb_attach. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c11
-rw-r--r--drivers/media/dvb/bt8xx/dst_ca.c3
-rw-r--r--drivers/media/dvb/bt8xx/dst_common.h2
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c5
4 files changed, 7 insertions, 14 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index a853c14c61d3..52b6fb2455f9 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -1715,12 +1715,6 @@ static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_paramet
1715static void dst_release(struct dvb_frontend *fe) 1715static void dst_release(struct dvb_frontend *fe)
1716{ 1716{
1717 struct dst_state *state = fe->demodulator_priv; 1717 struct dst_state *state = fe->demodulator_priv;
1718
1719#ifdef CONFIG_DVB_CORE_ATTACH
1720 if (state->dst_hw_cap & DST_TYPE_HAS_CA)
1721 symbol_put(dst_ca_attach);
1722#endif
1723
1724 kfree(state); 1718 kfree(state);
1725} 1719}
1726 1720
@@ -1758,6 +1752,11 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad
1758 } 1752 }
1759 state->frontend.demodulator_priv = state; 1753 state->frontend.demodulator_priv = state;
1760 1754
1755 /* Attach other DST peripherals if any */
1756 /* Conditional Access device */
1757 if (state->dst_hw_cap & DST_TYPE_HAS_CA)
1758 dst_ca_attach(state, dvb_adapter);
1759
1761 return state; /* Manu (DST is a card not a frontend) */ 1760 return state; /* Manu (DST is a card not a frontend) */
1762} 1761}
1763 1762
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c
index c4ff1abc15c3..df0f68fbf24b 100644
--- a/drivers/media/dvb/bt8xx/dst_ca.c
+++ b/drivers/media/dvb/bt8xx/dst_ca.c
@@ -699,12 +699,11 @@ static struct dvb_device dvbdev_ca = {
699 .fops = &dst_ca_fops 699 .fops = &dst_ca_fops
700}; 700};
701 701
702ssize_t dst_ca_attach(struct dst_state *dst, struct dvb_adapter *dvb_adapter) 702void dst_ca_attach(struct dst_state *dst, struct dvb_adapter *dvb_adapter)
703{ 703{
704 struct dvb_device *dvbdev; 704 struct dvb_device *dvbdev;
705 dprintk(verbose, DST_CA_ERROR, 1, "registering DST-CA device"); 705 dprintk(verbose, DST_CA_ERROR, 1, "registering DST-CA device");
706 dvb_register_device(dvb_adapter, &dvbdev, &dvbdev_ca, dst, DVB_DEVICE_CA); 706 dvb_register_device(dvb_adapter, &dvbdev, &dvbdev_ca, dst, DVB_DEVICE_CA);
707 return 1; // must return non-zero for dvb_attach() to work
708} 707}
709 708
710EXPORT_SYMBOL(dst_ca_attach); 709EXPORT_SYMBOL(dst_ca_attach);
diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h
index 383452f9e497..66bc082824ad 100644
--- a/drivers/media/dvb/bt8xx/dst_common.h
+++ b/drivers/media/dvb/bt8xx/dst_common.h
@@ -178,7 +178,7 @@ int write_dst(struct dst_state *state, u8 * data, u8 len);
178int read_dst(struct dst_state *state, u8 * ret, u8 len); 178int read_dst(struct dst_state *state, u8 * ret, u8 len);
179u8 dst_check_sum(u8 * buf, u32 len); 179u8 dst_check_sum(u8 * buf, u32 len);
180struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter); 180struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter);
181ssize_t dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter); 181void dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);
182int dst_gpio_outb(struct dst_state* state, u32 mask, u32 enbb, u32 outhigh, int delay); 182int dst_gpio_outb(struct dst_state* state, u32 mask, u32 enbb, u32 outhigh, int delay);
183 183
184int dst_command(struct dst_state* state, u8 * data, u8 len); 184int dst_command(struct dst_state* state, u8 * data, u8 len);
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index db1eba9a5c36..a19991f7af47 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -676,11 +676,6 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
676 break; 676 break;
677 } 677 }
678 card->fe = &state->frontend; 678 card->fe = &state->frontend;
679
680 /* Attach other DST peripherals if any */
681 /* Conditional Access device */
682 if (state->dst_hw_cap & DST_TYPE_HAS_CA)
683 dvb_attach(dst_ca_attach, state, &card->dvb_adapter);
684 break; 679 break;
685 680
686 case BTTV_BOARD_PINNACLESAT: 681 case BTTV_BOARD_PINNACLESAT: