summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-07-29 18:23:28 +0100
committerAndrew de Quincey <adq_dvb@lidskialf.net>2006-07-29 18:23:28 +0100
commitf7eb6e544385a7d7a594e4bedb982e39a500a838 (patch)
tree05aee8b7c75ce2afa7d6b6d6262fe560c45dc183 /linux/drivers/media/dvb
parent401232ba8026e33a71183d3c80a83b53b3ef6ee4 (diff)
downloadmediapointer-dvb-s2-f7eb6e544385a7d7a594e4bedb982e39a500a838.tar.gz
mediapointer-dvb-s2-f7eb6e544385a7d7a594e4bedb982e39a500a838.tar.bz2
Fix dst_ca attach
From: Andrew de Quincey <adq_dvb@lidskialf.net> 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> Ack 'ed by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c11
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_ca.c3
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_common.h2
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c5
4 files changed, 7 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c
index 8b3390def..35278d64b 100644
--- a/linux/drivers/media/dvb/bt8xx/dst.c
+++ b/linux/drivers/media/dvb/bt8xx/dst.c
@@ -1719,12 +1719,6 @@ static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_paramet
static void dst_release(struct dvb_frontend *fe)
{
struct dst_state *state = fe->demodulator_priv;
-
-#ifdef CONFIG_DVB_CORE_ATTACH
- if (state->dst_hw_cap & DST_TYPE_HAS_CA)
- symbol_put(dst_ca_attach);
-#endif
-
kfree(state);
}
@@ -1762,6 +1756,11 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad
}
state->frontend.demodulator_priv = state;
+ /* Attach other DST peripherals if any */
+ /* Conditional Access device */
+ if (state->dst_hw_cap & DST_TYPE_HAS_CA)
+ dst_ca_attach(state, dvb_adapter);
+
return state; /* Manu (DST is a card not a frontend) */
}
diff --git a/linux/drivers/media/dvb/bt8xx/dst_ca.c b/linux/drivers/media/dvb/bt8xx/dst_ca.c
index 0ba3ac141..410fa9096 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_ca.c
+++ b/linux/drivers/media/dvb/bt8xx/dst_ca.c
@@ -795,12 +795,11 @@ static struct dvb_device dvbdev_ca = {
.fops = &dst_ca_fops
};
-ssize_t dst_ca_attach(struct dst_state *dst, struct dvb_adapter *dvb_adapter)
+void dst_ca_attach(struct dst_state *dst, struct dvb_adapter *dvb_adapter)
{
struct dvb_device *dvbdev;
dprintk(verbose, DST_CA_ERROR, 1, "registering DST-CA device");
dvb_register_device(dvb_adapter, &dvbdev, &dvbdev_ca, dst, DVB_DEVICE_CA);
- return 1; // must return non-zero for dvb_attach() to work
}
EXPORT_SYMBOL(dst_ca_attach);
diff --git a/linux/drivers/media/dvb/bt8xx/dst_common.h b/linux/drivers/media/dvb/bt8xx/dst_common.h
index 93277a954..21d9dc516 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_common.h
+++ b/linux/drivers/media/dvb/bt8xx/dst_common.h
@@ -185,7 +185,7 @@ int write_dst(struct dst_state *state, u8 * data, u8 len);
int read_dst(struct dst_state *state, u8 * ret, u8 len);
u8 dst_check_sum(u8 * buf, u32 len);
struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter);
-ssize_t dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);
+void dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);
int dst_gpio_outb(struct dst_state* state, u32 mask, u32 enbb, u32 outhigh, int delay);
int dst_command(struct dst_state* state, u8 * data, u8 len);
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 3031be25d..619f8c9df 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -677,11 +677,6 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
break;
}
card->fe = &state->frontend;
-
- /* Attach other DST peripherals if any */
- /* Conditional Access device */
- if (state->dst_hw_cap & DST_TYPE_HAS_CA)
- dvb_attach(dst_ca_attach, state, &card->dvb_adapter);
break;
case BTTV_BOARD_PINNACLESAT: